当前位置: 首页>>代码示例>>Java>>正文


Java TaggedProfile类代码示例

本文整理汇总了Java中org.omg.IOP.TaggedProfile的典型用法代码示例。如果您正苦于以下问题:Java TaggedProfile类的具体用法?Java TaggedProfile怎么用?Java TaggedProfile使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


TaggedProfile类属于org.omg.IOP包,在下文中一共展示了TaggedProfile类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: effective_profile

import org.omg.IOP.TaggedProfile; //导入依赖的package包/类
/**
 * The profile that will be used to send the request.  If a location
 * forward has occurred for this operation's object and that object's
 * profile change accordingly, then this profile will be that located
 * profile.
 */
public TaggedProfile effective_profile (){
    // access is currently valid for all states:
    //checkAccess( MID_EFFECTIVE_PROFILE );

    if( cachedEffectiveProfile == null ) {
        CorbaContactInfo corbaContactInfo = (CorbaContactInfo)
            messageMediator.getContactInfo();
        cachedEffectiveProfile =
            corbaContactInfo.getEffectiveProfile().getIOPProfile();
    }

    // Good citizen: In the interest of efficiency, we assume interceptors
    // will not modify the returned TaggedProfile in any way so we need
    // not make a deep copy of it.

    return cachedEffectiveProfile;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:24,代码来源:ClientRequestInfoImpl.java

示例2: add_ior_component_to_profile

import org.omg.IOP.TaggedProfile; //导入依赖的package包/类
/**
 * Adds a service-specific component to the IOR profile.
 *
 * @param tagged_component a tagged component being added.
 *
 * @param profile_id the IOR profile to that the component must be added. The
 * 0 value ({@link org.omg.IOP.TAG_INTERNET_IOP#value}) adds to the Internet
 * profile where host and port are stored by default.
 */
public void add_ior_component_to_profile(TaggedComponent tagged_component,
                                         int profile_id)
{
  if (profile_id == TAG_INTERNET_IOP.value)
    // Add to the Internet profile
    Internet.components.add(tagged_component);
  else
    {
      // Add to others.
      for (int i = 0; i < profiles.size(); i++)
        {
          TaggedProfile profile = (TaggedProfile) profiles.get(i);
          if (profile.tag == profile_id)
            addComponentTo(profile, tagged_component);
        }
    }
}
 
开发者ID:vilie,项目名称:javify,代码行数:27,代码来源:IOR.java

示例3: add_ior_component

import org.omg.IOP.TaggedProfile; //导入依赖的package包/类
/**
 * Adds a service-specific component to the IOR profile. The specified
 * component will be included in all profiles, present in the IOR.
 *
 * @param tagged_component a tagged component being added.
 */
public void add_ior_component(TaggedComponent tagged_component)
{
  // Add to the Internet profile.
  Internet.components.add(tagged_component);

  // Add to others.
  for (int i = 0; i < profiles.size(); i++)
    {
      TaggedProfile profile = (TaggedProfile) profiles.get(i);
      addComponentTo(profile, tagged_component);
    }
}
 
开发者ID:vilie,项目名称:javify,代码行数:19,代码来源:IOR.java

示例4: effective_profile

import org.omg.IOP.TaggedProfile; //导入依赖的package包/类
/**
 * Get the Internet profile as an effective profile.
 */
public TaggedProfile effective_profile()
{
  BufferedCdrOutput buf = new BufferedCdrOutput(512);
  buf.setOrb(orb);
  ior.Internet.write(buf);

  TaggedProfile p = new TaggedProfile();
  p.tag = TAG_INTERNET_IOP.value;
  p.profile_data = buf.buffer.toByteArray();
  return p;
}
 
开发者ID:vilie,项目名称:javify,代码行数:15,代码来源:gnuRequest.java

示例5: addComponentTo

import org.omg.IOP.TaggedProfile; //导入依赖的package包/类
/**
 * Add given component to the given profile that is NOT an Internet profile.
 *
 * @param profile the profile, where the component should be added.
 * @param component the component to add.
 */
private static void addComponentTo(TaggedProfile profile,
                                   TaggedComponent component)
{
  if (profile.tag == TAG_MULTIPLE_COMPONENTS.value)
    {
      TaggedComponent[] present;
      if (profile.profile_data.length > 0)
        {
          BufferredCdrInput in = new BufferredCdrInput(profile.profile_data);

          present = new TaggedComponent[in.read_long()];

          for (int i = 0; i < present.length; i++)
            {
              present[i] = TaggedComponentHelper.read(in);
            }
        }
      else
        present = new TaggedComponent[0];

      BufferedCdrOutput out = new BufferedCdrOutput(profile.profile_data.length
                                          + component.component_data.length
                                          + 8);

      // Write new amount of components.
      out.write_long(present.length + 1);

      // Write other components.
      for (int i = 0; i < present.length; i++)
        TaggedComponentHelper.write(out, present[i]);

      // Write the passed component.
      TaggedComponentHelper.write(out, component);

      try
        {
          out.close();
        }
      catch (IOException e)
        {
          throw new Unexpected(e);
        }
      profile.profile_data = out.buffer.toByteArray();
    }
  else
    // The future supported tagged profiles should be added here.
    throw new BAD_PARAM("Unsupported profile type " + profile.tag);
}
 
开发者ID:vilie,项目名称:javify,代码行数:55,代码来源:IOR.java

示例6: effective_profile

import org.omg.IOP.TaggedProfile; //导入依赖的package包/类
/** @inheritDoc */
public TaggedProfile effective_profile()
{
  return request.effective_profile();
}
 
开发者ID:vilie,项目名称:javify,代码行数:6,代码来源:gnuClientRequestInfo.java

示例7: effective_profile

import org.omg.IOP.TaggedProfile; //导入依赖的package包/类
/**
 * Returns the tagged profile (IOR) of the invocation target. If the request
     * was forwarded, the method returns the new location, shown by the forwarding
 * message.
 *
 * @return the invocation IOR.
 */
TaggedProfile effective_profile();
 
开发者ID:vilie,项目名称:javify,代码行数:9,代码来源:ClientRequestInfoOperations.java


注:本文中的org.omg.IOP.TaggedProfile类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。