Protocol_Factory.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file   Protocol_Factory.h
00006  *
00007  *  Protocol_Factory.h,v 1.18 2005/11/02 07:13:04 ossama Exp
00008  *
00009  *  @author Fred Kuhns <fredk@cs.wustl.edu>
00010  */
00011 //=============================================================================
00012 
00013 #ifndef TAO_PROTOCOL_FACTORY_H
00014 #define TAO_PROTOCOL_FACTORY_H
00015 
00016 #include /**/ "ace/pre.h"
00017 
00018 #include "tao/TAO_Export.h"
00019 
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 #include "tao/Basic_Types.h"
00025 
00026 #include "ace/Service_Object.h"
00027 #include "ace/SStringfwd.h"
00028 
00029 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00030 
00031 class TAO_Acceptor;
00032 class TAO_Connector;
00033 
00034 class TAO_Export TAO_Protocol_Factory : public ACE_Service_Object
00035 {
00036 public:
00037   TAO_Protocol_Factory (CORBA::ULong tag);
00038   virtual ~TAO_Protocol_Factory (void);
00039 
00040   /// Initialization hook.
00041   virtual int init (int argc, ACE_TCHAR *argv[]);
00042 
00043   /// The protocol tag, each concrete class will have a specific tag
00044   /// value.
00045   CORBA::ULong tag (void) const;
00046 
00047   /// Verify prefix is a match
00048   virtual int match_prefix (const ACE_CString &prefix);
00049 
00050   /// Returns the prefix used by the protocol.
00051   virtual const char *prefix (void) const;
00052 
00053   /// Return the character used to mark where an endpoint ends and
00054   /// where its options begin.
00055   virtual char options_delimiter (void) const;
00056 
00057   // Factory methods
00058   /// Create an acceptor
00059   virtual TAO_Acceptor *make_acceptor (void);
00060 
00061   /// Create a connector
00062   virtual TAO_Connector *make_connector  (void);
00063 
00064   /**
00065    * Some protocols should not create a default endpoint unless the
00066    * user specifies a -ORBEndpoint option. For example, local IPC
00067    * (aka UNIX domain sockets) is unable to remove the rendesvouz
00068    * point if the server crashes.  For those protocols it is better to
00069    * create the endpoint only if the user requests one.
00070    */
00071   virtual int requires_explicit_endpoint (void) const = 0;
00072 
00073 private:
00074 
00075   /// IOP protocol tag.
00076   CORBA::ULong const tag_;
00077 
00078 };
00079 
00080 TAO_END_VERSIONED_NAMESPACE_DECL
00081 
00082 #include /**/ "ace/post.h"
00083 
00084 #endif /* TAO_PROTOCOL_FACTORY_H */

Generated on Thu Nov 9 11:54:21 2006 for TAO by doxygen 1.3.6