Protocols::Http::DataSerializer Class Reference

#include <DataSerializer.h> [code]

Inherits Protocols::Generics::DataSerializer.

Inheritance diagram for Protocols::Http::DataSerializer:

Inheritance graph
[legend]
Collaboration diagram for Protocols::Http::DataSerializer:

Collaboration graph
[legend]
List of all members.

Detailed Description

Serializes HTTP Data objects.

Definition at line 38 of file DataSerializer.h.

Public Member Functions

 DataSerializer (Protocol *)
 Constructs a DataSerializer object.
bool read (Data &, Transport *)
 Reads data from transport if possible.
bool write (const Data &, Transport *)
 Writes data to transport if it can take all the data.

Private Member Functions

bool readHeader (Data &, Transport *)
 Helper to read a Header object in data from transport.
bool readBody (Data &, Transport *)
 Helper to read a body chunk in data from transport.
bool writeHeader (const Data &, Transport *)
 Helper to write the header in data to transport.
bool writeBody (const Data &, Transport *)
 Helper to write the body chunk data to transport.

Private Attributes

Protocolprotocol
BodyReaderbodyReader
BodyWriterbodyWriter


Constructor & Destructor Documentation

DataSerializer::DataSerializer Protocol protocol  ) 
 

Constructs a DataSerializer object.

Parameters:
protocol is the HTTP protocol to use (provides factory methods for the HTTP Data objects and Codecs).

Definition at line 36 of file DataSerializer.cpp.


Member Function Documentation

bool DataSerializer::read Data data,
Transport transport
 

Reads data from transport if possible.

Parameters:
[out] data is the object to set after reading a Data object from transport.
transport is the object to read the raw bytes from.
Returns:
true if the raw bytes buffered in transport are enough to read a complete Data object which is returned in data.

false if there is not enough data buffered in transport. In this case data is not modified.

Definition at line 52 of file DataSerializer.cpp.

bool DataSerializer::readBody Data ,
Transport
[private]
 

Helper to read a body chunk in data from transport.

Definition at line 79 of file DataSerializer.cpp.

bool DataSerializer::readHeader Data ,
Transport
[private]
 

Helper to read a Header object in data from transport.

Definition at line 61 of file DataSerializer.cpp.

bool DataSerializer::write const Data data,
Transport transport
 

Writes data to transport if it can take all the data.

Parameters:
data is the Data object to write to transport.
transport is the Transport object to write to.
Returns:
true if transport could be written to transport.

false otherwise.

Definition at line 102 of file DataSerializer.cpp.

bool DataSerializer::writeBody const Data ,
Transport
[private]
 

Helper to write the body chunk data to transport.

Definition at line 123 of file DataSerializer.cpp.

bool DataSerializer::writeHeader const Data ,
Transport
[private]
 

Helper to write the header in data to transport.

Definition at line 111 of file DataSerializer.cpp.


Member Data Documentation

BodyReader* Protocols::Http::DataSerializer::bodyReader [private]
 

Definition at line 54 of file DataSerializer.h.

BodyWriter* Protocols::Http::DataSerializer::bodyWriter [private]
 

Definition at line 55 of file DataSerializer.h.

Protocol* Protocols::Http::DataSerializer::protocol [private]
 

Definition at line 53 of file DataSerializer.h.


The documentation for this class was generated from the following files: