Java Code Examples for javax.rmi.CORBA.Stub

The following are top voted examples for showing how to use javax.rmi.CORBA.Stub. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: OpenJSharp   File: IIOPProxyImpl.java   Source Code and License 5 votes vote down vote up
@Override
public Object getOrb(Object stub) {
    try {
        return ((Stub)stub)._orb();
    } catch (org.omg.CORBA.BAD_OPERATION x) {
        throw new UnsupportedOperationException(x);
    }
}
 
Example 2
Project: jdk8u-jdk   File: IIOPProxyImpl.java   Source Code and License 5 votes vote down vote up
@Override
public Object getOrb(Object stub) {
    try {
        return ((Stub)stub)._orb();
    } catch (org.omg.CORBA.BAD_OPERATION x) {
        throw new UnsupportedOperationException(x);
    }
}
 
Example 3
Project: jdk8u_jdk   File: IIOPProxyImpl.java   Source Code and License 5 votes vote down vote up
@Override
public Object getOrb(Object stub) {
    try {
        return ((Stub)stub)._orb();
    } catch (org.omg.CORBA.BAD_OPERATION x) {
        throw new UnsupportedOperationException(x);
    }
}
 
Example 4
Project: lookaside_java-1.8.0-openjdk   File: IIOPProxyImpl.java   Source Code and License 5 votes vote down vote up
@Override
public Object getOrb(Object stub) {
    try {
        return ((Stub)stub)._orb();
    } catch (org.omg.CORBA.BAD_OPERATION x) {
        throw new UnsupportedOperationException(x);
    }
}
 
Example 5
Project: javify   File: PortableRemoteObjectDelegateImpl.java   Source Code and License 5 votes vote down vote up
/**
 * Find or create a tie for this target and mark it as being used by the given
 * object.
 */
public void exportObject(Remote obj)
  throws RemoteException
{
  if (obj instanceof Stub)
    Util.registerTarget(StubDelegateImpl.getTieFromStub((Stub) obj), obj);
  else if (obj instanceof Tie)
    {
      Tie t = (Tie) obj;
      Util.registerTarget(t, null);
    }
}
 
Example 6
Project: javify   File: StubDelegateImpl.java   Source Code and License 5 votes vote down vote up
/**
 * Compare two stubs for equality.
 */
public boolean equals(Stub self, java.lang.Object obj)
{
  if (obj instanceof ObjectImpl)
    {
      ObjectImpl other = (ObjectImpl) obj;
      Delegate d1 = other._get_delegate();
      Delegate d2 = self._get_delegate();
      if (d1 == null || d2 == null)
        return d1 == d2;
      else
        return d1.equals(d2);
    }
  else return false;
}
 
Example 7
Project: javify   File: StubDelegateImpl.java   Source Code and License 5 votes vote down vote up
/**
 * Returns the IOR reference of the connected ORB.
 *
 * @see ORB#object_to_string(org.omg.CORBA.Object);
 */
public String toString(Stub self)
{
  try
    {
      return self._orb().object_to_string(self);
    }
  catch (Exception ex)
    {
      return null;
    }
}
 
Example 8
Project: javify   File: StubDelegateImpl.java   Source Code and License 5 votes vote down vote up
/**
 * Read as CORBA object when the ORB is known. The ORB must be set under the
 * previous call of Stub.connect. The Stub is automatically registered with
 * this ORB.
 */
public void readObject(Stub self, ObjectInputStream input, ORB orb)
  throws IOException, ClassNotFoundException
{
  byte[] b = (byte[]) input.readObject();
  BufferredCdrInput in = new BufferredCdrInput(b);

  if (orb != null)
    in.setOrb(orb);

  ObjectImpl r = (ObjectImpl) in.read_Object();

  self._set_delegate(r._get_delegate());
}
 
Example 9
Project: javify   File: StubDelegateImpl.java   Source Code and License 5 votes vote down vote up
/**
 * Write as CORBA object. The ORB must be either set under the previous call
 * of Stub.connect or it is taken from the org.omg.CORBA.portable.Delegate.
 * The Stub is automatically registered with this ORB (if not already done).
 */
public void writeObject(Stub self, ObjectOutputStream output, ORB orb)
  throws IOException
{
  BufferedCdrOutput out = new BufferedCdrOutput();
  out.setOrb(orb == null ? self._orb() : orb);
  out.write_Object(self);

  output.writeObject(out.buffer.toByteArray());
}
 
Example 10
Project: javify   File: UtilDelegateImpl.java   Source Code and License 5 votes vote down vote up
/**
 * Checks if the given stub is local.
 *
 * @param stub a stub to check.
 * @return true if the stub is local, false otherwise.
 */
public boolean isLocal(Stub stub)
  throws RemoteException
{
  try
    {
      return stub._is_local();
    }
  catch (SystemException e)
    {
      RemoteException rex = new RemoteException();
      rex.initCause(e);
      throw rex;
    }
}
 
Example 11
Project: jvm-stm   File: PortableRemoteObjectDelegateImpl.java   Source Code and License 5 votes vote down vote up
/**
 * Find or create a tie for this target and mark it as being used by the given
 * object.
 */
public void exportObject(Remote obj)
  throws RemoteException
{
  if (obj instanceof Stub)
    Util.registerTarget(StubDelegateImpl.getTieFromStub((Stub) obj), obj);
  else if (obj instanceof Tie)
    {
      Tie t = (Tie) obj;
      Util.registerTarget(t, null);
    }
}
 
Example 12
Project: jvm-stm   File: StubDelegateImpl.java   Source Code and License 5 votes vote down vote up
/**
 * Compare two stubs for equality.
 */
public boolean equals(Stub self, java.lang.Object obj)
{
  if (obj instanceof ObjectImpl)
    {
      ObjectImpl other = (ObjectImpl) obj;
      Delegate d1 = other._get_delegate();
      Delegate d2 = self._get_delegate();
      if (d1 == null || d2 == null)
        return d1 == d2;
      else
        return d1.equals(d2);
    }
  else return false;
}
 
Example 13
Project: jvm-stm   File: StubDelegateImpl.java   Source Code and License 5 votes vote down vote up
/**
 * Returns the IOR reference of the connected ORB.
 * 
 * @see ORB#object_to_string(org.omg.CORBA.Object);
 */
public String toString(Stub self)
{
  try
    {
      return self._orb().object_to_string(self);
    }
  catch (Exception ex)
    {
      return null;
    }
}
 
Example 14
Project: jvm-stm   File: StubDelegateImpl.java   Source Code and License 5 votes vote down vote up
/**
 * Read as CORBA object when the ORB is known. The ORB must be set under the
 * previous call of Stub.connect. The Stub is automatically registered with
 * this ORB.
 */
public void readObject(Stub self, ObjectInputStream input, ORB orb)
  throws IOException, ClassNotFoundException
{
  byte[] b = (byte[]) input.readObject();
  BufferredCdrInput in = new BufferredCdrInput(b);

  if (orb != null)
    in.setOrb(orb);

  ObjectImpl r = (ObjectImpl) in.read_Object();

  self._set_delegate(r._get_delegate());
}
 
Example 15
Project: jvm-stm   File: StubDelegateImpl.java   Source Code and License 5 votes vote down vote up
/**
 * Write as CORBA object. The ORB must be either set under the previous call
 * of Stub.connect or it is taken from the org.omg.CORBA.portable.Delegate.
 * The Stub is automatically registered with this ORB (if not already done).
 */
public void writeObject(Stub self, ObjectOutputStream output, ORB orb)
  throws IOException
{
  BufferedCdrOutput out = new BufferedCdrOutput();
  out.setOrb(orb == null ? self._orb() : orb);
  out.write_Object(self);

  output.writeObject(out.buffer.toByteArray());
}
 
Example 16
Project: jvm-stm   File: UtilDelegateImpl.java   Source Code and License 5 votes vote down vote up
/**
 * Checks if the given stub is local.
 * 
 * @param stub a stub to check.
 * @return true if the stub is local, false otherwise.
 */
public boolean isLocal(Stub stub)
  throws RemoteException
{
  try
    {
      return stub._is_local();
    }
  catch (SystemException e)
    {
      RemoteException rex = new RemoteException();
      rex.initCause(e);
      throw rex;
    }
}
 
Example 17
Project: infobip-open-jdk-8   File: IIOPProxyImpl.java   Source Code and License 5 votes vote down vote up
@Override
public Object getOrb(Object stub) {
    try {
        return ((Stub)stub)._orb();
    } catch (org.omg.CORBA.BAD_OPERATION x) {
        throw new UnsupportedOperationException(x);
    }
}
 
Example 18
Project: jdk8u-dev-jdk   File: IIOPProxyImpl.java   Source Code and License 5 votes vote down vote up
@Override
public Object getOrb(Object stub) {
    try {
        return ((Stub)stub)._orb();
    } catch (org.omg.CORBA.BAD_OPERATION x) {
        throw new UnsupportedOperationException(x);
    }
}
 
Example 19
Project: jdk7-jdk   File: IIOPProxyImpl.java   Source Code and License 5 votes vote down vote up
@Override
public Object getOrb(Object stub) {
    try {
        return ((Stub)stub)._orb();
    } catch (org.omg.CORBA.BAD_OPERATION x) {
        throw new UnsupportedOperationException(x);
    }
}
 
Example 20
Project: openjdk-source-code-learn   File: IIOPProxyImpl.java   Source Code and License 5 votes vote down vote up
@Override
public Object getOrb(Object stub) {
    try {
        return ((Stub)stub)._orb();
    } catch (org.omg.CORBA.BAD_OPERATION x) {
        throw new UnsupportedOperationException(x);
    }
}
 
Example 21
Project: OLD-OpenJDK8   File: IIOPProxyImpl.java   Source Code and License 5 votes vote down vote up
@Override
public Object getOrb(Object stub) {
    try {
        return ((Stub)stub)._orb();
    } catch (org.omg.CORBA.BAD_OPERATION x) {
        throw new UnsupportedOperationException(x);
    }
}
 
Example 22
Project: JamVM-PH   File: PortableRemoteObjectDelegateImpl.java   Source Code and License 5 votes vote down vote up
/**
 * Find or create a tie for this target and mark it as being used by the given
 * object.
 */
public void exportObject(Remote obj)
  throws RemoteException
{
  if (obj instanceof Stub)
    Util.registerTarget(StubDelegateImpl.getTieFromStub((Stub) obj), obj);
  else if (obj instanceof Tie)
    {
      Tie t = (Tie) obj;
      Util.registerTarget(t, null);
    }
}
 
Example 23
Project: JamVM-PH   File: StubDelegateImpl.java   Source Code and License 5 votes vote down vote up
/**
 * Compare two stubs for equality.
 */
public boolean equals(Stub self, java.lang.Object obj)
{
  if (obj instanceof ObjectImpl)
    {
      ObjectImpl other = (ObjectImpl) obj;
      Delegate d1 = other._get_delegate();
      Delegate d2 = self._get_delegate();
      if (d1 == null || d2 == null)
        return d1 == d2;
      else
        return d1.equals(d2);
    }
  else return false;
}
 
Example 24
Project: JamVM-PH   File: StubDelegateImpl.java   Source Code and License 5 votes vote down vote up
/**
 * Returns the IOR reference of the connected ORB.
 * 
 * @see ORB#object_to_string(org.omg.CORBA.Object);
 */
public String toString(Stub self)
{
  try
    {
      return self._orb().object_to_string(self);
    }
  catch (Exception ex)
    {
      return null;
    }
}
 
Example 25
Project: JamVM-PH   File: StubDelegateImpl.java   Source Code and License 5 votes vote down vote up
/**
 * Read as CORBA object when the ORB is known. The ORB must be set under the
 * previous call of Stub.connect. The Stub is automatically registered with
 * this ORB.
 */
public void readObject(Stub self, ObjectInputStream input, ORB orb)
  throws IOException, ClassNotFoundException
{
  byte[] b = (byte[]) input.readObject();
  BufferredCdrInput in = new BufferredCdrInput(b);

  if (orb != null)
    in.setOrb(orb);

  ObjectImpl r = (ObjectImpl) in.read_Object();

  self._set_delegate(r._get_delegate());
}
 
Example 26
Project: JamVM-PH   File: StubDelegateImpl.java   Source Code and License 5 votes vote down vote up
/**
 * Write as CORBA object. The ORB must be either set under the previous call
 * of Stub.connect or it is taken from the org.omg.CORBA.portable.Delegate.
 * The Stub is automatically registered with this ORB (if not already done).
 */
public void writeObject(Stub self, ObjectOutputStream output, ORB orb)
  throws IOException
{
  BufferedCdrOutput out = new BufferedCdrOutput();
  out.setOrb(orb == null ? self._orb() : orb);
  out.write_Object(self);

  output.writeObject(out.buffer.toByteArray());
}
 
Example 27
Project: JamVM-PH   File: UtilDelegateImpl.java   Source Code and License 5 votes vote down vote up
/**
 * Checks if the given stub is local.
 * 
 * @param stub a stub to check.
 * @return true if the stub is local, false otherwise.
 */
public boolean isLocal(Stub stub)
  throws RemoteException
{
  try
    {
      return stub._is_local();
    }
  catch (SystemException e)
    {
      RemoteException rex = new RemoteException();
      rex.initCause(e);
      throw rex;
    }
}
 
Example 28
Project: openjdk-jdk7u-jdk   File: IIOPProxyImpl.java   Source Code and License 5 votes vote down vote up
@Override
public Object getOrb(Object stub) {
    try {
        return ((Stub)stub)._orb();
    } catch (org.omg.CORBA.BAD_OPERATION x) {
        throw new UnsupportedOperationException(x);
    }
}
 
Example 29
Project: classpath   File: PortableRemoteObjectDelegateImpl.java   Source Code and License 5 votes vote down vote up
/**
 * Find or create a tie for this target and mark it as being used by the given
 * object.
 */
public void exportObject(Remote obj)
  throws RemoteException
{
  if (obj instanceof Stub)
    Util.registerTarget(StubDelegateImpl.getTieFromStub((Stub) obj), obj);
  else if (obj instanceof Tie)
    {
      Tie t = (Tie) obj;
      Util.registerTarget(t, null);
    }
}
 
Example 30
Project: classpath   File: StubDelegateImpl.java   Source Code and License 5 votes vote down vote up
/**
 * Compare two stubs for equality.
 */
public boolean equals(Stub self, java.lang.Object obj)
{
  if (obj instanceof ObjectImpl)
    {
      ObjectImpl other = (ObjectImpl) obj;
      Delegate d1 = other._get_delegate();
      Delegate d2 = self._get_delegate();
      if (d1 == null || d2 == null)
        return d1 == d2;
      else
        return d1.equals(d2);
    }
  else return false;
}
 
Example 31
Project: classpath   File: StubDelegateImpl.java   Source Code and License 5 votes vote down vote up
/**
 * Returns the IOR reference of the connected ORB.
 *
 * @see ORB#object_to_string(org.omg.CORBA.Object);
 */
public String toString(Stub self)
{
  try
    {
      return self._orb().object_to_string(self);
    }
  catch (Exception ex)
    {
      return null;
    }
}
 
Example 32
Project: classpath   File: StubDelegateImpl.java   Source Code and License 5 votes vote down vote up
/**
 * Read as CORBA object when the ORB is known. The ORB must be set under the
 * previous call of Stub.connect. The Stub is automatically registered with
 * this ORB.
 */
public void readObject(Stub self, ObjectInputStream input, ORB orb)
  throws IOException, ClassNotFoundException
{
  byte[] b = (byte[]) input.readObject();
  BufferredCdrInput in = new BufferredCdrInput(b);

  if (orb != null)
    in.setOrb(orb);

  ObjectImpl r = (ObjectImpl) in.read_Object();

  self._set_delegate(r._get_delegate());
}
 
Example 33
Project: classpath   File: StubDelegateImpl.java   Source Code and License 5 votes vote down vote up
/**
 * Write as CORBA object. The ORB must be either set under the previous call
 * of Stub.connect or it is taken from the org.omg.CORBA.portable.Delegate.
 * The Stub is automatically registered with this ORB (if not already done).
 */
public void writeObject(Stub self, ObjectOutputStream output, ORB orb)
  throws IOException
{
  BufferedCdrOutput out = new BufferedCdrOutput();
  out.setOrb(orb == null ? self._orb() : orb);
  out.write_Object(self);

  output.writeObject(out.buffer.toByteArray());
}
 
Example 34
Project: classpath   File: UtilDelegateImpl.java   Source Code and License 5 votes vote down vote up
/**
 * Checks if the given stub is local.
 *
 * @param stub a stub to check.
 * @return true if the stub is local, false otherwise.
 */
public boolean isLocal(Stub stub)
  throws RemoteException
{
  try
    {
      return stub._is_local();
    }
  catch (SystemException e)
    {
      RemoteException rex = new RemoteException();
      rex.initCause(e);
      throw rex;
    }
}
 
Example 35
Project: openjdk-icedtea7   File: IIOPProxyImpl.java   Source Code and License 5 votes vote down vote up
@Override
public Object getOrb(Object stub) {
    try {
        return ((Stub)stub)._orb();
    } catch (org.omg.CORBA.BAD_OPERATION x) {
        throw new UnsupportedOperationException(x);
    }
}
 
Example 36
Project: tomee   File: Corbas.java   Source Code and License 5 votes vote down vote up
public static Object connect(final Object obj) throws IOException {
    if (obj instanceof Stub) {
        final Stub stub = (Stub) obj;
        final ORB orb = getORB();
        stub.connect(orb);
    }
    return obj;
}
 
Example 37
Project: OpenJSharp   File: IIOPProxyImpl.java   Source Code and License 4 votes vote down vote up
@Override
public boolean isStub(Object obj) {
    return (obj instanceof Stub);
}
 
Example 38
Project: OpenJSharp   File: IIOPProxyImpl.java   Source Code and License 4 votes vote down vote up
@Override
public Object getDelegate(Object stub) {
    return ((Stub)stub)._get_delegate();
}
 
Example 39
Project: OpenJSharp   File: IIOPProxyImpl.java   Source Code and License 4 votes vote down vote up
@Override
public void setDelegate(Object stub, Object delegate) {
    ((Stub)stub)._set_delegate((Delegate)delegate);
}
 
Example 40
Project: OpenJSharp   File: IIOPProxyImpl.java   Source Code and License 4 votes vote down vote up
@Override
public void connect(Object stub, Object orb)
    throws RemoteException
{
    ((Stub)stub).connect((ORB)orb);
}