Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes

TAO_HTTP_Handler Class Reference

#include <HTTP_Handler.h>

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

List of all members.

Public Member Functions

 TAO_HTTP_Handler (void)
 Null constructor, insures that it works properly with Connector.
 TAO_HTTP_Handler (ACE_Message_Block *mb, ACE_TCHAR *filename)
 Always use this constructor to make HTTP_Handlers.
size_t byte_count (void) const
 returns the number of bytes read/written in the last operation.
virtual int open (void *=0)
 Activate this instance of the <HTTP_Handler>
virtual int close (u_long flags=0)
 Close down the Blob.
 ~TAO_HTTP_Handler (void)

Protected Types

enum  { MAX_HEADER_SIZE = 2048, MTU = BUFSIZ }

Protected Member Functions

virtual int send_request (void)
virtual int receive_reply (void)

Protected Attributes

ACE_Message_Blockmb_
ACE_TCHARfilename_
size_t bytecount_

Detailed Description

class to retrieve data via HTTP

Definition at line 41 of file HTTP_Handler.h.


Member Enumeration Documentation

anonymous enum [protected]
Enumerator:
MAX_HEADER_SIZE 

The handler assumes that the first 2048 bytes of a server response contains the header

MTU 

set the MAX_TRANSMISSION_UNIT (MTU) = BUFSIZ as defined by OS

Definition at line 69 of file HTTP_Handler.h.

  {
    /// The handler assumes that the first 2048 bytes of a server response
    /// contains the header
    MAX_HEADER_SIZE = 2048,

    /// set the MAX_TRANSMISSION_UNIT (MTU) = BUFSIZ as defined by OS
    MTU = BUFSIZ
  };


Constructor & Destructor Documentation

TAO_HTTP_Handler::TAO_HTTP_Handler ( void   ) 

Null constructor, insures that it works properly with Connector.

Definition at line 13 of file HTTP_Handler.cpp.

{
}

TAO_HTTP_Handler::TAO_HTTP_Handler ( ACE_Message_Block mb,
ACE_TCHAR filename 
)

Always use this constructor to make HTTP_Handlers.

Definition at line 17 of file HTTP_Handler.cpp.

                                                 :
  mb_ (mb),
  filename_ (ACE_OS::strdup (filename)),
  bytecount_ (0)
{
}

TAO_HTTP_Handler::~TAO_HTTP_Handler ( void   ) 

Definition at line 25 of file HTTP_Handler.cpp.

{
  if (this->filename_)
    {
      ACE_OS::free (this->filename_);
      filename_ = 0;
    }
}


Member Function Documentation

size_t TAO_HTTP_Handler::byte_count ( void   )  const

returns the number of bytes read/written in the last operation.

Definition at line 65 of file HTTP_Handler.cpp.

{
  return bytecount_;
}

int TAO_HTTP_Handler::close ( u_long  flags = 0  )  [virtual]

Close down the Blob.

Reimplemented from ACE_Svc_Handler< ACE_SOCK_STREAM, ACE_NULL_SYNCH >.

Definition at line 47 of file HTTP_Handler.cpp.

{
  return 0;
}

int TAO_HTTP_Handler::open ( void *  = 0  )  [virtual]

Activate this instance of the <HTTP_Handler>

Reimplemented from ACE_Svc_Handler< ACE_SOCK_STREAM, ACE_NULL_SYNCH >.

Definition at line 35 of file HTTP_Handler.cpp.

{
  if (this->send_request () != 0)
    ACE_ERROR_RETURN ((LM_ERROR, "TAO (%P|%t) - HTTP_Handler::open, send_request failed\n"), -1);

  if (this->receive_reply () != 0)
    ACE_ERROR_RETURN ((LM_ERROR, "TAO (%P|%t) - HTTP_Handler::open, receive_reply failed\n"), -1);
  return 0;

}

int TAO_HTTP_Handler::receive_reply ( void   )  [protected, virtual]

Reimplemented in TAO_HTTP_Reader.

Definition at line 59 of file HTTP_Handler.cpp.

{
  return -1;
}

int TAO_HTTP_Handler::send_request ( void   )  [protected, virtual]

Reimplemented in TAO_HTTP_Reader.

Definition at line 53 of file HTTP_Handler.cpp.

{
  return -1;
}


Member Data Documentation

size_t TAO_HTTP_Handler::bytecount_ [protected]

Definition at line 68 of file HTTP_Handler.h.

Definition at line 67 of file HTTP_Handler.h.

Definition at line 66 of file HTTP_Handler.h.


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