•
|
When the find_POA method is called with an activate parameter set to TRUE.
|
CORBA::Boolean unknown_adapter(
PortableServer::POA_ptr
parent, const char*
name);
This structure is used to specify options to the _bind method, described in
“Object” on page 17. Each process has a global
BindOptions structure that is used for all
_bind invocations that do not specify bind options. You can modify the default bind options using the
Object::_default_bind_options method.
The corba.h file should be included when you use this structure.
If set to TRUE, the establishment of the connection between client and the object implementation is delayed until the first client operation is issued.
If set to FALSE, the
_bind method should establishes the connection immediately.
If set to TRUE and the connection is lost, due to a network failure or some other error, the VisiBroker ORB attempts to re-establish a connection to a suitable object implementation.
If set to FALSE, no attempt is made to reconnect the client with the object implementation.
The default value of 0 (zero) indicates that the client is to block indefinitely.
The default value of 0 (zero) indicates that the client is to block indefinitely.
The default value of 0 indicates that the default system time-out for connections is to be used.
The BOA class represents the Basic Object Adaptor and provides methods for creating and manipulating objects and object references. Object servers use the BOA to activate and deactivate object implementations and to specify the thread policy they wish to use.
You do not instantiate a BOA object. Instead, you obtain a reference to a
BOA object by invoking the
ORB::BOA_init method.
Include the file corba.h when you use this class.
CORBA::Object_ptr create(const CORBA::ReferenceData&
refData, extension::CreationImplDef&
creationImplDef)
void deactivate_impl(extension::ImplementationDef_ptr
implDefPtr)
The method deactivates the implementation specified by implDefPtr. Once this method is called, no further client requests are delivered to the object within this implementation until the objects and implementation are re-activated. To cause the implementation to again accept requests, call
impl_is_ready or
obj_is_ready.
|
|
|
This pointer's true type is CreationImplDef. It provides the interface name, object name, path name of the executable and activation policy, along with other parameters.
|
void deactivate_obj(CORBA::Object_ptr
objPtr)
This method requests that the BOA deactivate the specified object. Once this method is invoked, the
BOA does not deliver any requests to the object until
obj_is_ready or
impl_is_ready is invoked.
This static method duplicates the BOA pointer that is passed in as a parameter.
This method provides backward compatibility with earlier releases of VisiBroker for C++. It invokes BOA::shutdown, described in
“void shutdown()” on page 12 which causes a previous invocation of the
impl_is_ready method to return. This method cannot be invoked in the context of an active request.
This method returns the Principal object associated with the specified object. This method may only be called by an object implementation during the processing of a client operation request.
void impl_is_ready(const char
*service_name,
extension::Activator_ptr
activator,
CORBA::Boolean
block = 1)
This method instructs the BOA to delay activation of the object implementation associated with the specified service_name until a client requests the service. Once a client requests the service, the specified
Activator object is used to activate the object implementation. If
block is set to
0, this method blocks the caller until the
exit_impl_ready method is invoked.
void impl_
is_ready(extension::ImplementationDef_ptr
impl=NULL)
This method notifies the BOA that one or more objects in the server are ready to receive service requests. This method blocks the caller until the exit_impl_ready method is invoked. If all objects that the implementation offers were created through C++ instantiation and activated using the
obj_is_ready method, do not specify the
ImplementationDef_ptr.
|
|
|
This pointer's true type is ActivationImplDef and provides the interface name, object name, path name of the executable and activation policy, along with other parameters.
|
This static method returns a NULL BOA pointer that can be used for initialization purposes.
void obj_is_ready(CORBA::Object_ptr
obj,
extension::ImplementationDef_ptr
impl_ptr = NULL)
This method causes a previous invocation of the impl_is_ready method to return. This method cannot be invoked in the context of an active request.
void dispose(CORBA::Object_ptr objPtr)
void connection_max(CORBA::ULong
max_conn)
void thread_max(CORBA::ULong
max)
This method sets the maximum number of threads allowed when the TPool thread policy has been selected. If the current number of threads exceeds
this number, the extra threads are destroyed one at a time as soon as they are no longer in use until the number of threads is down to
max.
void thread_stack_size(CORBA::ULong
size)
The Context class contains information about a client application's environment that is passed to a server as an implicit parameter during static or dynamic method invocations. It can be used to communicate special information that needs to be associated with a request, but is not part of the method's argument list.
The Context class consists of a list of properties, stored as name-value pairs, and provides methods for setting and manipulating those properties. A
Context contains an NVList object and chains the name-value pairs together.
A Context_var class is also available and provides simpler memory management semantics.
Include the corba.h file when you use this class.
void create_child(const char *
name,
CORBA::Context_out context_ptr);
void delete_values(const char
*name);
void get_values(const char
*start_scope, CORBA::Flags flag, const char
*name, CORBA::NVList_out NVList_ptr);
This method searches the Context object hierarchy and retrieves one or more of the name/value pairs specified by the name parameter. If the name parameter has a trailing wildcard character (*), then all matching properties and their values are returned. It then creates an
NVList object and places the name/value pairs in the
NVList. If the name parameter is an empty string or a NULL string, the BAD_PARAM standard system exception is raised. If the name parameter is not found, the BAD_CONTEXT standard system exception is raised and no property list is returned.
The start_scope parameter specifies the name of the context where the search begins. If the property is not found, the search continues up the
Context object hierarchy until a match is found, or until there are no more
Context objects to search. If the
start_scope parameter is omitted, the search begins with the specified context object.
|
|
|
The name of the Context object at which to start the search. If set to CORBA::Context::_nil(), the search begins with the current Context. To restrict the search scope can to just the current Context, specify CORBA::CTX_RESTRICT_SCOPE.
|
|
|
|
|
|
|
This method returns a NULL Context_ptr suitable for initialization purposes.
This method returns a pointer to the parent Context. If there is no parent
Context, a
NULL value is returned.
static void _release(CORBA::Context_ptr
ctx);
This static method releases the specified Context object. Once the object's reference count reaches zero, the object is automatically deleted.
void set_one_value(const char *name, const CORBA::Any& anAny);
void set_values(CORBA::NVList_ptr
_list);
This method adds one or more properties to this object, using the name/value pairs specified in the NVList. When you create the
NVList object to be used as an input parameter to this method, you must set the
Flags field to zero and each
Any object added to the
NVList must have its
TypeCode set to
TC_string. For more information on the
NVList class, see
“Dynamic interfaces and classes”.
class PortableServer::Current : public CORBA::Current
This class provides methods with access to the identity of the object on which the method was called. The Current class provides support for servants which implement multiple objects but can be used within the context of POA-dispatched method invocations on any servant.
This method returns the ObjectId which identifies the object in whose context it was called. If this method is called from outside the context of a POA-dispatched method, a
NoContext exception is raised.
The Exception class is the base class of the system exception and user exception classes. For more information, see
“SystemException” on page 45.
You should include the corba.h file when using this class.
All ORB objects are derived from the Object class, which provides methods for binding clients to objects and manipulating object references as well as querying and setting an object's state.
Object class methods are implemented by the ORB.
You should include the file corba.h when using this class.
void _create_request(CORBA::Context_ptr
ctx, const char
*operation, CORBA::NVList_ptr
arg_list, CORBA::NamedValue_ptr
result, CORBA::Request_out
request, CORBA::Flags
req_flags);
This method creates a Request for an object implementation that is suitable for invocation with the Dynamic Invocation Interface.
void _create_request(
CORBA::Context_ptr
ctx,
const char
*operation,
CORBA::NVList_ptr
arg_list,
CORBA::NamedValue_ptr
result,
CORBA::ExceptionList_ptr
eList,
CORBA::ContextList_ptr
ctxList,
CORBA::Request_out
request,
CORBA::Flags
req_flags);
This method creates a Request for an object implementation that is suitable for invocation with the Dynamic Invocation Interface.
This static method duplicates the specified Object_ptr and returns a pointer to the object. The object's reference count is increased by one.
This method returns TRUE if this object implements the interface associated with the repository id. Otherwise,
it returns FALSE.
This method returns TRUE if the specified object pointer and this object point to the same object implementation. Otherwise,
it returns FALSE.
This static method returns a NULL pointer suitable for initialization purposes.
This method returns TRUE if the object represented by this object reference no longer exists.
This method creates a Request suitable for invoking methods on this object. A pointer to the
Request object is returned. See
“Dynamic interfaces and classes” for more information.
Your client application can invoke this method on an object reference to resolve the server-side interface with the specified service identifier. This method causes the ORB::
_resolve_initial_references method to be invoked on the server-side to resolve the specified service. This method returns an object reference which your client can narrow to the appropriate server type.
void _bind_options(const CORBA::BindOptions&
opt);
static CORBA::Object_ptr _bind_to_object(
const char
*rep_id,
const char
*object_name=NULL,
const char
*host_name=NULL,
const CORBA::BindOptions
*options=NULL,
CORBA::ORB_ptr
orb=NULL);
This method attempts to bind to the object with the specified repository_id and
object_name on the specified host using the specified
BindOptions and
ORB.
static void _default_bind_options(
const CORBA::BindOptions&
bindOptions);
This method sets the bind options to be used by default for all _bind invocations that do not specify their own bind options. For more information, see
“BindOptions” on page 7.
This method returns FALSE if the client process has established a connection to an object implementation.
This method returns TRUE if the object implementation resides within the same process or address space as the client application.
This method returns TRUE if this object is a persistent object. A
FALSE value returned is not an authoritative answer that the object is not persistent.
This method returns TRUE if the object implementation resides in a different process or address space than the client application. The client and object implementation may or may not reside on the same host.
The ORB class provides an interface to the Object Request Broker. It provides methods to the client object, independent of the particular
Object or Object Adaptor.
You should include the file corba.h when using this class.
This static method dynamically creates a TypeCode for the alias with the specified type and name.
This static method dynamically creates a TypeCode for an enumeration with the specified type and members.
void create_environment(CORBA::Environment_out
env);
static CORBA::TypeCode_ptr create_exception_tc(
const char
*repository_id,
const char
*type_name,
const CORBA::StructMemberSeq&
members);
This static method dynamically creates a TypeCode for an exception with the specified type and members.
This static method dynamically creates a TypeCode for the interface with the specified type.
void create_list(
CORBA::Long
num, CORBA::NVList_out
nvList);
This method creates an NVList with the specified number of elements and returns a reference to the list.
void create_named_value(CORBA::NamedValue_out
value);
void create_operation_list(CORBA::OperationDef_ptr
opDefPtr, CORBA::NVList_out
nvList);
This static method dynamically creates a TypeCode for a recursive sequence. The result of this method can be used to create other types. The offset parameter determines which enclosing
TypeCode describes the elements of this sequence.
static CORBA::TypeCode_ptr create_struct_tc(
const char
*repository_id, const char
*type_name, const CORBA::StructMemberSeq&
members);
This static method dynamically creates a TypeCode for the structure with the specified type and members.
static CORBA::TypeCode_ptr create_union_tc(
const char
*repository_id,
const char
*type_name,
CORBA::TypeCode_ptr
discriminator_type,
const CORBA::UnionMemberSeq&
members);
This static method dynamically creates a TypeCode for a union with the specified type, discriminator and members.
CORBA::Status get_default_context(
CORBA::Context_ptr& contextPtr);
This method returns the default per-process Context maintained by VisiBroker. The default Context is often used in constructing DII requests. For more information, go to
“Context” on page 14.
This method blocks waiting for the response associated with a deferred request. You can use the ORB::poll_next_response method to determine if there is a response waiting to be received before you call this method.
char *object_to_string(CORBA::Object_ptr
obj);
CORBA::BOA_ptr ORB::BOA_init(
int& argc, char *const
*argv,
const char
*boa_identifier = (char *)NULL);
This ORB method returns a handle to the BOA and specifies optional networking parameters. The
argc and
argv parameters are the same parameters passed to the object implementation process when it is started.
This method initializes the ORB and is used by both clients and object implementations. It returns a pointer to the ORB that can be used to invoke ORB methods. The argc and
argv parameters passed to the application's main function can be passed directly to this method. Arguments accepted by this method take the form of name-value pairs so that they can be distinguished from other command line arguments.
This method returns TRUE if a response to a deferred request was received, otherwise
FALSE is returned. This call does not block.
This method resolves one of the names returned by the ORB::list_initial_services method, described in
“ObjectIdList *list_initial_services();” on page 25, to its corresponding implementation object. The resolved object which is returned can then be narrowed to the appropriate server type. If the specified service cannot be found, an
InvalidName exception is raised.
void register_initial_reference (const char *
identifier, CORBA::Object_ptr
obj);
void send_multiple_requests_deferred(const CORBA::RequestSeq&
req);
void send_multiple_requests_oneway(const CORBA::RequestSeq&
req);
This static method returns a NULL ORB pointer suitable for initialization purposes.
static void shutdown(CORBA::Boolean
wait_for_completion=0);
This method causes a previous invocation of the impl_is_ready method to return. All object adapters are shut down and associated memory is freed. If the
wait_for_completion parameter is
TRUE, this operation blocks until the shutdown is complete. If an application does this in a thread that is currently servicing an invocation, the
BAD_INV_ORDER system exception is raised. If the
wait_for_completion parameter is
FALSE, then shutdown may not have completed upon return.
CORBA::Object_ptr bind(
const char *
rep_id,
const char
*object_name =
(const char*)NULL, const char
*host_name =
(const char*)NULL, CORBA::BindOptions
*opt =
(CORBA::BindOptions*)NULL);
void connection_max(CORBA::ULong
max_conn)
class PortableServer::POA
This method generates an object id and returns it. The object id and the specified _p_servant are entered into the Active Object Map. If the
UNIQUE_ID policy is present with the POA and the specified
_p_servant is already in the Active Object Map, then a
ServantAlreadyActive exception is raised.
This method requires that the SYSTEM_ID and
RETAIN policies be present with the POA; otherwise, a
WrongPolicy exception is raised.
|
|
|
The Servant to be entered into the Active Object Map.
|
void activate_object_with_id(
const PortableServer::ObjectId&
_oid, PortableServer::Servant
_p_servant);
This method attempts to activate the specified _oid and to associate it with the specified
_p_servant in the Active Object Map. If the
_oid already has a servant bound to it in the Active Object Map, then an
ObjectAlreadyActive exception is raised. If the POA has the
UNIQUE_ID policy present and the
_p_servant is already in the Active Object map, then a
ServantAlreadyActive exception is raised.
If the POA has the SYSTEM_ID policy present and it detects that the
_oid was not generated by the system or for the POA, then this method raises a
BAD_PARAM system exception.
This method requires that the RETAIN policy be present with the POA; otherwise, a
WrongPolicy exception is raised.
|
|
|
|
|
The Servant to be entered into the Active Object Map.
|
This method returns a pointer to an ImplicitActivationPolicy object with the specified
_value. The application is responsible for calling the inherited destroy method on the
Policy object after the
Policy object is no longer needed.
If no ImplicitActivationPolicy is specified at POA creation, then the default is
NO_IMPLICIT_ACTIVATION.
|
|
|
If set to IMPLICIT_ACTIVATION, the POA implicitly activates servants: also requires SYSTEM_ID and RETAIN policies. If set to NO_IMPLICIT_ACTIVATION, the POA will not implicitly activate servants.
|
This method creates and returns an object reference that encapsulates a POA-generated ObjectId and the specified
_intf values. The
_intf, which may be null, becomes the
type_id of the generated object reference. This method does not cause an activation to take place. Undefined behavior results if the
_intf value does not identify the most derived interface of the object or one of its base interfaces. The
ObjectId may be obtained by invoking the
POA::reference_to_id method on the returned Object.
This method requires that the RETAIN policy be present with the POA; otherwise, a
WrongPolicy exception is raised.
CORBA::Object_ptr create_reference_with_id (
const PortableServer::ObjectId& _oid,const char* _intf);
This method creates and returns an object reference that encapsulates the specified _oid and
_intf values. The
_intf, which may be a null string, becomes the
type_id of the generated object reference. An
_intf value that does not identify the most derived interface of the object or one of its base interfaces will result in undefined behavior. This method does not cause an activation to take place. The returned object reference may be passed to clients, so that subsequent requests on those references will cause the object to be activated if necessary, or the default servant used, depending on the applicable policies.
If the POA has the SYSTEM_ID policy present and it detects the
ObjectId value was not generated by the system or for the POA, this method may raise a
BAD_PARAM system exception.
This method returns a pointer to an IdAssignmentPolicy object with the specified
_value. The application is responsible for calling the inherited destroy method on the
Policy object after it is no longer needed.
If no IdAssignmentPolicy is specified at POA creation, then the default is
SYSTEM_ID.
|
|
|
If set to USER_ID, then objects created by the POA are assigned object ids only by the application. If set to SYSTEM_ID, then objects created by the POA are assigned object ids only by the POA.
|
This method returns a pointer to an IdUniquenessPolicy object with the specified
_value. The application is responsible for calling the inherited destroy method on the
Policy object after it is no longer needed.
If no IdUniquenessPolicy is specified at POA creation, then the default is
UNIQUE_ID.
|
|
|
If set to UNIQUE_ID, then servants which are activated with the POA support exactly one object id. If set to MULTIPLE_ID, then a servant which is activated with the POA may support one or more object ids.
|
This method returns a pointer to a LifespanPolicy object with the specified
_value. The application is responsible for calling the inherited destroy method on the
Policy object after it is no longer needed.
If no LifespanPolicy is specified at POA creation, then the default is
TRANSIENT.
|
|
|
If set to TRANSIENT, then objects implemented in the POA cannot outlive the POA instance in which they were first created. Once a transient POA is deactivated, the use of any object references generated from it results in an OBJECT_NOT_EXIST exception being raised. If set to PERSISTENT, then the objects implemented in the POA can outlive any process in which they are first created.
|
PortableServer::POA_ptr create_POA(
const char*
_adapter_name, PortableServer::POAManager_ptr
_a_POAManager, const CORBA::PolicyList&
_policies);
This method creates a new POA with the specified _adapter_name. The new POA is a child of the specified
_a_POAManager. If a child POA with the same name already exists for the parent POA, a
PortableServer::AdapterAlreadyExists exception is raised.
The specified _policies are associated with the new POA and are used to control its behavior.
This method returns a pointer to a RequestProcessingPolicy object with the specified
_value. The application is responsible for calling the inherited destroy method on the
Policy object after it is no longer needed.
|
|
|
If set to USE_ACTIVE_OBJECT_MAP_ONLY and the object id is not found in the Active Object Map, then an OBJECT_NOT_EXIST exception is returned to the client. (The RETAIN policy is also required.)If set to USE_DEFAULT_SERVANT and the object id is not found in the Active Object Map or the NON_RETAIN policy is present, and a default servant has been registered with the POA using the set_servant method, then the request is dispatched to the default servant. If no default servant has been registered, then an OBJ_ADAPTER exception is returned to the client. (The MULTIPLE_ID policy is also required.)If set to USE_SERVANT_MANAGER and the object id is not found in the Active Object Map or the NON_RETAIN policy is present, and a servant manager has been registered with the POA using the set_servant_manager method, then the servant manager is given the opportunity to locate a servant or raise an exception. If no servant manager has been registered, then an OBJ_ADAPTER is returned to the client.
|
This method returns a pointer to a ServantRetentionPolicy object with the specified
_value. The application is responsible for calling the inherited destroy method on the
Policy object after it is no longer needed.
If no ServantRetentionPolicy is specified at POA creation, then the default is
RETAIN.
|
|
|
If set to RETAIN, then the POA will retain active servants in its Active Object Map. If set to NON_RETAIN, then servants are not retained by the POA.
|
This method returns a pointer to a ThreadPolicy object with the specified
_value. The application is responsible for calling the inherited destroy method on the
Policy object after it is no longer needed.
If no ThreadPolicy is specified at POA creation, then the default is
ORB_CTRL_MODEL.
|
|
|
If set to ORB_CTRL_MODEL, the ORB is responsible for assigning requests for an ORB-controlled POA to threads. In a multi-threaded environment, concurrent requests may be delivered using multiple threads. If set to SINGLE_THREAD_MODEL, then requests to the POA are processed sequentially. In a multi-threaded environment, all upcalls made by the POA to servants and servant managers are made in a manner that is safe for code that is multi-thread unaware.
|
void deactivate_object(const PortableServer::ObjectId&
_oid);
This method causes the specified _oid to be deactivated. An ObjectId which has been deactivated continues to process requests until there are no more active requests for that
ObjectId. An
ObjectId is removed from the Active Object Map when all requests executing for that
ObjectId have completed.
If a ServantManager is associated with the POA, then the
ServantActivator::etherealize method is invoked with the
ObjectId and the associated servant after the ObjectId has been removed from the Active
Object map. Reactivization for the
ObjectId blocks until etherealization, if necessary, has completed. However, the method does not wait for requests or etherealization to complete and always returns immediately after deactivating the specified
_oid.
This method requires that the RETAIN policy be present with the POA; otherwise, a
WrongPolicy exception is raised.
void destroy(
CORBA::Boolean
_etherealize_objects,
CORBA::Boolean
_wait_for_completion);
|
|
|
If TRUE, the POA has the RETAIN policy, and a servant manager has registered with the POA, then the etherealize method is called on each active object in the Active Object Map. The apparent destruction of the POA occurs before the etherealize method is called, and thus any etherealize method which attempts to invoke methods on the POA raises an OBJECT_NOT_EXIST exception.
|
|
If TRUE and the current thread is not in an invocation context dispatched from some POA belonging to the same ORB as this POA, the destroy method only returns after all active requests and all invocations of etherealize have completed. If FALSE and the current thread is in an invocation context dispatched from some POA belonging to the same ORB as this POA, the BAD_INV_ORDER exception is raised and POA destruction does not occur.
|
|
|
|
|
|
If set to TRUE and no child POA of the POA specified by _adapter_name exists, then the POA's AdapterActivator, if not null, is invoked. If it successfully activates the child POA, then that POA is returned. Otherwise an AdapterNonExistent exception is raised.
|
This method returns the default Servant associated with the POA. If no
Servant has been associated with the POA, then a
NoServant exception is raised.
This method requires that the USE_DEFAULT_SERVANT policy be present with the POA; otherwise, a
WrongPolicy exception is raised.
This method returns a pointer to the ServantManager object associated with the POA. The result is
null if no
ServantManager is associated with the POA.
This method requires that the USE_SERVANT_MANAGER policy be present with the POA; otherwise, a
WrongPolicy exception is raised.
This method returns an object reference if the specified _oid value is currently active. If the
_oid is not active, then an
ObjectNotActive exception is raised.
This method requires that the RETAIN policy be present with the POA; otherwise, a
WrongPolicy exception is raised.
•
|
If the POA has the RETAIN policy present and the specified _oid is in the Active Object Map, then it returns the servant associated with that object in the Active Object Map.
|
•
|
If the POA has the USE_DEFAULT_SERVANT policy present and a default servant has been registered with the POA, it returns the default servant.
|
This method requires that the USE_DEFAULT_SERVANT policy be present with the POA; if neither policy is present, a
WrongPolicy exception is raised.
•
|
If the POA has the RETAIN policy and the specified _reference is present in the Active Object Map, then it returns the servant associated with that object in the Active Object Map.
|
•
|
If the POA has the USE_DEFAULT_SERVANT policy present and a default servant has been registered with the POA, then it returns the default servant.
|
This method requires that the RETAIN or
USE_DEFAULT_SERVANT policies be present; otherwise, a
WrongPolicy exception is raised.
This method returns theObjectId value encapsulated by the specified
_reference. The invocation is valid only if the
_reference was created by the POA on which the method is called. If the
_reference was not created by the POA, a
WrongAdapter exception is raised. The object denoted by the
_reference parameter does not have to be active for this method to succeed.
Though the IDL specifies that a WrongPolicy exception may be raised by this method, it is simply declared for possible future extension.
•
|
If the POA has the UNIQUE_ID policy present and the specified _p_servant is active, then the ObjectId associated with the _p_servant is returned.
|
•
|
If the POA has the IMPLICIT_ACTIVATION policy present and either the POA has the MULTIPLE_ID policy present or the specified _p_servant is not active, then the _p_servant is activated using the POA-generated ObjectId and the repository interface id associated with the _p_servant, and that ObjectId is returned.
|
•
|
If the POA has the USE_DEFAULT_SERVANT policy present, the specified _p_servant is the default servant, then the ObjectId associated with the current invocation is returned.
|
This method requires that the USE_DEFAULT_SERVANT policy or a combination of the
RETAIN policy and either the
UNIQUE_ID or
IMPLICIT_ACTIVATION policies be present; otherwise, a
WrongPolicy exception is raised.
•
|
If the POA has both the RETAIN and the UNIQUE_ID policies present and the specified _p_servant is active, then an object reference encapsulating the information used to activate the servant is returned.
|
•
|
If the POA has both the RETAIN and the IMPLICIT_ACTIVATION policies present and either the POA has the MULTIPLE_ID policy or the specified _p_servant is not active, then the _p_servant is activated using a POA-generated ObjectId and repository interface id associated with the _p_servant, and a corresponding object reference is returned.
|
This method requires the presence of the RETAIN policy and either the
UNIQUE_ID or
IMPLICIT_ACTIVATION policies if invoked outside the context of a method dispatched by the POA. If this method is not invoked in the context of executing a request on the specified
_p_servant and one of these policies is not present, then a
WrongPolicy exception is raised.
|
|
|
The Servant for which a reference is to be returned.
|
void set_servant(PortableServer::Servant
_p_servant);
This method sets the default Servant associated with the POA. The specified Servant will be used for all requests for which no servant is found in the Active Object Map.
This method requires that the USE_DEFAULT_SERVANT policy be present with the POA; otherwise, a
WrongPolicy exception is raised.
|
|
|
The Servant to be used as the default associated with the POA.
|
void set_servant_manager
(PortableServer::ServantManager_ptr
_imagr);
This method sets the default ServantManager associated with the POA. This method may only be invoked after a POA has been created. Attempting to set the
ServantManager after one has already been set raises a
BAD_INV_ORDER exception.
This method requires that the USE_SERVANT_MANAGER policy be present with the POA; otherwise, a
WrongPolicy exception is raised.
|
|
|
The ServantManager to be used as the default used with the POA.
|
This method returns the AdapterActivator associated with the POA. When a POA is created, it does not have an
AdapterActivator (i.e., the attribute is null). It is system dependent whether a root POA has an activator and the application can assign one as it wishes.
void the_activator(PortableServer::AdapterActivator_ptr
_val);
This method sets the AdapterActivator object associated with the POA to the one specified.
|
|
|
The ActivatorAdapter to be associated with the POA.
|
You should include the file poa_c.hh when using this class.
void deactivate(CORBA::Boolean
_etherealize_objects, CORBA::Boolean
_wait_for_completion);
After the state changes, if the etherealize_objects parameter is
•
|
TRUE- the POA manager causes all associated POAs that have the RETAIN and USE_SERVANT_MANAGER policies to perform the etherealize operation on the associated servant manager for all active objects.
|
•
|
FALSE - the etherealize operation is not called. The purpose is to provide developers with a means to shut down POAs in a crisis (for example, unrecoverable error) situation.
|
If the wait_for_completion parameter is
FALSE, this operation returns immediately after changing the state. If the parameter is
TRUE and the current thread is not in an invocation context dispatched by some POA belonging to the same VisiBroker ORB as this POA, this operation does not return until there are no actively executing requests in any of the POAs associated with this POA manager (that is, all requests that were started prior to the state change have completed) and, in the case of a
TRUE etherealize_objects parameter, all invocations of etherealize have completed for POAs having the
RETAIN and
USE_SERVANT_MANAGER policies. If the parameter is
TRUE and the current thread is in an invocation context dispatched by some POA belonging to the same VisiBroker ORB as this POA, the
BAD_INV_ORDER exception is raised and the state is not changed.
void discard_requests(CORBA::Boolean
_wait_for_completion);
If the wait_for_completion parameter is
FALSE, this operation returns immediately after changing the state. If the parameter is
TRUE and the current thread is not in an invocation context dispatched by some POA belonging to the same VisiBroker ORB as this POA, this operation does not return until either there are no actively executing requests in any of the POAs associated with this POA manager (that is, all requests that were started prior to the state change have completed) or the state of the POA manager is changed to a state other than discarding. If the parameter is
TRUE and the current thread is in an invocation context dispatched by some POA belonging to the same VisiBroker ORB as this POA, the
BAD_INV_ORDER exception is raised and the state is not changed.
void hold_requests(CORBA::Boolean
_wait_for_completion);
If the wait_for_completion parameter is
FALSE, this operation returns immediately after changing the state. If the parameter is
TRUE and the current thread is not in an invocation context dispatched by some POA belonging to the same VisiBroker ORB as this POA, this operation does not return until there are no actively executing requests in any of the POAs associated with this POA manager (that is, all requests that were started prior to the state change have completed) and, in the case of a
TRUE etherealize_objects parameter, all invocations of etherealize have completed for POAs having the
RETAIN and
USE_SERVANT_MANAGER policies. If the parameter is
TRUE and the current thread is in an invocation context dispatched by some POA belonging to the same VisiBroker ORB as this POA the
BAD_INV_ORDER exception is raised and the state is not changed.
The Principal is used to represent the client application on whose behalf a request is being made. An object implementation can accept or reject a bind request, based on the contents of the client's
Principal.
You should include the file corba.h when using this typedef.
The BOA class provides the
get_principal method, which returns a pointer to the
Principal associated with an object. The
Object class also provides methods for getting and setting the
Principal.
class RefCountServantBase : public ServantBase
You should include the file poa_c.hh when using this class.
class PortableServer::ServantActivator : public
PortableServer::ServantManager
If the POA has the RETAIN policy present, then it uses servant managers that are
PortableServer::ServantActivator objects.
You should include the file poa_c.hh when using this class.
void etherealize(PortableServer::ObjectId&
oid,
PortableServer::POA_ptr
adapter,
PortableServer::Servant
serv,
CORBA::Boolean
cleanup_in_progress,
CORBA::Boolean
remaining_activations);
This method is called by the specified adapter whenever a servant for an object (the specified
oid) is deactivated, assuming that the
RETAIN and
USE_SERVANT_MANAGER policies are present.
|
|
|
|
|
|
|
|
|
If set to TRUE, the reason for the invocation of the method is either that the deactivate or destroy method was called with the etherealize_objects parameter set to TRUE; otherwise, the method was called for other reasons.
|
|
If the specified serv is associated with other objects in the specified adapter it is set to TRUE; otherwise it is FALSE.
|
The user supplies a servant manager implementation which is responsible for locating and creating an appropriate servant that corresponds to the specified oid value. The method returns a servant, which is also entered into the Active Object map. Any further requests for the active object are passed directly to the servant associated with it without invoking the servant manager.
class PortableServer::ServantBase
The Portable::ServantBase class is the base class for your server application.
You should include the file poa_c.hh when using this class.
This method returns an Object reference to the root POA of the default VisiBroker ORB in the current process, (i.e., the same return value as an invocation of ORB::resolve_initial_references("RootPOA") on the default VisiBroker ORB. Classes derived from the
PortableServer::ServantBase class may override this method to return the POA of their choice, if desired.
This method returns TRUE if this servant implements the interface associated with the repository id. Otherwise, it returns
FALSE.
class PortableServer::ServantLocator : public
PortableServer::ServantManager
When the POA has the NON_RETAIN policy present, it uses servant managers which are
PortableServer::ServantLocator objects. The servant returned by the servant manager will be used only for a single request.
You should include the file poa_c.hh when using this class.
PortableServer::Servant preinvoke(const PortableServer::ObjectId&
oid, PortableServer::POA_ptr
adapter,const char*
operation, Cookie&
the_cookie);
|
|
|
The ObjectId value that is associated with the incoming request.
|
|
|
|
|
|
|
void postinvoke(const PortableServer::ObjectId&
oid,PortableServer::POA_ptr
adapter, const char*
operation, Cookie
the_cookie, PortableServer::Servant
the_servant)
If the POA has the NON_RETAIN and
USE_SERVANT_MANAGER policies present, this method is called whenever a servant completes a request. This method is considered to be part of the request on an object, (i.e., if the method finishes normally, but postinvoke raises a system exception, then the method's normal return is overridden; and the request completes with the exception).
|
|
|
The ObjectId value that is associated with the incoming request.
|
|
|
|
|
|
|
|
|
class PortableServer::ServantManager
The PortableServer::ServantManager class has no methods; rather it is the base class for two other classes: the PortableServer::ServantActivator and the
Portableserver::ServantLocator classes. For more details, see
“PortableServer::ServantActivator” on page 42 and
“PortableServer::ServantLocator” on page 44. The use of these two classes depends on the POA's policies:
RETAIN for the
PortableServer::ServantActivator and
NON_RETAIN for the
Portableserver::ServantLocator.
You should include the file poa_c.hh when using this class.
class CORBA::SystemException : public
CORBA::Exception
The SystemException class is used to report standard system errors encountered by the VisiBroker ORB or by the object implementation. This class is derived from the
Exception class, described in
“Exception” on page 17, which provides methods for printing the name and details of the exception to an output stream.
SystemException objects include a completion status which indicates if the operation that caused the exception was completed.
SystemException objects also have a minor code that can be set and retrieved.
The corba.h file should be included when you use this class.
This method creates a SystemException object with the specified properties.
This method returns TRUE if this object's completion status is set to
COMPLETED_YES.
void completed(CORBA::CompletionStatus
status);
void minor(CORBA::ULong
val);
This method attempts to downcast the specified Exception pointer to a
SystemException pointer. If the supplied pointer points to a
SystemException object or an object derived from
SystemException, a pointer to the object is returned. If the supplied pointer does not point to a
SystemException object, a
NULL pointer is returned.
The reference count for the Exception object is not incremented by this method.
class CORBA::UserException : public
CORBA::Exception
The UserException base class is used to derive the user exceptions that your object implementations may want to raise. This class is derived from the
Exception class, described in
“Exception”, which provides methods for printing the name and details of the exception to an output stream.
UserException objects include a completion status which indicates if the operation that caused the exception was completed.
UserException objects also have a minor code that can be set and retrieved.
The corba.h file should be included when you use this class.
This method creates a UserException object with the specified properties.
class AdapterAlreadyExists : public CORBA::UserException
class AdapterInactive : public CORBA::UserException
class AdapterNonExistent : public CORBA::UserException
class InvalidPolicy : public CORBA::UserException
class NoServant : public CORBA::UserException
class ObjectAlreadyActive : public CORBA::UserException
class ObjectNotActive : public CORBA::UserException
class ServantAlreadyActive : public CORBA::UserException
class ServantNotActive : public CORBA::UserException
class WrongAdapter : public CORBA::UserException
class WrongPolicy : public CORBA::UserException
class ManagerAlreadyExists : public CORBA::UserException