(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.1 and 1.9

version 1.1, 2002/02/05 19:13:35 version 1.9, 2004/10/17 20:39:56
Line 1 
Line 1 
 //%/////////////////////////////////////////////////////////////////////////////  //%2004////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000, 2001 BMC Software, Hewlett-Packard Company, IBM,  // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
 // The Open Group, Tivoli Systems  // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
   // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
   // IBM Corp.; EMC Corporation, The Open Group.
   // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
   // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
 // //
 // Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
 // of this software and associated documentation files (the "Software"), to // of this software and associated documentation files (the "Software"), to
Line 21 
Line 25 
 // //
 //============================================================================== //==============================================================================
 // //
 // 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 35 
 #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 "Linkage.h"  
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
 struct ListenerRep;  class SSLContext;
   class CIMIndicationConsumer;
  
 class Monitor;  
 class CIMExportRequestDispatcher;  
 class CIMExportResponseEncoder;  
 class CIMExportRequestDecoder;  
 class HTTPAcceptor;  
  
   /** CIMListener provides the interfaces that allows CIMListeners to be
       created and managed. CIMListeners are the receivers for cim/xml indications.
       ATTN: KS needs to be completed.TBD
   */
 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);  
   
     ~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 port);          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
     CIMExportRequestDispatcher* getDispatcher();     *
            * @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;  
 }; };
  
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END


Legend:
Removed from v.1.1  
changed lines
  Added in v.1.9

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2