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

The following are Jave code examples for showing how to use _set_delegate 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.
+ Save this method
Example 1
Project: javify   File: OrbFunctional.java   View Source Code Vote up 6 votes
/**
 * Prepare object for connecting it to this ORB.
 *
 * @param object the object being connected.
 *
 * @throws BAD_PARAM if the object does not implement the
 * {@link InvokeHandler}).
 */
protected void prepareObject(org.omg.CORBA.Object object, IOR ior)
  throws BAD_PARAM
{
  /*
   * if (!(object instanceof InvokeHandler)) throw new
   * BAD_PARAM(object.getClass().getName() + " does not implement
   * InvokeHandler. " );
   */

  // If no delegate is set, set the default delegate.
  if (object instanceof ObjectImpl)
    {
      ObjectImpl impl = (ObjectImpl) object;
      try
        {
          if (impl._get_delegate() == null)
            impl._set_delegate(new SimpleDelegate(this, ior));
        }
      catch (BAD_OPERATION ex)
        {
          // Some colaborants may throw this exception.
          impl._set_delegate(new SimpleDelegate(this, ior));
        }
    }
}
 
Example 2
Project: jvm-stm   File: OrbFunctional.java   View Source Code Vote up 6 votes
/**
 * Prepare object for connecting it to this ORB.
 *
 * @param object the object being connected.
 *
 * @throws BAD_PARAM if the object does not implement the
 * {@link InvokeHandler}).
 */
protected void prepareObject(org.omg.CORBA.Object object, IOR ior)
  throws BAD_PARAM
{
  /*
   * if (!(object instanceof InvokeHandler)) throw new
   * BAD_PARAM(object.getClass().getName() + " does not implement
   * InvokeHandler. " );
   */

  // If no delegate is set, set the default delegate.
  if (object instanceof ObjectImpl)
    {
      ObjectImpl impl = (ObjectImpl) object;
      try
        {
          if (impl._get_delegate() == null)
            impl._set_delegate(new SimpleDelegate(this, ior));
        }
      catch (BAD_OPERATION ex)
        {
          // Some colaborants may throw this exception.
          impl._set_delegate(new SimpleDelegate(this, ior));
        }
    }
}
 
Example 3
Project: JamVM-PH   File: OrbFunctional.java   View Source Code Vote up 6 votes
/**
 * Prepare object for connecting it to this ORB.
 *
 * @param object the object being connected.
 *
 * @throws BAD_PARAM if the object does not implement the
 * {@link InvokeHandler}).
 */
protected void prepareObject(org.omg.CORBA.Object object, IOR ior)
  throws BAD_PARAM
{
  /*
   * if (!(object instanceof InvokeHandler)) throw new
   * BAD_PARAM(object.getClass().getName() + " does not implement
   * InvokeHandler. " );
   */

  // If no delegate is set, set the default delegate.
  if (object instanceof ObjectImpl)
    {
      ObjectImpl impl = (ObjectImpl) object;
      try
        {
          if (impl._get_delegate() == null)
            impl._set_delegate(new SimpleDelegate(this, ior));
        }
      catch (BAD_OPERATION ex)
        {
          // Some colaborants may throw this exception.
          impl._set_delegate(new SimpleDelegate(this, ior));
        }
    }
}
 
Example 4
Project: classpath   File: OrbFunctional.java   View Source Code Vote up 6 votes
/**
 * Prepare object for connecting it to this ORB.
 *
 * @param object the object being connected.
 *
 * @throws BAD_PARAM if the object does not implement the
 * {@link InvokeHandler}).
 */
protected void prepareObject(org.omg.CORBA.Object object, IOR ior)
  throws BAD_PARAM
{
  /*
   * if (!(object instanceof InvokeHandler)) throw new
   * BAD_PARAM(object.getClass().getName() + " does not implement
   * InvokeHandler. " );
   */

  // If no delegate is set, set the default delegate.
  if (object instanceof ObjectImpl)
    {
      ObjectImpl impl = (ObjectImpl) object;
      try
        {
          if (impl._get_delegate() == null)
            impl._set_delegate(new SimpleDelegate(this, ior));
        }
      catch (BAD_OPERATION ex)
        {
          // Some colaborants may throw this exception.
          impl._set_delegate(new SimpleDelegate(this, ior));
        }
    }
}
 
Example 5
Project: javify   File: OrbFunctional.java   View Source Code Vote up 5 votes
/**
 * Convert ior reference to CORBA object.
 */
public org.omg.CORBA.Object ior_to_object(IOR ior)
{
  org.omg.CORBA.Object object = find_local_object(ior);
  if (object == null)
    {
      // Check maybe the local object on another ORB, but same VM.
      object = CollocatedOrbs.searchLocalObject(ior);
      if (object == null)
        {
          // Surely remote object.
          ObjectImpl impl = StubLocator.search(this, ior);
          try
            {
              if (impl._get_delegate() == null)
                impl._set_delegate(new IorDelegate(this, ior));
            }
          catch (BAD_OPERATION ex)
            {
              // Some colaborants may throw this exception
              // in response to the attempt to get the unset delegate.
              impl._set_delegate(new IorDelegate(this, ior));
            }

          object = impl;
        }
    }
  return object;
}
 
Example 6
Project: jvm-stm   File: OrbFunctional.java   View Source Code Vote up 5 votes
/**
 * Convert ior reference to CORBA object.
 */
public org.omg.CORBA.Object ior_to_object(IOR ior)
{
  org.omg.CORBA.Object object = find_local_object(ior);
  if (object == null)
    {
      // Check maybe the local object on another ORB, but same VM.
      object = CollocatedOrbs.searchLocalObject(ior);
      if (object == null)
        {
          // Surely remote object.
          ObjectImpl impl = StubLocator.search(this, ior);
          try
            {
              if (impl._get_delegate() == null)
                impl._set_delegate(new IorDelegate(this, ior));
            }
          catch (BAD_OPERATION ex)
            {
              // Some colaborants may throw this exception
              // in response to the attempt to get the unset delegate.
              impl._set_delegate(new IorDelegate(this, ior));
            }

          object = impl;
        }
    }
  return object;
}
 
Example 7
Project: JamVM-PH   File: OrbFunctional.java   View Source Code Vote up 5 votes
/**
 * Convert ior reference to CORBA object.
 */
public org.omg.CORBA.Object ior_to_object(IOR ior)
{
  org.omg.CORBA.Object object = find_local_object(ior);
  if (object == null)
    {
      // Check maybe the local object on another ORB, but same VM.
      object = CollocatedOrbs.searchLocalObject(ior);
      if (object == null)
        {
          // Surely remote object.
          ObjectImpl impl = StubLocator.search(this, ior);
          try
            {
              if (impl._get_delegate() == null)
                impl._set_delegate(new IorDelegate(this, ior));
            }
          catch (BAD_OPERATION ex)
            {
              // Some colaborants may throw this exception
              // in response to the attempt to get the unset delegate.
              impl._set_delegate(new IorDelegate(this, ior));
            }

          object = impl;
        }
    }
  return object;
}
 
Example 8
Project: classpath   File: OrbFunctional.java   View Source Code Vote up 5 votes
/**
 * Convert ior reference to CORBA object.
 */
public org.omg.CORBA.Object ior_to_object(IOR ior)
{
  org.omg.CORBA.Object object = find_local_object(ior);
  if (object == null)
    {
      // Check maybe the local object on another ORB, but same VM.
      object = CollocatedOrbs.searchLocalObject(ior);
      if (object == null)
        {
          // Surely remote object.
          ObjectImpl impl = StubLocator.search(this, ior);
          try
            {
              if (impl._get_delegate() == null)
                impl._set_delegate(new IorDelegate(this, ior));
            }
          catch (BAD_OPERATION ex)
            {
              // Some colaborants may throw this exception
              // in response to the attempt to get the unset delegate.
              impl._set_delegate(new IorDelegate(this, ior));
            }

          object = impl;
        }
    }
  return object;
}