javax.rmi.CORBA
Interface Tie

All Superinterfaces:
InvokeHandler

public interface Tie
extends InvokeHandler

A Tie serves as a CORBA Servant or implementation base. It is connected to the ORB on a server side, providing the implementation of the required functionality. ORB access this implementation using InvokeHandler ._invoke(..). All such calls are finally delegated to the object, returned by getTarget().

Ties are generated from implementations (name pattern *Impl) and have the name pattern _*Impl_Tie, for instance:
rmic -keep -iiop -poa -always gnu.testlet.java.rmi.Remote.CalculatorImpl

Ties should normally be derived from the Servant. Such ties are generated by rmic compiler using -poa key. Ties can be also derived from ObjectImpl.


Method Summary
 void deactivate()
          Deactivate this Tie.
 Remote getTarget()
          Get the invocation target, where all method calls should be delegated.
 ORB orb()
          Get the ORB to that this Tie is connected.
 void orb(ORB orb)
          Connect this Tie to the given ORB.
 void setTarget(Remote target)
          Set the invocation target, where all method calls should be delegated.
 Object thisObject()
          Get the object that delegates calls to this tie.
 
Methods inherited from interface org.omg.CORBA.portable.InvokeHandler
_invoke
 

Method Detail

getTarget

Remote getTarget()
Get the invocation target, where all method calls should be delegated.

Returns:
the object, implementing methods, defined in the interface being served by this Tie.

setTarget

void setTarget(Remote target)
Set the invocation target, where all method calls should be delegated.

Parameters:
target - the object, implementing methods, defined in the interface being served by this Tie. The code, produced by a typical rmic compiler usually requires the target to be an instance of the implementation from that the Tie was generated.
Throws:
ClassCastException - if the passed parameter is not an instance of the implementation from that the Tie was generated.

orb

ORB orb()
Get the ORB to that this Tie is connected.

See Also:
Servant._orb()

orb

void orb(ORB orb)
Connect this Tie to the given ORB.


thisObject

Object thisObject()
Get the object that delegates calls to this tie.

See Also:
Servant._this_object()

deactivate

void deactivate()
                throws NoSuchObjectException
Deactivate this Tie. The tie is normally deactivated using POA mechanisms. Depending on the POA policies, it may be possible to activate the Tie again. The ties that are not derived from Servant deactivate themselves by ORB.disconnect(org.omg.CORBA.Object).

Throws:
NoSuchObjectException - if there are no objects served by this Tie, or if the these objects are already deactivated.
See Also:
POAOperations.deactivate_object(byte[])