POE::Component::Server::Bayeux::Request - A single Bayeux request
Objects in this class represent a single Bayeux request made to a Bayeux server. Requests are instantiated with an HTTP::Request and HTTP::Response object. This class is responsible for parsing the request content into a JSON object, creating one or more POE::Component::Server::Bayeux::Message objects that represent the possible message types of the Bayeux protocol, and handling each one in turn.
Requires 'request' (POE::Component::Server::HTTP::Request), 'response' (POE::Component::Server::HTTP::Response), and 'server_heap'. Returns init()'ed class object.
Call after creating the request. Calls the pre_handle(), handle() methods on each message, possibly completing the request.
Completes the request, calling the post_handle() method on the messages that need it.
These methods are mainly called by messages during their handle() phase.
Returns a POE::Component::Server::Bayeux::Client object with the given id.
Adds a message response onto the stack of responses.
Clears all messages and responses.
Adds a message to be handled in the post_handle() code.
Parses the POE::Component::Server::HTTP::Request object, extracting the JSON payload, creating a stack of POE::Component::Server::Bayeux::Message messages.
Convienence method to throw an error, returning to the client.
Encodes the messages into the payload of the response
Returns the server's logger.
Passthru to the POE server's subscribe state
Passthru to the POE server's unsubscribe state
Passthru to the POE server's publish state
Copyright (c) 2008 Eric Waters and XMission LLC (http://www.xmission.com/). All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
Eric Waters <ewaters@uarc.com>
To install POE::Component::Server::Bayeux, copy and paste the appropriate command in to your terminal.
cpanm
cpanm POE::Component::Server::Bayeux
CPAN shell
perl -MCPAN -e shell install POE::Component::Server::Bayeux
For more information on module installation, please visit the detailed CPAN module installation guide.