Public Member Functions | Protected Member Functions | Private Attributes

My_HTTP_RequestHandler Class Reference

Inheritance diagram for My_HTTP_RequestHandler:
Inheritance graph
[legend]
Collaboration diagram for My_HTTP_RequestHandler:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 My_HTTP_RequestHandler ()
virtual ~My_HTTP_RequestHandler ()

Protected Member Functions

virtual void handle_request_error (const ACE::HTTP::URL &url)
virtual void handle_connection_error (const ACE::HTTP::URL &url)
virtual void after_read (const char_type *, int length_read)
virtual void on_eof ()

Private Attributes

int in_length_
int read_length_

Detailed Description

Definition at line 123 of file HTTP_Simple_exec.cpp.


Constructor & Destructor Documentation

My_HTTP_RequestHandler::My_HTTP_RequestHandler (  )  [inline]

Definition at line 127 of file HTTP_Simple_exec.cpp.

: in_length_ (0), read_length_ (0) {}

virtual My_HTTP_RequestHandler::~My_HTTP_RequestHandler (  )  [inline, virtual]

Definition at line 128 of file HTTP_Simple_exec.cpp.

{}


Member Function Documentation

virtual void My_HTTP_RequestHandler::after_read ( const char_type ,
int  length_read 
) [inline, protected, virtual]

Reimplemented from ACE::IOS::StreamInterceptorBase< ACE_CHAR_T, TR >.

Definition at line 143 of file HTTP_Simple_exec.cpp.

      {
        if (this->read_length_ == 0)
          {
            this->in_length_ = this->response ().get_content_length ();
          }
        this->read_length_ += length_read;
        std::cout << "\r [" << this->read_length_ << '/';
        if (this->in_length_ != ACE::HTTP::Response::UNKNOWN_CONTENT_LENGTH)
          {
            std::cout << this->in_length_ << "] " << ((this->read_length_ * 100) / this->in_length_) << "%";
          }
        else
          std::cout << "???]";
        std::cout.flush ();
      }

virtual void My_HTTP_RequestHandler::handle_connection_error ( const ACE::HTTP::URL url  )  [inline, protected, virtual]

Reimplemented from ACE::HTTP::ClientRequestHandler.

Definition at line 137 of file HTTP_Simple_exec.cpp.

      {
        std::cout << "ERROR" << std::endl;
        std::cerr << "Failed to set up connection for " << url.to_string ().c_str () << std::endl;
      }

virtual void My_HTTP_RequestHandler::handle_request_error ( const ACE::HTTP::URL url  )  [inline, protected, virtual]

Reimplemented from ACE::HTTP::ClientRequestHandler.

Definition at line 131 of file HTTP_Simple_exec.cpp.

      {
        std::cout << "ERROR" << std::endl;
        std::cerr << "Failed to handle request for " << url.to_string ().c_str () << std::endl;
      }

virtual void My_HTTP_RequestHandler::on_eof ( void   )  [inline, protected, virtual]

Reimplemented from ACE::HTTP::ClientRequestHandler.

Definition at line 160 of file HTTP_Simple_exec.cpp.

      {
        ACE::HTTP::ClientRequestHandler::on_eof ();
        std::cout << std::endl;
        this->read_length_ = 0;
      }


Member Data Documentation

Definition at line 168 of file HTTP_Simple_exec.cpp.

Definition at line 169 of file HTTP_Simple_exec.cpp.


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