Package org.omg.PortableServer
Class Servant
java.lang.Object
org.omg.PortableServer.Servant
- Direct Known Subclasses:
AbstractInterfaceDefPOA,ActivatorPOA,AliasDefPOA,ArrayDefPOA,AttributeDefPOA,BindingIteratorPOA,ComponentDefPOA,ConstantDefPOA,ConsumesDefPOA,ContainedPOA,ContainerPOA,ContainerPOA,DynamicImplementation,DynAnyFactoryPOA,DynAnyPOA,DynArrayPOA,DynEnumPOA,DynFixedPOA,DynSequencePOA,DynStructPOA,DynUnionPOA,DynValueBoxPOA,DynValueCommonPOA,DynValuePOA,EmitsDefPOA,EnumDefPOA,EventDefPOA,EventPortDefPOA,ExceptionDefPOA,ExtAbstractInterfaceDefPOA,ExtAttributeDefPOA,ExtInterfaceDefPOA,ExtLocalInterfaceDefPOA,ExtValueDefPOA,FactoryDefPOA,FinderDefPOA,FixedDefPOA,HomeDefPOA,IDLTypePOA,InitialNameServicePOA,InterfaceAttrExtensionPOA,InterfaceDefPOA,IRObjectPOA,LocalInterfaceDefPOA,LocatorPOA,ModuleDefPOA,ModuleDefPOA,NamingContextExtPOA,NamingContextPOA,NativeDefPOA,OperationDefPOA,PrimitiveDefPOA,ProvidesDefPOA,PublishesDefPOA,ReflectiveTie,RepositoryPOA,RepositoryPOA,RepositoryPOA,SequenceDefPOA,ServantActivatorPOA,ServantLocatorPOA,ServerManagerPOA,ServerPOA,StringDefPOA,StructDefPOA,TypedefDefPOA,UnionDefPOA,UsesDefPOA,ValueBoxDefPOA,ValueDefPOA,ValueMemberDefPOA,WstringDefPOA
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract String[]_all_interfaces(POA poa, byte[] objectId) Used by the ORB to obtain complete type information from the servant.Returns the root POA from the ORB instance associated with the servant.final DelegateGets the ORB vendor-specific implementation ofPortableServer::Servant.Returns anInterfaceDefobject as aCORBA::Objectthat defines the runtime type of theCORBA::Objectimplemented by theServant.booleanChecks to see if the specifiedrepository_idis present on the list returned by_all_interfaces()or is therepository_idfor the generic CORBA Object.booleanChecks for the existence of anObject.final byte[]Allows easy execution of common methods, equivalent to callingPortableServer::Current::get_object_id.final ORB_orb()Returns the instance of the ORB currently associated with theServant(convenience method).final POA_poa()Allows easy execution of common methods, equivalent toPortableServer::Current:get_POA.final void_set_delegate(Delegate delegate) Supports the Java ORB portability interfaces by providing a method for classes that support ORB portability through delegation to set their delegate.final ObjectAllows the servant to obtain the object reference for the target CORBA object it is incarnating for that request.final Object_this_object(ORB orb) Allows the servant to obtain the object reference for the target CORBA Object it is incarnating for that request.
-
Constructor Details
-
Servant
public Servant()
-
-
Method Details
-
_get_delegate
Gets the ORB vendor-specific implementation ofPortableServer::Servant.- Returns:
_delegatethe ORB vendor-specific implementation ofPortableServer::Servant.
-
_set_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 thePortableServer::Servant.
-
_this_object
Allows the servant to obtain the object reference for the target CORBA object it is incarnating for that request.- Returns:
this_objectObjectreference associated with the request.
-
_this_object
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_objectreference associated with the request.
-
_orb
Returns the instance of the ORB currently associated with theServant(convenience method).- Returns:
orbthe instance of the ORB currently associated with theServant.
-
_poa
Allows easy execution of common methods, equivalent toPortableServer::Current:get_POA.- Returns:
poaPOA associated with the servant.
-
_object_id
public final byte[] _object_id()Allows easy execution of common methods, equivalent to callingPortableServer::Current::get_object_id.- Returns:
object_idtheObjectID associated with this servant.
-
_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_POAthe POA associated with theServant.
-
_is_a
Checks to see if the specifiedrepository_idis present on the list returned by_all_interfaces()or is therepository_idfor the generic CORBA Object.- Parameters:
repository_id- therepository_idto be checked in the repository list or against the id of generic CORBA objects.- Returns:
is_aboolean indicating whether the specifiedrepository_idis in the repository list or is same as a generic CORBA object.
-
_non_existent
public boolean _non_existent()Checks for the existence of anObject. TheServantprovides a default implementation of_non_existent()that can be overridden by derived servants.- Returns:
non_existenttrueif that object does not exist,falseotherwise.
-
_get_interface_def
Returns anInterfaceDefobject as aCORBA::Objectthat defines the runtime type of theCORBA::Objectimplemented by theServant. The invoker of_get_interface_defmust narrow the result to anInterfaceDefin 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 theInterfaceDef. This behavior must be supported by theDelegatethat implements theServant.- Returns:
get_interface_defanInterfaceDefobject as aCORBA::Objectthat defines the runtime type of theCORBA::Objectimplemented by theServant.
-
_all_interfaces
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.
-