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

  1 martin 1.15 //%LICENSE////////////////////////////////////////////////////////////////
  2 martin 1.16 //
  3 martin 1.15 // Licensed to The Open Group (TOG) under one or more contributor license
  4             // agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
  5             // this work for additional information regarding copyright ownership.
  6             // Each contributor licenses this file to you under the OpenPegasus Open
  7             // Source License; you may not use this file except in compliance with the
  8             // License.
  9 martin 1.16 //
 10 martin 1.15 // Permission is hereby granted, free of charge, to any person obtaining a
 11             // copy of this software and associated documentation files (the "Software"),
 12             // to deal in the Software without restriction, including without limitation
 13             // the rights to use, copy, modify, merge, publish, distribute, sublicense,
 14             // and/or sell copies of the Software, and to permit persons to whom the
 15             // Software is furnished to do so, subject to the following conditions:
 16 martin 1.16 //
 17 martin 1.15 // The above copyright notice and this permission notice shall be included
 18             // in all copies or substantial portions of the Software.
 19 martin 1.16 //
 20 martin 1.15 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 21 martin 1.16 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 22 martin 1.15 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 23             // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 24             // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 25             // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 26             // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 27 martin 1.16 //
 28 martin 1.15 //////////////////////////////////////////////////////////////////////////
 29 kumpf  1.1  //
 30 tony   1.6  // Author: Dong Xiang, EMC Corporation (xiang_dong@emc.com)
 31 kumpf  1.1  //
 32 david.dillard 1.11 // Modified By: David Dillard, VERITAS Software Corp.
 33                    //                  (david.dillard@veritas.com)
 34 aruran.ms     1.12 //              Aruran, IBM (ashanmug@in.ibm.com) for Bug# 3604
 35 kumpf         1.1  //
 36                    //%/////////////////////////////////////////////////////////////////////////////
 37                    
 38                    #ifndef Pegasus_Listener_h
 39                    #define Pegasus_Listener_h
 40                    
 41                    #include <Pegasus/Common/Config.h>
 42 chuck         1.3  #include <Pegasus/Listener/Linkage.h>
 43 kumpf         1.1  
 44                    PEGASUS_NAMESPACE_BEGIN
 45                    
 46 tony          1.6  class SSLContext;
 47                    class CIMIndicationConsumer;
 48 kumpf         1.1  
 49 karl          1.7  
 50                    /** CIMListener provides the interfaces that allows CIMListeners to be
 51                        created and managed. CIMListeners are the receivers for cim/xml indications.
 52                        ATTN: KS needs to be completed.TBD
 53                    */
 54 kumpf         1.1  class PEGASUS_LISTENER_LINKAGE CIMListener
 55                    {
 56                    public:
 57 david.dillard 1.11     /**
 58                         * Constructs a CIMListener object.
 59                         *
 60                         * @param portNumber the specified socket port the listener will listen to
 61                         * @param sslContext the specifed SSL context
 62                         */
 63                        CIMListener(Uint32 portNumber, SSLContext* sslContext=NULL);
 64                    
 65                        /**
 66                         * Destructor of a CIMLIstener object.
 67                         */
 68 kumpf         1.1      ~CIMListener();
 69                    
 70 david.dillard 1.11     /**
 71                         * Returns the socket port number
 72                         *
 73                         * @return the socket port number.
 74                         */
 75                        Uint32 getPortNumber() const;
 76                    
 77                        /**
 78                         * Returns the SSL context
 79                         *
 80                         * @return the SSL context.
 81                         */
 82                        SSLContext* getSSLContext() const;
 83                    
 84                        /**
 85                         * Sets the SSL context
 86                         *
 87                         * @param the SSL context.
 88                         */
 89                        void setSSLContext(SSLContext* sslContext);
 90                    
 91 david.dillard 1.11     /**
 92                         * Starts for listening.
 93                         */
 94                        void start();
 95                    
 96                        /**
 97                         * Stops listening
 98                         */
 99                        void stop();
100                    
101                        /**
102                         * Returns if the listener is active
103                         *
104                         * @return true if the listener is active;
105                         *              false otherwise.
106                         */
107 aruran.ms     1.12     Boolean isAlive() const;
108 david.dillard 1.11 
109                        /**
110                         * Adds a CIMIndicationConsumer to the listener
111                         *
112                         * @param consumer the CIMIndicationConsumer to add.
113                         * @return true if the indication consumer has been added successfully
114                         *              false otherwise.
115                         */
116                        Boolean addConsumer(CIMIndicationConsumer* consumer);
117                    
118                        /**
119                         * Removes a CIMIndicationConsumer from the listener.
120                         *
121                         * @param the CIMIndicationConsumer to remove.
122                         * @return true if the indication consumer has been removed successfully
123                         *              false otherwise.
124                         */
125                        Boolean removeConsumer(CIMIndicationConsumer* consumer);
126 kumpf         1.1  
127                    private:
128 david.dillard 1.11     /*
129                         * Copy constructor - not implemented
130                         */
131                        CIMListener(const CIMListener &);
132                    
133                        /*
134                         * Assignment operator - not implemented
135                         */
136                        CIMListener &operator=(const CIMListener &);
137                    
138                        /*
139                         * rep object
140                         */
141                        void* _rep;
142 kumpf         1.1  };
143                    
144                    PEGASUS_NAMESPACE_END
145                    
146                    #endif /* Pegasus_Listener_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2