javax.rmi.CORBA

Interface Tie

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 {@link InvokeHandler} ._invoke(..). All such calls are finally delegated to the object, returned by {@link #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 {@link org.omg.PortableServer.Servant}. Such ties are generated by rmic compiler using -poa key. Ties can be also derived from {@link org.omg.CORBA_2_3.portable.ObjectImpl}.

Method Summary
voiddeactivate()
Deactivate this Tie.
RemotegetTarget()
Get the invocation target, where all method calls should be delegated.
ORBorb()
Get the ORB to that this Tie is connected.
voidorb(ORB orb)
Connect this Tie to the given ORB.
voidsetTarget(Remote target)
Set the invocation target, where all method calls should be delegated.
ObjectthisObject()
Get the object that delegates calls to this tie.

Method Detail

deactivate

public void deactivate()
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 {@link org.omg.PortableServer.Servant} deactivate themselves by {@link ORB#disconnect}.

Throws: NoSuchObjectException if there are no objects served by this Tie, or if the these objects are already deactivated.

See Also: POAOperations

getTarget

public 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.

orb

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

See Also: Servant

orb

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

setTarget

public 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.

thisObject

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

See Also: _this_object