summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Cleeland <chris.cleeland@gmail.com>1997-10-17 22:42:14 +0000
committerChris Cleeland <chris.cleeland@gmail.com>1997-10-17 22:42:14 +0000
commitf3db864529b7952d67eb9c49d07e184305058300 (patch)
tree61f0ccf64ed915591adfc5d058e07ad807515e67
parent7e642d0984a4ec464f1f83d5d6c5c126f59f1434 (diff)
downloadATCD-f3db864529b7952d67eb9c49d07e184305058300.tar.gz
*** empty log message ***
-rw-r--r--TAO/tao/roa.cpp178
-rw-r--r--TAO/tao/roa.h79
-rw-r--r--TAO/tao/roa.i11
3 files changed, 0 insertions, 268 deletions
diff --git a/TAO/tao/roa.cpp b/TAO/tao/roa.cpp
index c77f6eb051c..5b2a37baf8c 100644
--- a/TAO/tao/roa.cpp
+++ b/TAO/tao/roa.cpp
@@ -20,146 +20,6 @@
#include "tao/corba.h"
-ROA_ptr
-ROA::init (CORBA::ORB_ptr parent,
- ACE_INET_Addr &,
- CORBA::Environment &env)
-{
- env.clear ();
- TAO_ORB_Core *p = TAO_ORB_Core_instance ();
-
- if (p->root_poa ())
- {
- env.exception (new CORBA_INITIALIZE (CORBA::COMPLETED_NO));
- return 0;
- }
-
- ROA_ptr rp;
- ACE_NEW_RETURN (rp, ROA (parent, env), 0);
- p->root_poa (rp);
-
- return rp;
-}
-
-ROA::ROA (CORBA::ORB_ptr owning_orb,
- CORBA::Environment &)
- : do_exit_ (CORBA::B_FALSE),
- orb_ (owning_orb),
- call_count_ (0),
- skeleton_ (0)
-{
- TAO_Server_Strategy_Factory *f = orb_->server_factory ();
- TAO_ORB_Core* p = TAO_ORB_Core_instance ();
-
- this->objtable_ = f->create_object_table ();
-
- if (this->objtable_ != 0)
- p->root_poa (this);
-}
-
-ROA::~ROA (void)
-{
-}
-
-// Create an objref
-
-CORBA::Object_ptr
-ROA::create (CORBA::OctetSeq &key,
- CORBA::String type_id,
- CORBA::Environment &env)
-{
- CORBA::String id;
- IIOP_Object *data;
-
- if (type_id)
- id = CORBA::string_copy (type_id);
- else
- id = 0;
-
- IIOP::Version ver (IIOP::MY_MAJOR, IIOP::MY_MINOR);
- // Cast below de-warns on Sun's C++
- const ACE_INET_Addr& addr = orb_->params ()->addr ();
- CORBA::String h = (char*)addr.get_host_name ();
-
- data = new IIOP_Object (id, IIOP::ProfileBody (ver,
- h,
- addr.get_port_number (),
- key));
- if (data != 0)
- env.clear ();
- else
- {
- env.exception (new CORBA_NO_MEMORY (CORBA::COMPLETED_NO));
- return 0;
- }
-
- // Return the CORBA::Object_ptr interface to this objref.
- CORBA::Object_ptr new_obj;
-
- if (data->QueryInterface (IID_CORBA_Object,
- (void**)&new_obj) != NOERROR)
- env.exception (new CORBA::INTERNAL (CORBA::COMPLETED_NO));
-
- data->Release ();
- return new_obj;
-}
-
-// Return the key fed into an object at creation time.
-
-CORBA::OctetSeq *
-ROA::get_key (CORBA::Object_ptr,
- CORBA::Environment &env)
-{
- // XXX implement me ! ... must have been created by this OA.
- env.exception (new CORBA_IMP_LIMIT (CORBA::COMPLETED_NO));
- return 0;
-}
-
-// Used by method code to ask the OA to shut down.
-void
-ROA::please_shutdown (CORBA::Environment &env)
-{
- ACE_MT (ACE_GUARD (ACE_Thread_Mutex, roa_mon, lock_));
-
- env.clear ();
- do_exit_ = CORBA::B_TRUE;
-}
-
-// Used by non-method code to tell the OA to shut down.
-void
-ROA::clean_shutdown (CORBA::Environment &env)
-{
- ACE_MT (ACE_GUARD (ACE_Thread_Mutex, roa_mon, lock_));
-
- env.clear ();
-
- if (call_count_ != 0)
- {
- dmsg ("called clean_shutdown with requests outstanding");
- env.exception (new CORBA::BAD_INV_ORDER (CORBA::COMPLETED_NO));
- return;
- }
-
- // Here we need to tell all the endpoints to shut down...
-}
-
-// For BOA -- BOA operations for which we provide the vtable entry
-
-void
-ROA::register_dir (CORBA::BOA::dsi_handler handler,
- void *ctx, CORBA::Environment &env)
-{
- if (handler == 0)
- {
- env.exception (new CORBA::BAD_PARAM (CORBA::COMPLETED_NO));
- return;
- }
-
- skeleton_ = handler;
- context_ = ctx;
-
- env.clear ();
-}
// For COM -- IUnknown operations, we provide the vtable entry
@@ -168,44 +28,6 @@ ROA::register_dir (CORBA::BOA::dsi_handler handler,
DEFINE_GUID (IID_ROA,
0xa201e4c4, 0xf258, 0x11ce, 0x95, 0x98, 0x0, 0x0, 0xc0, 0x7c, 0xa8, 0x98);
-ULONG __stdcall
-ROA::AddRef (void)
-{
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, roa_mon, com_lock_, 0));
- return ++refcount_;
-}
-
-ULONG __stdcall
-ROA::Release (void)
-{
- {
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, roa_mon, com_lock_, 0));
-
- if (--refcount_ != 0)
- return refcount_;
- }
-
- delete this;
- return 0;
-}
-
-HRESULT __stdcall
-ROA::QueryInterface (REFIID riid,
- void **ppv)
-{
- *ppv = 0;
-
- if (IID_ROA == riid
- || IID_BOA == riid
- || IID_IUnknown == riid)
- *ppv = this;
-
- if (*ppv == 0)
- return ResultFromScode (E_NOINTERFACE);
-
- (void) AddRef ();
- return NOERROR;
-}
#if !defined (__ACE_INLINE__)
# include "roa.i"
diff --git a/TAO/tao/roa.h b/TAO/tao/roa.h
index 446fee08281..46ffb031f33 100644
--- a/TAO/tao/roa.h
+++ b/TAO/tao/roa.h
@@ -36,88 +36,9 @@ class ACE_Svc_Export ROA : public CORBA_BOA
// Realtime Object Adapter class.
{
public:
- // = ROA Support
- static ROA_ptr init (CORBA::ORB_ptr which_orb,
- ACE_INET_Addr &addr,
- CORBA::Environment &env);
- // NON-STANDARD CALL. According to CORBA V2.0, this functionality
- // should really be <ROA_ptr ORB::ROA_init (argc,argv,ident)>.
- //
- // The current signature is residue from when this code was part of
- // the SunSoft IIOP reference implementation.
-
-
- void clean_shutdown (CORBA::Environment &env);
- // NON-STANDARD CALL. OA user asks for a clean shutdown of the OA
- // after currently active calls complete. OA "requester" (calls
- // <get_request>) asks if we're shutting down, and if so closes down
- // transport cleanly.
-
- CORBA::Boolean shutting_down (void);
- // NON-STANDARD CALL. Returns <TRUE> if we're in the process of
- // shutting down.
-
- CORBA::OctetSeq *get_key (CORBA::Object_ptr obj,
- CORBA::Environment &env);
- // NON-STANDARD CALL. When dispatching a request to an object, you
- // need to be able to get the object key you used to create the
- // reference. It's the main way servers distinguish two object
- // references from each other.
-
- virtual CORBA::ORB_ptr orb (void) const;
- // Returns pointer to the ORB with which this OA is associated.
- // SHOULD PROBABLY MOVE TO BOA!
-
- // = BOA Support
- // @@ Please add comments.
- CORBA::Object_ptr create (CORBA::OctetSeq &obj_id,
- CORBA::String type_id,
- CORBA::Environment &env);
-
- void register_dir (CORBA::BOA::dsi_handler handler,
- void *context,
- CORBA::Environment &env);
-
- void please_shutdown (CORBA::Environment &env);
-
- // = COM IUnknown Support
- ULONG __stdcall AddRef (void);
- ULONG __stdcall Release (void);
- HRESULT __stdcall QueryInterface (REFIID riid, void** ppv);
-
- ROA (CORBA::ORB_ptr orb_arg,
- CORBA::Environment &env);
- virtual ~ROA (void);
private:
- CORBA::Boolean do_exit_;
- // Flag set by <clean_shutdown ()>.
-
- CORBA::ORB_ptr orb_;
- // Pointer to our ORB.
-
- u_int call_count_;
- // Used by COM stuff
-
- u_int refcount_;
- // Used by COM stuff
-
- CORBA::BOA::dsi_handler skeleton_;
- // Skeleton function
-
- void *context_;
- // Who knows!?!
-
- ACE_SYNCH_MUTEX lock_;
- // Locks critical sections within ROA code methods (was
- // tcpoa_mutex).
-
- ACE_SYNCH_MUTEX com_lock_;
- // Locks critical sections in COM-related code (was tcpoa_lock).
-
// = Copy and assignment: just say no
- ROA (const ROA &src);
- ROA &operator= (const ROA &src);
};
#endif /* TAO_ROA_H */
diff --git a/TAO/tao/roa.i b/TAO/tao/roa.i
index 13928da8e8f..e69de29bb2d 100644
--- a/TAO/tao/roa.i
+++ b/TAO/tao/roa.i
@@ -1,11 +0,0 @@
-ACE_INLINE CORBA::Boolean
-ROA::shutting_down (void)
-{
- return do_exit_;
-}
-
-ACE_INLINE CORBA::ORB_ptr
-ROA::orb (void) const
-{
- return orb_;
-}