Classes | Public Member Functions | Private Member Functions | Static Private Attributes | Friends

ACE::HTTP::SessionFactory_Impl Class Reference

#include <HTTP_ClientRequestHandler.h>

Inheritance diagram for ACE::HTTP::SessionFactory_Impl:
Inheritance graph
[legend]
Collaboration diagram for ACE::HTTP::SessionFactory_Impl:
Collaboration graph
[legend]

List of all members.

Classes

class  SessionHolder_Impl

Public Member Functions

virtual
ACE::INet::ConnectionHolder
create_connection (const ACE::INet::ConnectionKey &key) const

Private Member Functions

 SessionFactory_Impl ()
virtual ~SessionFactory_Impl ()

Static Private Attributes

static SessionFactory_Implfactory_

Friends

class ACE_Singleton< SessionFactory_Impl, ACE_SYNCH::NULL_MUTEX >

Detailed Description

Definition at line 78 of file HTTP_ClientRequestHandler.h.


Constructor & Destructor Documentation

ACE::HTTP::SessionFactory_Impl::SessionFactory_Impl (  )  [private]

Definition at line 76 of file HTTP_ClientRequestHandler.cpp.

      {
        INET_DEBUG (6, (LM_INFO, DLINFO
                                 ACE_TEXT ("HTTP_SessionFactory_Impl::ctor - ")
                                 ACE_TEXT ("registering session factory for scheme [%C]\n"),
                                 URL::protocol ().c_str ()));
        SessionFactoryRegistry::instance ().register_session_factory (URL::protocol (), this);
      }

ACE::HTTP::SessionFactory_Impl::~SessionFactory_Impl (  )  [private, virtual]

Definition at line 85 of file HTTP_ClientRequestHandler.cpp.

      {
      }


Member Function Documentation

ACE::INet::ConnectionHolder * ACE::HTTP::SessionFactory_Impl::create_connection ( const ACE::INet::ConnectionKey key  )  const [virtual]

Implements ACE::INet::ConnectionFactory.

Definition at line 90 of file HTTP_ClientRequestHandler.cpp.

      {
        INET_TRACE ("HTTP_SessionFactory_Impl::create_connection");

        const ClientRequestHandler::HttpConnectionKey& ikey =
            dynamic_cast<const ClientRequestHandler::HttpConnectionKey&> (key);

        SessionHolder_Impl* session_holder = 0;
        ACE_NEW_RETURN (session_holder,
                        SessionHolder_Impl (),
                        0);
        ACE_Auto_Ptr<SessionHolder_Impl> session_safe_ref (session_holder);

        (*session_holder)->set_host (ikey.host (), ikey.port ());
        if (ikey.is_proxy_connection ())
          {
            (*session_holder)->set_proxy_target (ikey.proxy_target_host (),
                                                 ikey.proxy_target_port ());
          }

        if ((*session_holder)->connect (true))
          {
            return session_safe_ref.release ();
          }

        return 0;
      }


Friends And Related Function Documentation

friend class ACE_Singleton< SessionFactory_Impl, ACE_SYNCH::NULL_MUTEX > [friend]

Definition at line 85 of file HTTP_ClientRequestHandler.h.


Member Data Documentation


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