Public Member Functions | Protected Member Functions | Private Attributes

ACE::HTTP::ClientRequestHandler::HttpConnectionKey Class Reference

#include <HTTP_ClientRequestHandler.h>

Collaboration diagram for ACE::HTTP::ClientRequestHandler::HttpConnectionKey:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 HttpConnectionKey (const ACE_CString &host, u_short port)
 HttpConnectionKey (const ACE_CString &proxy_host, u_short proxy_port, const ACE_CString &target_host, u_short target_port)
virtual ~HttpConnectionKey ()
virtual u_long hash () const
virtual ConnectionKey * duplicate () const
bool is_proxy_connection () const
const ACE_CStringproxy_target_host () const
u_short proxy_target_port () const

Protected Member Functions

virtual bool equal (const ConnectionKey &key) const

Private Attributes

bool proxy_connection_
ACE_CString proxy_target_host_
u_short proxy_target_port_

Detailed Description

Definition at line 179 of file HTTP_ClientRequestHandler.h.


Constructor & Destructor Documentation

ACE::HTTP::ClientRequestHandler::HttpConnectionKey::HttpConnectionKey ( const ACE_CString host,
u_short  port 
)

Definition at line 119 of file HTTP_ClientRequestHandler.cpp.

      : INetConnectionKey (host, port),
        proxy_connection_ (false),
        proxy_target_port_ (0)
      {
      }

ACE::HTTP::ClientRequestHandler::HttpConnectionKey::HttpConnectionKey ( const ACE_CString proxy_host,
u_short  proxy_port,
const ACE_CString target_host,
u_short  target_port 
)

Definition at line 128 of file HTTP_ClientRequestHandler.cpp.

      : INetConnectionKey (proxy_host, proxy_port),
        proxy_connection_ (true),
        proxy_target_host_ (host),
        proxy_target_port_ (port)
      {
      }

ACE::HTTP::ClientRequestHandler::HttpConnectionKey::~HttpConnectionKey (  )  [virtual]

Definition at line 140 of file HTTP_ClientRequestHandler.cpp.

      {
      }


Member Function Documentation

ACE::INet::ConnectionKey * ACE::HTTP::ClientRequestHandler::HttpConnectionKey::duplicate ( void   )  const [virtual]

Definition at line 155 of file HTTP_ClientRequestHandler.cpp.

      {
        ConnectionKey* k = 0;
        if (this->proxy_connection_)
          {
            ACE_NEW_RETURN (k,
                            HttpConnectionKey (this->host (), this->port (),
                                               this->proxy_target_host_,
                                               this->proxy_target_port_),
                            0);
          }
        else
          {
            ACE_NEW_RETURN (k,
                            HttpConnectionKey (this->host (), this->port ()),
                            0);
          }
        return k;
      }

virtual bool ACE::HTTP::ClientRequestHandler::HttpConnectionKey::equal ( const ConnectionKey &  key  )  const [protected, virtual]
u_long ACE::HTTP::ClientRequestHandler::HttpConnectionKey::hash ( void   )  const [virtual]

Definition at line 144 of file HTTP_ClientRequestHandler.cpp.

      {
        if (this->proxy_connection_)
          return ACE_Hash<ACE_CString>()(this->proxy_target_host_) +
                this->proxy_target_port_ +
                (this->proxy_connection_ ? 1 : 0);
        else
          return INetConnectionKey::hash () +
                (this->proxy_connection_ ? 1 : 0);
      }

bool ACE::HTTP::ClientRequestHandler::HttpConnectionKey::is_proxy_connection (  )  const [inline]

Definition at line 24 of file HTTP_ClientRequestHandler.inl.

      {
        return this->proxy_connection_;
      }

const ACE_CString & ACE::HTTP::ClientRequestHandler::HttpConnectionKey::proxy_target_host (  )  const [inline]

Definition at line 30 of file HTTP_ClientRequestHandler.inl.

      {
        return this->proxy_target_host_;
      }

u_short ACE::HTTP::ClientRequestHandler::HttpConnectionKey::proxy_target_port (  )  const [inline]

Definition at line 36 of file HTTP_ClientRequestHandler.inl.

      {
        return this->proxy_target_port_;
      }


Member Data Documentation

Definition at line 205 of file HTTP_ClientRequestHandler.h.

Definition at line 206 of file HTTP_ClientRequestHandler.h.

Definition at line 207 of file HTTP_ClientRequestHandler.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines