org.omg.PortableServer
Class Servant

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by org.omg.PortableServer.Servant
Direct Known Subclasses:
BindingIteratorPOA sample code for org.omg.CosNaming.BindingIteratorPOA definition code for org.omg.CosNaming.BindingIteratorPOA , DynamicImplementation sample code for org.omg.PortableServer.DynamicImplementation definition code for org.omg.PortableServer.DynamicImplementation , NamingContextExtPOA sample code for org.omg.CosNaming.NamingContextExtPOA definition code for org.omg.CosNaming.NamingContextExtPOA , NamingContextPOA sample code for org.omg.CosNaming.NamingContextPOA definition code for org.omg.CosNaming.NamingContextPOA , ServantActivatorPOA sample code for org.omg.PortableServer.ServantActivatorPOA definition code for org.omg.PortableServer.ServantActivatorPOA , ServantLocatorPOA sample code for org.omg.PortableServer.ServantLocatorPOA definition code for org.omg.PortableServer.ServantLocatorPOA

public abstract class Servant
extends Object sample code for java.lang.Object definition code for java.lang.Object

Defines the native Servant type. In Java, the Servant type is mapped to the Java org.omg.PortableServer.Servant class. It serves as the base class for all POA servant implementations and provides a number of methods that may be invoked by the application programmer, as well as methods which are invoked by the POA itself and may be overridden by the user to control aspects of servant behavior. Based on IDL to Java spec. (CORBA V2.3.1) ptc/00-01-08.pdf.


Constructor Summary
Servant sample code for org.omg.PortableServer.Servant.Servant() definition code for org.omg.PortableServer.Servant.Servant() ()
           
 
Method Summary
abstract  String sample code for java.lang.String definition code for java.lang.String [] _all_interfaces sample code for org.omg.PortableServer.Servant._all_interfaces(org.omg.PortableServer.POA, byte[]) definition code for org.omg.PortableServer.Servant._all_interfaces(org.omg.PortableServer.POA, byte[]) (POA sample code for org.omg.PortableServer.POA definition code for org.omg.PortableServer.POA  poa, byte[] objectId)
          Used by the ORB to obtain complete type information from the servant.
 POA sample code for org.omg.PortableServer.POA definition code for org.omg.PortableServer.POA _default_POA sample code for org.omg.PortableServer.Servant._default_POA() definition code for org.omg.PortableServer.Servant._default_POA() ()
          Returns the root POA from the ORB instance associated with the servant.
 Delegate sample code for org.omg.PortableServer.portable.Delegate definition code for org.omg.PortableServer.portable.Delegate _get_delegate sample code for org.omg.PortableServer.Servant._get_delegate() definition code for org.omg.PortableServer.Servant._get_delegate() ()
          Gets the ORB vendor-specific implementation of PortableServer::Servant.
 Object sample code for org.omg.CORBA.Object definition code for org.omg.CORBA.Object _get_interface_def sample code for org.omg.PortableServer.Servant._get_interface_def() definition code for org.omg.PortableServer.Servant._get_interface_def() ()
          Returns an InterfaceDef object as a CORBA::Object that defines the runtime type of the CORBA::Object implemented by the Servant.
 boolean _is_a sample code for org.omg.PortableServer.Servant._is_a(java.lang.String) definition code for org.omg.PortableServer.Servant._is_a(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  repository_id)
          Checks to see if the specified repository_id is present on the list returned by _all_interfaces() or is the repository_id for the generic CORBA Object.
 boolean _non_existent sample code for org.omg.PortableServer.Servant._non_existent() definition code for org.omg.PortableServer.Servant._non_existent() ()
          Checks for the existence of an Object.
 byte[] _object_id sample code for org.omg.PortableServer.Servant._object_id() definition code for org.omg.PortableServer.Servant._object_id() ()
          Allows easy execution of common methods, equivalent to calling PortableServer::Current::get_object_id.
 ORB sample code for org.omg.CORBA.ORB definition code for org.omg.CORBA.ORB _orb sample code for org.omg.PortableServer.Servant._orb() definition code for org.omg.PortableServer.Servant._orb() ()
          Returns the instance of the ORB currently associated with the Servant (convenience method).
 POA sample code for org.omg.PortableServer.POA definition code for org.omg.PortableServer.POA _poa sample code for org.omg.PortableServer.Servant._poa() definition code for org.omg.PortableServer.Servant._poa() ()
          Allows easy execution of common methods, equivalent to PortableServer::Current:get_POA.
 void _set_delegate sample code for org.omg.PortableServer.Servant._set_delegate(org.omg.PortableServer.portable.Delegate) definition code for org.omg.PortableServer.Servant._set_delegate(org.omg.PortableServer.portable.Delegate) (Delegate sample code for org.omg.PortableServer.portable.Delegate definition code for org.omg.PortableServer.portable.Delegate  delegate)
          Supports the Java ORB portability interfaces by providing a method for classes that support ORB portability through delegation to set their delegate.
 Object sample code for org.omg.CORBA.Object definition code for org.omg.CORBA.Object _this_object sample code for org.omg.PortableServer.Servant._this_object() definition code for org.omg.PortableServer.Servant._this_object() ()
          Allows the servant to obtain the object reference for the target CORBA object it is incarnating for that request.
 Object sample code for org.omg.CORBA.Object definition code for org.omg.CORBA.Object _this_object sample code for org.omg.PortableServer.Servant._this_object(org.omg.CORBA.ORB) definition code for org.omg.PortableServer.Servant._this_object(org.omg.CORBA.ORB) (ORB sample code for org.omg.CORBA.ORB definition code for org.omg.CORBA.ORB  orb)
          Allows the servant to obtain the object reference for the target CORBA Object it is incarnating for that request.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

Servant sample code for org.omg.PortableServer.Servant() definition code for org.omg.PortableServer.Servant()

public Servant()
Method Detail

_get_delegate sample code for org.omg.PortableServer.Servant._get_delegate() definition code for org.omg.PortableServer.Servant._get_delegate()

public final Delegate sample code for org.omg.PortableServer.portable.Delegate definition code for org.omg.PortableServer.portable.Delegate  _get_delegate()
Gets the ORB vendor-specific implementation of PortableServer::Servant.

Returns:
_delegate the ORB vendor-specific implementation of PortableServer::Servant.

_set_delegate sample code for org.omg.PortableServer.Servant._set_delegate(org.omg.PortableServer.portable.Delegate) definition code for org.omg.PortableServer.Servant._set_delegate(org.omg.PortableServer.portable.Delegate)

public final void _set_delegate(Delegate sample code for org.omg.PortableServer.portable.Delegate definition code for org.omg.PortableServer.portable.Delegate  delegate)
Supports the Java ORB portability interfaces by providing a method for classes that support ORB portability through delegation to set their delegate.

Parameters:
delegate - ORB vendor-specific implementation of the PortableServer::Servant.

_this_object sample code for org.omg.PortableServer.Servant._this_object() definition code for org.omg.PortableServer.Servant._this_object()

public final Object sample code for org.omg.CORBA.Object definition code for org.omg.CORBA.Object  _this_object()
Allows the servant to obtain the object reference for the target CORBA object it is incarnating for that request.

Returns:
this_object Object reference associated with the request.

_this_object sample code for org.omg.PortableServer.Servant._this_object(org.omg.CORBA.ORB) definition code for org.omg.PortableServer.Servant._this_object(org.omg.CORBA.ORB)

public final Object sample code for org.omg.CORBA.Object definition code for org.omg.CORBA.Object  _this_object(ORB sample code for org.omg.CORBA.ORB definition code for org.omg.CORBA.ORB  orb)
Allows the servant to obtain the object reference for the target CORBA Object it is incarnating for that request.

Parameters:
orb - ORB with which the servant is associated.
Returns:
_this_object reference associated with the request.

_orb sample code for org.omg.PortableServer.Servant._orb() definition code for org.omg.PortableServer.Servant._orb()

public final ORB sample code for org.omg.CORBA.ORB definition code for org.omg.CORBA.ORB  _orb()
Returns the instance of the ORB currently associated with the Servant (convenience method).

Returns:
orb the instance of the ORB currently associated with the Servant.

_poa sample code for org.omg.PortableServer.Servant._poa() definition code for org.omg.PortableServer.Servant._poa()

public final POA sample code for org.omg.PortableServer.POA definition code for org.omg.PortableServer.POA  _poa()
Allows easy execution of common methods, equivalent to PortableServer::Current:get_POA.

Returns:
poa POA associated with the servant.

_object_id sample code for org.omg.PortableServer.Servant._object_id() definition code for org.omg.PortableServer.Servant._object_id()

public final byte[] _object_id()
Allows easy execution of common methods, equivalent to calling PortableServer::Current::get_object_id.

Returns:
object_id the Object ID associated with this servant.

_default_POA sample code for org.omg.PortableServer.Servant._default_POA() definition code for org.omg.PortableServer.Servant._default_POA()

public POA sample code for org.omg.PortableServer.POA definition code for org.omg.PortableServer.POA  _default_POA()
Returns the root POA from the ORB instance associated with the servant. Subclasses may override this method to return a different POA.

Returns:
default_POA the POA associated with the Servant.

_is_a sample code for org.omg.PortableServer.Servant._is_a(java.lang.String) definition code for org.omg.PortableServer.Servant._is_a(java.lang.String)

public boolean _is_a(String sample code for java.lang.String definition code for java.lang.String  repository_id)
Checks to see if the specified repository_id is present on the list returned by _all_interfaces() or is the repository_id for the generic CORBA Object.

Parameters:
repository_id - the repository_id to be checked in the repository list or against the id of generic CORBA objects.
Returns:
is_a boolean indicating whether the specified repository_id is in the repository list or is same as a generic CORBA object.

_non_existent sample code for org.omg.PortableServer.Servant._non_existent() definition code for org.omg.PortableServer.Servant._non_existent()

public boolean _non_existent()
Checks for the existence of an Object. The Servant provides a default implementation of _non_existent() that can be overridden by derived servants.

Returns:
non_existent true if that object does not exist, false otherwise.

_get_interface_def sample code for org.omg.PortableServer.Servant._get_interface_def() definition code for org.omg.PortableServer.Servant._get_interface_def()

public Object sample code for org.omg.CORBA.Object definition code for org.omg.CORBA.Object  _get_interface_def()
Returns an InterfaceDef object as a CORBA::Object that defines the runtime type of the CORBA::Object implemented by the Servant. The invoker of _get_interface_def must narrow the result to an InterfaceDef in order to use it.

This default implementation of _get_interface_def() can be overridden by derived servants if the default behavior is not adequate. As defined in the CORBA 2.3.1 specification, section 11.3.1, the default behavior of _get_interface_def() is to use the most derived interface of a static servant or the most derived interface retrieved from a dynamic servant to obtain the InterfaceDef. This behavior must be supported by the Delegate that implements the Servant.

Returns:
get_interface_def an InterfaceDef object as a CORBA::Object that defines the runtime type of the CORBA::Object implemented by the Servant.

_all_interfaces sample code for org.omg.PortableServer.Servant._all_interfaces(org.omg.PortableServer.POA, byte[]) definition code for org.omg.PortableServer.Servant._all_interfaces(org.omg.PortableServer.POA, byte[])

public abstract String sample code for java.lang.String definition code for java.lang.String [] _all_interfaces(POA sample code for org.omg.PortableServer.POA definition code for org.omg.PortableServer.POA  poa,
                                         byte[] objectId)
Used by the ORB to obtain complete type information from the servant.

Parameters:
poa - POA with which the servant is associated.
objectId - is the id corresponding to the object associated with this servant.
Returns:
list of type information for the object.