Command handler interface. More...
#include <commandHandler.hpp>
Public Types | |
enum | Operation { READ, WRITE, CLOSE } |
Operation type. More... | |
Public Member Functions | |
CommandHandler () | |
Defaul constructor. More... | |
virtual | ~CommandHandler () |
Destructor. More... | |
virtual Operation | nextOperation ()=0 |
Get the next operation to do for the connection handler. More... | |
virtual void | putInput (const void *begin, std::size_t bytesTransferred, bool eod)=0 |
Passes the network input to the command handler (READ operation) More... | |
virtual void | getOutput (const void *&begin, std::size_t &bytesToTransfer)=0 |
Get the next output chunk from the command handler (WRITE operation) More... | |
const char * | lastError () const |
Get the last error message of command execution to be returned to the client. More... | |
void | setLastError (const std::string &msg) |
Set the last error message of command execution to be returned to the client. More... | |
virtual void | setExecContext (proc::ExecContext *c) |
Pass the reference to the execution context to the command handler. More... | |
proc::ExecContext * | execContext () |
Get the reference to the processor provider. More... | |
const types::DoctypeInfo * | doctypeInfo () const |
Get info about processed document type. More... | |
virtual void | setDoctypeInfo (const types::DoctypeInfoR &doctypeinfo_) |
Set info about processed document type. More... | |
std::size_t | outputChunkSize () const |
Get a hint for the size of output chunks in bytes. More... | |
virtual void | setOutputChunkSize (std::size_t outputChunkSize_) |
Set a hint for the size of output chunks in bytes. More... | |
Private Attributes | |
std::string | m_lastError |
Error operation for the client. More... | |
proc::ExecContext * | m_execContext |
The reference to the execution context of the connection. More... | |
types::DoctypeInfoR | m_doctypeinfo |
Document type information. More... | |
std::size_t | m_outputChunkSize |
Hint for the size of output chunks. More... | |
Command handler interface.
|
inline |
Defaul constructor.
|
inlinevirtual |
Destructor.
|
inline |
Get info about processed document type.
|
inline |
Get the reference to the processor provider.
|
pure virtual |
Get the next output chunk from the command handler (WRITE operation)
[out] | begin | start of the output chunk |
[out] | bytesToTransfer | size of the output chunk to send in bytes |
Implemented in _Wolframe::cmdbind::IOFilterCommandHandler.
|
inline |
Get the last error message of command execution to be returned to the client.
|
pure virtual |
Get the next operation to do for the connection handler.
Implemented in _Wolframe::cmdbind::IOFilterCommandHandler.
|
inline |
Get a hint for the size of output chunks in bytes.
|
pure virtual |
Passes the network input to the command handler (READ operation)
[in] | begin | start of the network input block. |
[in] | bytesTransferred | number of bytes passed in the input block |
[in] | eod | (end of data) true, if the passed chunk is the last one |
Implemented in _Wolframe::cmdbind::IOFilterCommandHandler.
|
inlinevirtual |
Set info about processed document type.
|
inlinevirtual |
Pass the reference to the execution context to the command handler.
[in] | c | the reference to the execution context owned by the caller (connection) |
|
inline |
Set the last error message of command execution to be returned to the client.
|
inlinevirtual |
Set a hint for the size of output chunks in bytes.
Reimplemented in _Wolframe::cmdbind::IOFilterCommandHandler.
|
private |
Document type information.
|
private |
The reference to the execution context of the connection.
|
private |
Error operation for the client.
|
private |
Hint for the size of output chunks.
Copyright © 2014 - Project Wolframe - All Rights Reserved