Previous | Table of Contents | Next |
This specification defines a native type PortableServer::Servant. Values of the type Servant are programming-language-specific
implementations of CORBA interfaces. Each language mapping must specify how Servant is mapped to the programming language
data type that corresponds to an object implementation. The Servant type has the following characteristics and constraints.
• Values of type Servant are opaque from the perspective of CORBA application programmers. There are no operations that can be performed directly on them by user programs. They can be passed as parameters to certain POA operations. Some language mappings may allow Servant values to be implicitly converted to object references under appropriate conditions.
• Values of type Servant support a language-specific programming interface that can be used by the ORB to obtain a default POA for that servant. This interface is used only to support implicit activation. A language mapping may provide a default implementation of this interface that returns the root POA of a default ORB.
• Values of type Servant provide default implementations of the standard object reference operations get_interface, is_a, and non_existent. These operations can be overridden by the programmer to provide additional behavior needed by the object implementation. The default implementations of get_interface and is_a operations use the most derived interface of a static servant or the most derived interface retrieved from a dynamic servant to perform the operation. The default implementation of the non_existent operation returns FALSE. These operations are invoked by the POA just like any other operation invocation, so the PortableServer::Current interface and any language-mapping-provided method of accessing the invocation context are available.
• Values of type Servant must be testable for identity.
• Values of type Servant have no meaning outside of the process context or address space in which they are generated.