(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 jsafrane      1.17 #include <Pegasus/Common/String.h>
 43 chuck         1.3  #include <Pegasus/Listener/Linkage.h>
 44 kumpf         1.1  
 45                    PEGASUS_NAMESPACE_BEGIN
 46                    
 47 tony          1.6  class SSLContext;
 48                    class CIMIndicationConsumer;
 49 kumpf         1.1  
 50 karl          1.7  
 51                    /** CIMListener provides the interfaces that allows CIMListeners to be
 52                        created and managed. CIMListeners are the receivers for cim/xml indications.
 53                        ATTN: KS needs to be completed.TBD
 54                    */
 55 kumpf         1.1  class PEGASUS_LISTENER_LINKAGE CIMListener
 56                    {
 57                    public:
 58 david.dillard 1.11     /**
 59                         * Constructs a CIMListener object.
 60                         *
 61 jsafrane      1.17      * @param address    the specified address to be bound to
 62                         * @param portNumber the specified socket port the listener will listen to
 63                         * @param sslContext the specifed SSL context
 64                         */
 65                        CIMListener(
 66                            const String &listenAddress,
 67                            Uint32 portNumber,
 68                            SSLContext* sslContext=NULL);
 69                    
 70                        /**
 71                         * Constructs a CIMListener object.
 72                         *
 73 david.dillard 1.11      * @param portNumber the specified socket port the listener will listen to
 74                         * @param sslContext the specifed SSL context
 75                         */
 76                        CIMListener(Uint32 portNumber, SSLContext* sslContext=NULL);
 77                    
 78                        /**
 79                         * Destructor of a CIMLIstener object.
 80                         */
 81 kumpf         1.1      ~CIMListener();
 82                    
 83 david.dillard 1.11     /**
 84 jsafrane      1.17      * Returns the bind address.
 85                         *
 86                         * @return the bind address.
 87                         */
 88                        String getListenAddress() const;
 89                    
 90                        /**
 91 david.dillard 1.11      * Returns the socket port number
 92                         *
 93                         * @return the socket port number.
 94                         */
 95                        Uint32 getPortNumber() const;
 96                    
 97                        /**
 98                         * Returns the SSL context
 99                         *
100                         * @return the SSL context.
101                         */
102                        SSLContext* getSSLContext() const;
103                    
104                        /**
105                         * Sets the SSL context
106                         *
107                         * @param the SSL context.
108                         */
109                        void setSSLContext(SSLContext* sslContext);
110                    
111                        /**
112 david.dillard 1.11      * Starts for listening.
113                         */
114                        void start();
115                    
116                        /**
117                         * Stops listening
118                         */
119                        void stop();
120                    
121                        /**
122                         * Returns if the listener is active
123                         *
124                         * @return true if the listener is active;
125                         *              false otherwise.
126                         */
127 aruran.ms     1.12     Boolean isAlive() const;
128 david.dillard 1.11 
129                        /**
130                         * Adds a CIMIndicationConsumer to the listener
131                         *
132                         * @param consumer the CIMIndicationConsumer to add.
133                         * @return true if the indication consumer has been added successfully
134                         *              false otherwise.
135                         */
136                        Boolean addConsumer(CIMIndicationConsumer* consumer);
137                    
138                        /**
139                         * Removes a CIMIndicationConsumer from the listener.
140                         *
141                         * @param the CIMIndicationConsumer to remove.
142                         * @return true if the indication consumer has been removed successfully
143                         *              false otherwise.
144                         */
145                        Boolean removeConsumer(CIMIndicationConsumer* consumer);
146 kumpf         1.1  
147                    private:
148 david.dillard 1.11     /*
149                         * Copy constructor - not implemented
150                         */
151                        CIMListener(const CIMListener &);
152                    
153                        /*
154                         * Assignment operator - not implemented
155                         */
156                        CIMListener &operator=(const CIMListener &);
157                    
158                        /*
159                         * rep object
160                         */
161                        void* _rep;
162 kumpf         1.1  };
163                    
164                    PEGASUS_NAMESPACE_END
165                    
166                    #endif /* Pegasus_Listener_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2