- java.lang.Object
-
- org.omg.PortableServer.Servant
-
- Direct Known Subclasses:
- BindingIteratorPOA, DynamicImplementation, NamingContextExtPOA, NamingContextPOA, ServantActivatorPOA, ServantLocatorPOA
public abstract class Servant extends Object
Defines the nativeServant
type. In Java, theServant
type is mapped to the Javaorg.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 Constructor and Description Servant()
-
Method Summary
Methods Modifier and Type Method and Description abstract String[]
_all_interfaces(POA poa, byte[] objectId)
Used by the ORB to obtain complete type information from the servant.POA
_default_POA()
Returns the root POA from the ORB instance associated with the servant.Delegate
_get_delegate()
Gets the ORB vendor-specific implementation ofPortableServer::Servant
.Object
_get_interface_def()
Returns anInterfaceDef
object as aCORBA::Object
that defines the runtime type of theCORBA::Object
implemented by theServant
.boolean
_is_a(String repository_id)
Checks to see if the specifiedrepository_id
is present on the list returned by_all_interfaces()
or is therepository_id
for the generic CORBA Object.boolean
_non_existent()
Checks for the existence of anObject
.byte[]
_object_id()
Allows easy execution of common methods, equivalent to callingPortableServer::Current::get_object_id
.ORB
_orb()
Returns the instance of the ORB currently associated with theServant
(convenience method).POA
_poa()
Allows easy execution of common methods, equivalent toPortableServer::Current:get_POA
.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.Object
_this_object()
Allows the servant to obtain the object reference for the target CORBA object it is incarnating for that request.Object
_this_object(ORB orb)
Allows the servant to obtain the object reference for the target CORBA Object it is incarnating for that request.
-
-
-
Method Detail
-
_get_delegate
public final Delegate _get_delegate()
Gets the ORB vendor-specific implementation ofPortableServer::Servant
.- Returns:
_delegate
the ORB vendor-specific implementation ofPortableServer::Servant
.
-
_set_delegate
public 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.- Parameters:
delegate
- ORB vendor-specific implementation of thePortableServer::Servant
.
-
_this_object
public final 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
public 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.- Parameters:
orb
- ORB with which the servant is associated.- Returns:
_this_object
reference associated with the request.
-
_orb
public final ORB _orb()
Returns the instance of the ORB currently associated with theServant
(convenience method).- Returns:
orb
the instance of the ORB currently associated with theServant
.
-
_poa
public final POA _poa()
Allows easy execution of common methods, equivalent toPortableServer::Current:get_POA
.- Returns:
poa
POA 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_id
theObject
ID associated with this servant.
-
_default_POA
public 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 theServant
.
-
_is_a
public boolean _is_a(String repository_id)
Checks to see if the specifiedrepository_id
is present on the list returned by_all_interfaces()
or is therepository_id
for the generic CORBA Object.- Parameters:
repository_id
- therepository_id
to be checked in the repository list or against the id of generic CORBA objects.- Returns:
is_a
boolean indicating whether the specifiedrepository_id
is in the repository list or is same as a generic CORBA object.
-
_non_existent
public boolean _non_existent()
Checks for the existence of anObject
. TheServant
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
public Object _get_interface_def()
Returns anInterfaceDef
object as aCORBA::Object
that defines the runtime type of theCORBA::Object
implemented by theServant
. The invoker of_get_interface_def
must narrow the result to anInterfaceDef
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 theInterfaceDef
. This behavior must be supported by theDelegate
that implements theServant
.- Returns:
get_interface_def
anInterfaceDef
object as aCORBA::Object
that defines the runtime type of theCORBA::Object
implemented by theServant
.
-
_all_interfaces
public abstract String[] _all_interfaces(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.
-
-
Nederlandse vertaling
U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.
Bij voorbaat dank.
Document heeft de 11/06/2005 gemaakt, de laatste keer de 04/03/2020 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/java-api-rf-org/omg/PortableServer/Servant.html
De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.
Referenties
Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur Deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.