(file) Return to CIMListener.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Listener

  1 kumpf 1.1 //%/////////////////////////////////////////////////////////////////////////////
  2           //
  3 kumpf 1.2 // Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM,
  4 kumpf 1.1 // The Open Group, Tivoli Systems
  5           //
  6           // Permission is hereby granted, free of charge, to any person obtaining a copy
  7           // of this software and associated documentation files (the "Software"), to
  8           // deal in the Software without restriction, including without limitation the
  9           // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 10           // sell copies of the Software, and to permit persons to whom the Software is
 11           // furnished to do so, subject to the following conditions:
 12 kumpf 1.2 // 
 13 kumpf 1.1 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 14           // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 15           // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 16           // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 17           // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 18           // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 19           // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 20           // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 21           //
 22           //==============================================================================
 23           //
 24           // Author: Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com)
 25           //
 26           // Modified By:
 27           //
 28           //%/////////////////////////////////////////////////////////////////////////////
 29           
 30           #ifndef Pegasus_Listener_h
 31           #define Pegasus_Listener_h
 32           
 33           #include <Pegasus/Common/Config.h>
 34 kumpf 1.1 #include <Pegasus/Common/Exception.h>
 35 chuck 1.3 #include <Pegasus/Listener/Linkage.h>
 36 kumpf 1.1 
 37           PEGASUS_NAMESPACE_BEGIN
 38           
 39           struct ListenerRep;
 40           
 41           class Monitor;
 42           class CIMExportRequestDispatcher;
 43           class CIMExportResponseEncoder;
 44           class CIMExportRequestDecoder;
 45           class HTTPAcceptor;
 46           
 47           class PEGASUS_LISTENER_LINKAGE CIMListener
 48           {
 49           public:
 50           
 51               enum Protocol { PROPRIETARY, STANDARD };
 52           
 53               /** Constructor - Creates a CIMListener object.
 54                   The CIM Listener objects establishes a repository object,
 55                   a dispatcher object, and creates a channnel factory and
 56                   acceptor for the Listener.
 57 kumpf 1.1         @param monitor	  monitor object for the server.
 58                   @param rootPath Directory path to the repository.
 59               */
 60           
 61               CIMListener(
 62           	Monitor* monitor,
 63           	const String& rootPath,
 64                   Boolean dynamicReg,
 65           	Boolean staticConsumers,
 66 kumpf 1.4.6.1 	Boolean persistence,
 67               	Uint32 portNumber);
 68 kumpf 1.1     
 69                   ~CIMListener();
 70               
 71                   /** bind Binds the port address to the Listener.
 72               	@param address char* to the port address for TCP.
 73               	@exception - This function may receive exceptions from
 74               	Channel specific subfunctions.
 75                   */
 76 kumpf 1.4.6.1     void bind();
 77 kumpf 1.1     
 78                   /** runForever Main runloop for the server.
 79                   */
 80                   void runForever();
 81               
 82                   /** Call to gracefully shutdown the server.  The server connection socket
 83                       will be closed to disable new connections from clients.
 84                   */
 85                   void stopClientConnection(); 
 86               
 87                   /** Call to gracefully shutdown the server.  It is called when the server
 88                       has been stopped and is ready to be shutdown.  Next time runForever() 
 89                       is called, the server shuts down.
 90                   */
 91                   void shutdown();
 92               
 93                   /** Return true if the server has shutdown, false otherwise.
 94                   */
 95                   Boolean terminated() { return _dieNow; };
 96               
 97                   /** Call to resume the sever. 
 98 kumpf 1.1         */
 99                   void resume();
100               
101                   Uint32 getOutstandingRequestCount();
102               
103               private:
104               
105                   Boolean _dieNow;
106               
107                   String _rootPath;
108                   String _repositoryRootPath;
109               
110                   Boolean _dynamicReg;
111                   Boolean _staticConsumers;
112                   Boolean _persistence;
113               
114                   Monitor* _monitor;
115                   
116                   CIMExportRequestDispatcher* _cimExportRequestDispatcher;
117                   CIMExportResponseEncoder* _cimExportResponseEncoder;
118                   CIMExportRequestDecoder* _cimExportRequestDecoder;
119 kumpf 1.1     
120                   HTTPAcceptor*   _acceptor;
121 kumpf 1.4.6.1 
122                   Uint32 _portNumber;
123 kumpf 1.1     };
124               
125               PEGASUS_NAMESPACE_END
126               
127               #endif /* Pegasus_Listener_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2