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

Diff for /pegasus/src/Pegasus/Common/HTTPConnector.h between version 1.18 and 1.24.18.1

version 1.18, 2004/01/29 21:04:49 version 1.24.18.1, 2008/01/02 21:00:39
Line 1 
Line 1 
 //%2003////////////////////////////////////////////////////////////////////////  //%2006////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000, 2001, 2002  BMC Software, Hewlett-Packard Development  // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
 // Company, L. P., IBM Corp., 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.; // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.;
 // IBM Corp.; EMC Corporation, The Open Group. // 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.
   // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
   // EMC Corporation; VERITAS Software Corporation; The Open Group.
   // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
   // EMC Corporation; Symantec 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 23 
Line 29 
 // //
 //============================================================================== //==============================================================================
 // //
 // Author: Mike Brasher (mbrasher@bmc.com)  
 //  
 // Modified By: Carol Ann Krug Graves, Hewlett-Packard Company  
 //                (carolann_graves@hp.com)  
 //              Dan Gorey, IBM (djgorey@us.ibm.com)  
 //  
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
 #ifndef Pegasus_HTTPConnector_h #ifndef Pegasus_HTTPConnector_h
 #define Pegasus_HTTPConnector_h #define Pegasus_HTTPConnector_h
  
 #include <Pegasus/Common/Config.h> #include <Pegasus/Common/Config.h>
 #include <Pegasus/Common/MessageQueueService.h>  #include <Pegasus/Common/MessageQueue.h>
 #include <Pegasus/Common/Monitor.h> #include <Pegasus/Common/Monitor.h>
 #include <Pegasus/Common/String.h> #include <Pegasus/Common/String.h>
 #include <Pegasus/Common/TLS.h> #include <Pegasus/Common/TLS.h>
Line 44 
Line 44 
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
 struct HTTPConnectorRep; struct HTTPConnectorRep;
 struct HTTPConnector2Rep;  
  
 class HTTPConnection; class HTTPConnection;
  
Line 52 
Line 51 
     server. For each established connection, a HTTPConnection object     server. For each established connection, a HTTPConnection object
     is created.     is created.
 */ */
 class PEGASUS_COMMON_LINKAGE HTTPConnector : public MessageQueueService  class PEGASUS_COMMON_LINKAGE HTTPConnector : public MessageQueue
 { {
    public:    public:
  
       typedef MessageQueueService Base;      typedef MessageQueue Base;
  
       /** Constructor.       /** Constructor.
           @param monitor pointer to monitor object which this class uses to           @param monitor pointer to monitor object which this class uses to
Line 68 
Line 67 
  
       HTTPConnector(Monitor* monitor, SSLContext * sslcontext);       HTTPConnector(Monitor* monitor, SSLContext * sslcontext);
  
       HTTPConnector(monitor_2* monitor, SSLContext * sslcontext);  
   
       /** Destructor. */       /** Destructor. */
       ~HTTPConnector();       ~HTTPConnector();
  
Line 85 
Line 82 
  
           @param host indicates host to connect to           @param host indicates host to connect to
           @param portNumber indicates port number to use           @param portNumber indicates port number to use
           @param outputMessageQueue output message queue for the HTTPConnection  
           that will be created.  
           @exception InvalidLocatorException  
           @exception CannotCreateSocketException  
           @exception CannotConnectException  
       */  
       inline HTTPConnection* connect(  
          const String& host,  
          const Uint32 portNumber,  
          MessageQueue* outputMessageQueue)  
       {  
           return connect(host, portNumber, NULL, outputMessageQueue);  
       }  
   
       /** Establishes a new connection and creates an HTTPConnection object  
           to represent it.  
   
           @param host indicates host to connect to  
           @param portNumber indicates port number to use  
           @param sslContext Specifies the SSL context to use for this connection           @param sslContext Specifies the SSL context to use for this connection
           @param timeoutMilliseconds Specifies the connection timeout.
               If a socket is non-blocking and a connection is in progress after
               the initial attempt, the connection will be attempted until the
               specified timeout is reached.  If the specified timeout is zero,
               the connection will not be re-attempted.  The timeout is not
               applicable for a blocking socket.
           @param outputMessageQueue output message queue for the HTTPConnection           @param outputMessageQueue output message queue for the HTTPConnection
           that will be created.           that will be created.
           @exception InvalidLocatorException           @exception InvalidLocatorException
Line 115 
Line 99 
          const String& host,          const String& host,
          const Uint32 portNumber,          const Uint32 portNumber,
          SSLContext * sslContext,          SSLContext * sslContext,
           Uint32 timeoutMilliseconds,
          MessageQueue* outputMessageQueue);          MessageQueue* outputMessageQueue);
  
       /** Destroys all the connections created by this connector. */       /** Destroys all the connections created by this connector. */
Line 133 
Line 118 
  
       SSLContext * _sslcontext;       SSLContext * _sslcontext;
       int _entry_index;       int _entry_index;
   
 };  
   
   
 //****************************MONITOR2************************  
   
 class PEGASUS_COMMON_LINKAGE HTTPConnector2 : public MessageQueueService  
 {  
    public:  
   
       typedef MessageQueueService Base;  
   
       /** Constructor.  
           @param monitor pointer to monitor object which this class uses to  
           solicit SocketMessages on the server port (socket).  
           @param outputMessageQueue ouptut message queue for connections  
           created by this connector.  
       */  
       HTTPConnector2(monitor_2* monitor);  
   
       HTTPConnector2(monitor_2* monitor, SSLContext * sslcontext);  
   
       /** Destructor. */  
       ~HTTPConnector2();  
   
       /** This method is called whenever a SocketMessage is enqueued  
           on the input queue of the HTTPConnector object.  
       */  
   
       virtual void handleEnqueue(Message *);  
       virtual void handleEnqueue();  
   
       /** Establishes a new connection and creates an HTTPConnection object  
           to represent it.  
   
           @param host indicates host to connect to  
           @param portNumber indicates port number to use  
           @param outputMessageQueue output message queue for the HTTPConnection  
           that will be created.  
           @exception InvalidLocatorException  
           @exception CannotCreateSocketException  
           @exception CannotConnectException  
       */  
       inline HTTPConnection2* connect(  
          const String& host,  
          const Uint32 portNumber,  
          MessageQueue* outputMessageQueue)  
       {  
           return connect(host, portNumber, NULL, outputMessageQueue);  
       }  
   
       /** Establishes a new connection and creates an HTTPConnection object  
           to represent it.  
   
           @param host indicates host to connect to  
           @param portNumber indicates port number to use  
           @param sslContext Specifies the SSL context to use for this connection  
           @param outputMessageQueue output message queue for the HTTPConnection  
           that will be created.  
           @exception InvalidLocatorException  
           @exception CannotCreateSocketException  
           @exception CannotConnectException  
       */  
       HTTPConnection2* connect(  
          const String& host,  
          const Uint32 portNumber,  
          SSLContext * sslContext,  
          MessageQueue* outputMessageQueue);  
   
       /** Destroys all the connections created by this connector. */  
       void destroyConnections();  
   
       /** Close the specified connection. */  
       void disconnect(HTTPConnection2* connection);  
   
    private:  
   
       /** Delete the specified connection. */  
       void _deleteConnection(HTTPConnection2* httpConnection);  
   
       monitor_2* _monitor;  
       HTTPConnector2Rep* _rep2;  
   
       SSLContext * _sslcontext;  
       int _entry_index;  
   
 }; };
  
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END


Legend:
Removed from v.1.18  
changed lines
  Added in v.1.24.18.1

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2