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

  1 a.dunfey 1.6.16.1 //%2006////////////////////////////////////////////////////////////////////////
  2 tony     1.1      //
  3 karl     1.5      // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
  4                   // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
  5                   // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
  6 karl     1.2      // IBM Corp.; EMC Corporation, The Open Group.
  7 karl     1.5      // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
  8                   // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
  9 karl     1.6      // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10                   // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11 a.dunfey 1.6.16.1 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 12                   // EMC Corporation; Symantec Corporation; The Open Group.
 13 tony     1.1      //
 14                   // Permission is hereby granted, free of charge, to any person obtaining a copy
 15                   // of this software and associated documentation files (the "Software"), to
 16                   // deal in the Software without restriction, including without limitation the
 17                   // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 18                   // sell copies of the Software, and to permit persons to whom the Software is
 19                   // furnished to do so, subject to the following conditions:
 20                   // 
 21                   // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 22                   // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 23                   // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 24                   // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 25                   // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 26                   // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 27                   // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 28                   // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 29                   //
 30                   //==============================================================================
 31                   //
 32                   // Author: Dong Xiang, EMC Corporation (xiang_dong@emc.com)
 33                   //
 34 a.arora  1.4      // Modified By: Amit K Arora, IBM (amita@in.ibm.com) for Bug#1811
 35 tony     1.1      //
 36                   //%/////////////////////////////////////////////////////////////////////////////
 37                   
 38                   #ifndef Pegasus_List_h
 39                   #define Pegasus_List_h
 40                   
 41                   #include <Pegasus/Common/Config.h>
 42                   #include <Pegasus/Listener/Linkage.h>
 43                   
 44                   PEGASUS_NAMESPACE_BEGIN
 45                   
 46                   /**
 47                    * Iterator
 48                    */
 49                   class Iterator
 50                   {
 51                   public:
 52 david.dillard 1.3          /**
 53                             * Destroys the object.  This is needed so that an object of a
 54                             * subclass can be correctly destroyed thru an Iterator pointer.
 55                             */
 56 a.arora       1.4          virtual ~Iterator() {};
 57 david.dillard 1.3      
 58 tony          1.1      	/**
 59                           * Returns <tt>true</tt> if the iteration has more elements. (In other
 60                           * words, returns <tt>true</tt> if <tt>next</tt> would return an element
 61                           * rather than throwing an exception.)
 62                           *
 63                           * @return <tt>true</tt> if the iterator has more elements.
 64                        	 */
 65                        	virtual Boolean hasNext() = 0;
 66                        	
 67                        	/**
 68                        	 * Returns the next element in the interation.
 69                        	 *
 70                        	 * @returns the next element in the interation.
 71                        	 * @exception NoSuchElementException iteration has no more elements.
 72                        	 */
 73                        	virtual void* next() = 0;
 74                        	
 75                        	/**
 76                        	 * 
 77                        	 * Removes from the underlying collection the last element returned by the
 78                        	 * iterator (optional operation).  This method can be called only once per
 79 tony          1.1      	 * call to <tt>next</tt>.  The behavior of an iterator is unspecified if
 80                        	 * the underlying collection is modified while the iteration is in
 81                        	 * progress in any way other than by calling this method.
 82                        	 *
 83                        	 * @exception UnsupportedOperationException if the <tt>remove</tt>
 84                        	 *		  operation is not supported by this Iterator.
 85                        	 */
 86                        	virtual void remove() = 0;
 87                        };
 88                        
 89                        /**
 90                         * PtrList
 91                         */
 92                        class PtrList
 93                        {
 94                        public:
 95                        	/**
 96                        	 * Constructs a PtrList object.
 97                        	 * 
 98                        	 * @param portNumber	the specified socket port the listener will listen to
 99                           * @param sslContext	the specifed SSL context 
100 tony          1.1      	 */
101                        	PtrList();
102                        	/**
103                        	 * Destructor of a PtrList object.
104                        	 */
105                          ~PtrList();
106                        
107                        	/**
108                        	 * Adds an element into the list
109                        	 *
110                        	 * @param the element to add.
111                        	 */
112                        	void add(void* element);
113                        
114                        	/**
115                        	 * Removes an element from the list
116                        	 *
117                        	 * @param the element to remove.
118                        	 */
119                        	void remove(void* element);
120                        
121 tony          1.1      	/**
122                           * Returns an iterator over the elements in this list in proper sequence.
123                           *
124                           * @return an iterator over the elements in this list in proper sequence.
125                           */
126                        	Iterator* iterator();
127                        
128                        private:
129                        	void* _rep;
130                        };
131                        
132                        PEGASUS_NAMESPACE_END
133                        
134                        #endif /* Pegasus_List_h */
135                        

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2