Java Code Examples for org.omg.CORBA.portable.ObjectImpl._ids

The following are Jave code examples for showing how to use _ids of the org.omg.CORBA.portable.ObjectImpl class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: javify   File: OrbFunctional.java   Source Code and License Vote up 6 votes
/**
 * Create IOR for the given object references.
 */
protected IOR createIOR(Connected_objects.cObject ref)
  throws BAD_OPERATION
{
  IOR ior = new IOR();
  ior.key = ref.key;
  ior.Internet.port = ref.port;

  if (ref.object instanceof ObjectImpl)
    {
      ObjectImpl imp = (ObjectImpl) ref.object;
      if (imp._ids().length > 0)
        ior.Id = imp._ids() [ 0 ];
    }
  if (ior.Id == null)
    ior.Id = ref.object.getClass().getName();

  ior.Internet.host = CollocatedOrbs.localHost;
  ior.Internet.port = ref.port;

  return ior;
}
 
Example 2
Project: javify   File: SimpleDelegate.java   Source Code and License Vote up 6 votes
/**
 * Check if this object can be referenced by the given repository id.
 *
 * @param target the CORBA object, must be an instance of
 * {@link org.omg.CORBA.portable.ObjectImpl}.
 *
 * @param repositoryIdentifer the repository id.
 *
 * @return true if the passed parameter is a repository id of this
 * CORBA object.
 */
public boolean is_a(org.omg.CORBA.Object target, String repositoryIdentifer)
{
  if (!(target instanceof ObjectImpl))
    throw new NO_IMPLEMENT("Supported only for org.omg.CORBA.portable.ObjectImpl");

  ObjectImpl imp = (ObjectImpl) target;
  String[] ids = imp._ids();

  for (int i = 0; i < ids.length; i++)
    {
      if (ids [ i ].equals(repositoryIdentifer))
        return true;
    }
  return false;
}
 
Example 3
Project: jvm-stm   File: OrbFunctional.java   Source Code and License Vote up 6 votes
/**
 * Create IOR for the given object references.
 */
protected IOR createIOR(Connected_objects.cObject ref)
  throws BAD_OPERATION
{
  IOR ior = new IOR();
  ior.key = ref.key;
  ior.Internet.port = ref.port;

  if (ref.object instanceof ObjectImpl)
    {
      ObjectImpl imp = (ObjectImpl) ref.object;
      if (imp._ids().length > 0)
        ior.Id = imp._ids() [ 0 ];
    }
  if (ior.Id == null)
    ior.Id = ref.object.getClass().getName();

  ior.Internet.host = CollocatedOrbs.localHost;
  ior.Internet.port = ref.port;

  return ior;
}
 
Example 4
Project: jvm-stm   File: SimpleDelegate.java   Source Code and License Vote up 6 votes
/**
 * Check if this object can be referenced by the given repository id.
 *
 * @param target the CORBA object, must be an instance of
 * {@link org.omg.CORBA.portable.ObjectImpl}.
 *
 * @param repositoryIdentifer the repository id.
 *
 * @return true if the passed parameter is a repository id of this
 * CORBA object.
 */
public boolean is_a(org.omg.CORBA.Object target, String repositoryIdentifer)
{
  if (!(target instanceof ObjectImpl))
    throw new NO_IMPLEMENT("Supported only for org.omg.CORBA.portable.ObjectImpl");

  ObjectImpl imp = (ObjectImpl) target;
  String[] ids = imp._ids();

  for (int i = 0; i < ids.length; i++)
    {
      if (ids [ i ].equals(repositoryIdentifer))
        return true;
    }
  return false;
}
 
Example 5
Project: JamVM-PH   File: OrbFunctional.java   Source Code and License Vote up 6 votes
/**
 * Create IOR for the given object references.
 */
protected IOR createIOR(Connected_objects.cObject ref)
  throws BAD_OPERATION
{
  IOR ior = new IOR();
  ior.key = ref.key;
  ior.Internet.port = ref.port;

  if (ref.object instanceof ObjectImpl)
    {
      ObjectImpl imp = (ObjectImpl) ref.object;
      if (imp._ids().length > 0)
        ior.Id = imp._ids() [ 0 ];
    }
  if (ior.Id == null)
    ior.Id = ref.object.getClass().getName();

  ior.Internet.host = CollocatedOrbs.localHost;
  ior.Internet.port = ref.port;

  return ior;
}
 
Example 6
Project: JamVM-PH   File: SimpleDelegate.java   Source Code and License Vote up 6 votes
/**
 * Check if this object can be referenced by the given repository id.
 *
 * @param target the CORBA object, must be an instance of
 * {@link org.omg.CORBA.portable.ObjectImpl}.
 *
 * @param repositoryIdentifer the repository id.
 *
 * @return true if the passed parameter is a repository id of this
 * CORBA object.
 */
public boolean is_a(org.omg.CORBA.Object target, String repositoryIdentifer)
{
  if (!(target instanceof ObjectImpl))
    throw new NO_IMPLEMENT("Supported only for org.omg.CORBA.portable.ObjectImpl");

  ObjectImpl imp = (ObjectImpl) target;
  String[] ids = imp._ids();

  for (int i = 0; i < ids.length; i++)
    {
      if (ids [ i ].equals(repositoryIdentifer))
        return true;
    }
  return false;
}
 
Example 7
Project: classpath   File: OrbFunctional.java   Source Code and License Vote up 6 votes
/**
 * Create IOR for the given object references.
 */
protected IOR createIOR(Connected_objects.cObject ref)
  throws BAD_OPERATION
{
  IOR ior = new IOR();
  ior.key = ref.key;
  ior.Internet.port = ref.port;

  if (ref.object instanceof ObjectImpl)
    {
      ObjectImpl imp = (ObjectImpl) ref.object;
      if (imp._ids().length > 0)
        ior.Id = imp._ids() [ 0 ];
    }
  if (ior.Id == null)
    ior.Id = ref.object.getClass().getName();

  ior.Internet.host = CollocatedOrbs.localHost;
  ior.Internet.port = ref.port;

  return ior;
}
 
Example 8
Project: classpath   File: SimpleDelegate.java   Source Code and License Vote up 6 votes
/**
 * Check if this object can be referenced by the given repository id.
 *
 * @param target the CORBA object, must be an instance of
 * {@link org.omg.CORBA.portable.ObjectImpl}.
 *
 * @param repositoryIdentifer the repository id.
 *
 * @return true if the passed parameter is a repository id of this
 * CORBA object.
 */
public boolean is_a(org.omg.CORBA.Object target, String repositoryIdentifer)
{
  if (!(target instanceof ObjectImpl))
    throw new NO_IMPLEMENT("Supported only for org.omg.CORBA.portable.ObjectImpl");

  ObjectImpl imp = (ObjectImpl) target;
  String[] ids = imp._ids();

  for (int i = 0; i < ids.length; i++)
    {
      if (ids [ i ].equals(repositoryIdentifer))
        return true;
    }
  return false;
}