(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.3 and 1.15

version 1.3, 2002/08/20 21:30:03 version 1.15, 2008/12/01 17:50:44
Line 1 
Line 1 
 //%/////////////////////////////////////////////////////////////////////////////  //%LICENSE////////////////////////////////////////////////////////////////
 //  
 // Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM,  
 // The Open Group, Tivoli Systems  
 //  
 // Permission is hereby granted, free of charge, to any person obtaining a copy  
 // of this software and associated documentation files (the "Software"), to  
 // deal in the Software without restriction, including without limitation the  
 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or  
 // sell copies of the Software, and to permit persons to whom the Software is  
 // furnished to do so, subject to the following conditions:  
 //  
 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN  
 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED  
 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT  
 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR  
 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT  
 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN  
 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION  
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  
 //  
 //==============================================================================  
 //  
 // Author: Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com)  
 // //
 // Modified By:  // Licensed to The Open Group (TOG) under one or more contributor license
   // agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
   // this work for additional information regarding copyright ownership.
   // Each contributor licenses this file to you under the OpenPegasus Open
   // Source License; you may not use this file except in compliance with the
   // License.
   //
   // Permission is hereby granted, free of charge, to any person obtaining a
   // copy of this software and associated documentation files (the "Software"),
   // to deal in the Software without restriction, including without limitation
   // the rights to use, copy, modify, merge, publish, distribute, sublicense,
   // and/or sell copies of the Software, and to permit persons to whom the
   // Software is furnished to do so, subject to the following conditions:
   //
   // The above copyright notice and this permission notice shall be included
   // in all copies or substantial portions of the Software.
   //
   // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
   // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
   // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
   // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
   // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
   // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
   // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
   //
   //////////////////////////////////////////////////////////////////////////
   //
   // Author: Dong Xiang, EMC Corporation (xiang_dong@emc.com)
   //
   // Modified By: David Dillard, VERITAS Software Corp.
   //                  (david.dillard@veritas.com)
   //              Aruran, IBM (ashanmug@in.ibm.com) for Bug# 3604
 // //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
Line 31 
Line 39 
 #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;  
  
   /** 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:
       /**
        * Constructs a CIMListener object.
        *
        * @param portNumber the specified socket port the listener will listen to
        * @param sslContext the specifed SSL context
        */
       CIMListener(Uint32 portNumber, SSLContext* sslContext=NULL);
  
     enum Protocol { PROPRIETARY, STANDARD };      /**
        * Destructor of a CIMLIstener object.
     /** Constructor - Creates a CIMListener object.       */
         The CIM Listener objects establishes a repository object,  
         a dispatcher object, and creates a channnel factory and  
         acceptor for the Listener.  
         @param monitor    monitor object for the server.  
         @param rootPath Directory path to the repository.  
     */  
   
     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() const;
  
     Uint32 getOutstandingRequestCount();      /**
        * Adds a CIMIndicationConsumer to the listener
        *
        * @param consumer the CIMIndicationConsumer to add.
        * @return true if the indication consumer has been added successfully
        *              false otherwise.
        */
       Boolean addConsumer(CIMIndicationConsumer* consumer);
  
     CIMExportRequestDispatcher* getDispatcher();      /**
        * 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:
       /*
        * Copy constructor - not implemented
        */
       CIMListener(const CIMListener &);
  
     Boolean _dieNow;      /*
        * Assignment operator - not implemented
     String _rootPath;       */
     String _repositoryRootPath;      CIMListener &operator=(const CIMListener &);
   
     Boolean _dynamicReg;  
     Boolean _staticConsumers;  
     Boolean _persistence;  
   
     Monitor* _monitor;  
   
     CIMExportRequestDispatcher* _cimExportRequestDispatcher;  
     CIMExportResponseEncoder* _cimExportResponseEncoder;  
     CIMExportRequestDecoder* _cimExportRequestDecoder;  
  
     HTTPAcceptor*   _acceptor;      /*
        * rep object
        */
       void* _rep;
 }; };
  
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END


Legend:
Removed from v.1.3  
changed lines
  Added in v.1.15

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2