#include <FeedService.hpp>
Inherited by pion::plugins::FeedReader, and pion::plugins::FeedWriter.
Definition at line 43 of file FeedService.hpp.
Public Member Functions | |
| virtual | ~FeedHandler () |
| virtual destructor | |
| FeedHandler (pion::platform::ReactionEngine &reaction_engine, const std::string &reactor_id, pion::platform::CodecPtr &codec_ptr, pion::net::TCPConnectionPtr &tcp_conn) | |
| virtual void | start (void)=0 |
| starts the FeedHandler | |
| bool | sendResponse (void) |
| const std::string & | getConnectionId (void) const |
| returns the unique identifier for this particular connection | |
| const std::string & | getConnectionInfo (void) const |
| returns information describing this particular connection | |
| const std::string & | getReactorId (void) const |
| returns the unique identifier for the Reactor that this handler interacts with | |
| const std::string & | getCodecId (void) const |
| returns the unique identifier for the Codec that this handler uses | |
Static Public Member Functions | |
| static std::string | createConnectionInfo (pion::net::TCPConnectionPtr &tcp_conn) |
Protected Attributes | |
| pion::platform::ReactionEngine & | m_reaction_engine |
| reference to ReactionEngine used to send Events to Reactors | |
| PionLogger | m_logger |
| primary logging interface used by this class | |
| const std::string | m_connection_id |
| unique identifier for this particular connection (generated when constructed) | |
| const std::string | m_connection_info |
| information describing this particular connection (generated when constructed) | |
| const std::string | m_reactor_id |
| unique identifier for the Reactor that this handler interacts with | |
| pion::platform::CodecPtr | m_codec_ptr |
| pointer to the Codec used to write outgoing Event streams | |
| pion::net::TCPConnectionPtr | m_tcp_conn |
| TCP connection for sending outgoing Event streams. | |
| pion::net::TCPStream | m_tcp_stream |
| Wrapper on top of the TCP connection for synchronous stream operations. | |
| boost::mutex | m_mutex |
| mutex used to protect the FeedHandler's data | |
| pion::plugins::FeedHandler::FeedHandler | ( | pion::platform::ReactionEngine & | reaction_engine, | |
| const std::string & | reactor_id, | |||
| pion::platform::CodecPtr & | codec_ptr, | |||
| pion::net::TCPConnectionPtr & | tcp_conn | |||
| ) |
constructs a new FeedHandler object
| reaction_engine | reference to the ReactionEngine | |
| reactor_id | unique identifier for the Reactor that this handler interacts with | |
| codec_ptr | pointer to the Codec that this handler will use | |
| tcp_conn | TCP connection that will be used to send/receive Events |
Definition at line 39 of file FeedService.cpp.
| std::string pion::plugins::FeedHandler::createConnectionInfo | ( | pion::net::TCPConnectionPtr & | tcp_conn | ) | [static] |
generates a string describing information for a TCP connection
| tcp_conn | TCP connection that will be used to send/receive Events |
Definition at line 78 of file FeedService.cpp.
| bool pion::plugins::FeedHandler::sendResponse | ( | void | ) |
sends an HTTP response over the TCP connection
Definition at line 50 of file FeedService.cpp.
References pion::net::HTTPMessage::createContentBuffer(), getConnectionId(), m_reaction_engine, m_tcp_conn, pion::net::HTTPMessage::send(), pion::net::HTTPMessage::setContentLength(), pion::net::HTTPMessage::setContentType(), pion::net::HTTPResponse::setStatusCode(), pion::net::HTTPResponse::setStatusMessage(), and pion::platform::ReactionEngine::writeConnectionsXML().
Referenced by pion::plugins::FeedReader::start(), and pion::plugins::FeedWriter::start().
1.4.7