3 //=============================================================================
7 * @author Carlos O'Ryan (coryan@uci.edu)
9 //=============================================================================
14 #include /**/ "ace/pre.h"
16 #include "tao/CORBA_methods.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "tao/Pseudo_VarOut_T.h"
24 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
29 typedef Object
* Object_ptr
;
31 typedef TAO_Pseudo_Var_T
<Object
> Object_var
;
32 typedef TAO_Pseudo_Out_T
<Object
> Object_out
;
43 class TAO_ServerRequest
;
45 class TAO_Export TAO_Adapter
48 virtual ~TAO_Adapter ();
50 /// Initialize the Adapter
51 virtual void open () = 0;
53 /// The ORB is shutting down, destroy any resources attached to this
55 virtual void close (int wait_for_completion
) = 0;
57 /// Check if the adapter can be closed in the current context, raise
58 /// an exception if not.
59 virtual void check_close (int wait_for_completion
) = 0;
62 * Return the priority assigned to this adapter.
63 * Adapters at higher priority are used first, the first adapter
64 * that matches a key is used to dispatch a request.
66 virtual int priority () const = 0;
68 /// Return the status....
69 virtual int dispatch (TAO::ObjectKey
&key
,
70 TAO_ServerRequest
&request
,
71 CORBA::Object_out forward_to
) = 0;
74 /// The operation was successfully dispatched, an exception may
75 /// have been raised, but that is a correct execution too.
78 /// There was a problem in dispatching the operation.
81 /// The key is not in the right format for this Adapter, try the
85 /// Forward the request to another object reference, this decouples
86 /// the ORB from the PortableServer::ForwardRequest exception
89 /// The request will be forwarded, but using an async call to locate
90 /// the target. Some other entity will actually complete the forward
95 /// Return the name, i.e. the object id used to resolve it in the
97 virtual const char *name () const = 0;
100 * Return the root of the Object Adapter.
101 * Each adapter defines its own IDL interface accessed through the
104 virtual CORBA::Object_ptr
root () = 0;
106 /// Create a collocated object using the given profile and stub.
107 virtual CORBA::Object_ptr
create_collocated_object (TAO_Stub
*,
108 const TAO_MProfile
&) = 0;
110 /// Initialize a collocated object using the given stub
111 /// pointer for lazily evaluated object references.
112 virtual CORBA::Long
initialize_collocated_object (TAO_Stub
*) = 0;
115 TAO_END_VERSIONED_NAMESPACE_DECL
117 #include /**/ "ace/post.h"
119 #endif /* TAO_ADAPTER_H */