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

Diff for /pegasus/src/Pegasus/Listener/CIMListener.h between version 1.5 and 1.6

version 1.5, 2003/03/11 21:26:54 version 1.6, 2003/08/15 14:10:29
Line 21 
Line 21 
 // //
 //============================================================================== //==============================================================================
 // //
 // Author: Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com)  // Author: Dong Xiang, EMC Corporation (xiang_dong@emc.com)
 // //
 // Modified By: // Modified By:
 // //
Line 31 
Line 31 
 #define Pegasus_Listener_h #define Pegasus_Listener_h
  
 #include <Pegasus/Common/Config.h> #include <Pegasus/Common/Config.h>
 #include <Pegasus/Common/Exception.h>  
 #include <Pegasus/Listener/Linkage.h> #include <Pegasus/Listener/Linkage.h>
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
 struct ListenerRep;  class SSLContext;
   class CIMIndicationConsumer;
 class Monitor;  
 class CIMExportRequestDispatcher;  
 class CIMExportResponseEncoder;  
 class CIMExportRequestDecoder;  
 class HTTPAcceptor;  
  
 class PEGASUS_LISTENER_LINKAGE CIMListener class PEGASUS_LISTENER_LINKAGE CIMListener
 { {
 public: public:
           /**
     enum Protocol { PROPRIETARY, STANDARD };           * Constructs a CIMListener object.
            *
     /** Constructor - Creates a CIMListener object.           * @param portNumber    the specified socket port the listener will listen to
         The CIM Listener objects establishes a repository object,     * @param sslContext  the specifed SSL context
         a dispatcher object, and creates a channnel factory and           */
         acceptor for the Listener.          CIMListener(Uint32 portNumber, SSLContext* sslContext=NULL);
         @param monitor    monitor object for the server.          /**
         @param rootPath Directory path to the repository.           * Destructor of a CIMLIstener object.
     */           */
   
     CIMListener(  
         Monitor* monitor,  
         const String& rootPath,  
         Boolean dynamicReg,  
         Boolean staticConsumers,  
         Boolean persistence,  
         Uint32 portNumber);  
   
     ~CIMListener();     ~CIMListener();
  
     /** bind Binds the port address to the Listener.          /**
         @param address char* to the port address for TCP.           * Returns the socket port number
         @exception - This function may receive exceptions from           *
         Channel specific subfunctions.           * @return the socket port number.
     */     */
     void bind();          Uint32 getPortNumber() const;
  
     /** runForever Main runloop for the server.          /**
            * Returns the SSL context
            *
            * @return the SSL context.
     */     */
     void runForever();          SSLContext* getSSLContext() const;
  
     /** Call to gracefully shutdown the server.  The server connection socket          /**
         will be closed to disable new connections from clients.           * Sets the SSL context
            *
            * @param the SSL context.
     */     */
     void stopClientConnection();          void setSSLContext(SSLContext* sslContext);
  
     /** Call to gracefully shutdown the server.  It is called when the server          /**
         has been stopped and is ready to be shutdown.  Next time runForever()           * Starts for listening.
         is called, the server shuts down.  
     */     */
     void shutdown();          void start();
  
     /** Return true if the server has shutdown, false otherwise.          /**
            * Stops listening
     */     */
     Boolean terminated() { return _dieNow; };          void stop();
  
     /** Call to resume the sever.          /**
            * Returns if the listener is active
            *
            * @return true if the listener is active;
            *                               false otherwise.
     */     */
     void resume();          Boolean isAlive();
  
     Uint32 getOutstandingRequestCount();          /**
            * Adds a CIMIndicationConsumer to the listener
      *
            * @param the CIMIndicationConsumer to add.
            * @return true if the indication consumer has been added successfully
            *                               false otherwise.
            */
           Boolean addConsumer(CIMIndicationConsumer* consumer);
           /**
            * Removes a CIMIndicationConsumer from the listener.
            *
            * @param the CIMIndicationConsumer to remove.
            * @return true if the indication consumer has been removed successfully
            *                               false otherwise.
            */
           Boolean removeConsumer(CIMIndicationConsumer* consumer);
  
 private: private:
           void* _rep;
     Boolean _dieNow;  
   
     String _rootPath;  
     String _repositoryRootPath;  
   
     Boolean _dynamicReg;  
     Boolean _staticConsumers;  
     Boolean _persistence;  
   
     Monitor* _monitor;  
   
     CIMExportRequestDispatcher* _cimExportRequestDispatcher;  
     CIMExportResponseEncoder* _cimExportResponseEncoder;  
     CIMExportRequestDecoder* _cimExportRequestDecoder;  
   
     HTTPAcceptor*   _acceptor;  
   
     Uint32 _portNumber;  
 }; };
  
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END


Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2