diff options
author | bala <bala@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-04-15 00:05:42 +0000 |
---|---|---|
committer | bala <bala@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-04-15 00:05:42 +0000 |
commit | 1c8b121792f05ef80a3e657846f873b2daf5b7df (patch) | |
tree | 5654675338abf6b2a8cc02ea21f39d5066367758 /TAO/tao/Transport_Acceptor.h | |
parent | ecbe3185e6091031de62061a6cc9cd16e0ae3ed8 (diff) | |
download | ATCD-1c8b121792f05ef80a3e657846f873b2daf5b7df.tar.gz |
ChangeLogTag: Sun Apr 14 19:02:16 2002 Balachandran Natarajan <bala@cs.wustl.edu>
Diffstat (limited to 'TAO/tao/Transport_Acceptor.h')
-rw-r--r-- | TAO/tao/Transport_Acceptor.h | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/TAO/tao/Transport_Acceptor.h b/TAO/tao/Transport_Acceptor.h new file mode 100644 index 00000000000..2f577d007ff --- /dev/null +++ b/TAO/tao/Transport_Acceptor.h @@ -0,0 +1,123 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file Acceptor.h + * + * $Id$ + * + * Interface for the Acceptor component of the TAO pluggable protocol + * framework. + * + * @author Fred Kuhns <fredk@cs.wustl.edu> + */ +//============================================================================= +#ifndef TAO_ACCEPTOR_H +#define TAO_ACCEPTOR_H +#include "ace/pre.h" + +#include "tao/IOPC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + + + +// Forward declarations. +class ACE_Addr; +class ACE_Reactor; +class TAO_ORB_Core; +class TAO_MProfile; +class TAO_Endpoint; +class TAO_Transport; + +// **************************************************************** + +/** + * @class TAO_Acceptor + * + * @brief Abstract Acceptor class used for pluggable transports. + * + * Base class for the Acceptor bridge class. + * + * @@TODO: Need to rename the class as TAO_Transport_Acceptor. + */ +class TAO_Export TAO_Acceptor +{ +public: + + TAO_Acceptor (CORBA::ULong tag); + + /// Destructor + virtual ~TAO_Acceptor (void); + + /// The tag, each concrete class will have a specific tag value. + CORBA::ULong tag (void) const; + + /// Method to initialize acceptor for address. + virtual int open (TAO_ORB_Core *orb_core, + ACE_Reactor *reactor, + int version_major, + int version_minor, + const char *address, + const char *options = 0) = 0; + + /** + * Open an acceptor with the given protocol version on a default + * endpoint + */ + virtual int open_default (TAO_ORB_Core *, + ACE_Reactor *reactor, + int version_major, + int version_minor, + const char *options = 0) = 0; + + /// Closes the acceptor + virtual int close (void) = 0; + + /** + * Create the corresponding profile for this endpoint. + * If share_profile is set to true, the pluggable protocol + * implementation should try to add the endpoint to a profile + * in the mprofile that is of the same type. Currently, this + * is used when RT CORBA is enabled. + */ + virtual int create_profile (const TAO_ObjectKey &object_key, + TAO_MProfile &mprofile, + CORBA::Short priority) = 0; + + /// Return 1 if the <endpoint> has the same address as the acceptor. + virtual int is_collocated (const TAO_Endpoint* endpoint) = 0; + + /** + * Returns the number of endpoints this acceptor is listening on. This + * is used for determining how many profiles will be generated + * for this acceptor. + */ + virtual CORBA::ULong endpoint_count (void) = 0; + + /** + * This method fetches the <key> from the <profile>. Protocols that + * are pluggable can send data that are specific in the + * <profile_data> field encapsulated as a octet stream. This method + * allows those protocols to get the object key from the + * encapsulation. + */ + virtual int object_key (IOP::TaggedProfile &profile, + TAO_ObjectKey &key) = 0; + +private: + + /// IOP protocol tag. + CORBA::ULong tag_; + +}; + +#if defined (__ACE_INLINE__) +# include "Transport_Acceptor.inl" +#endif /* __ACE_INLINE__ */ + +#include "ace/post.h" + +#endif /* TAO_ACCEPTOR_H */ |