POE::C...Request(3pm)
π NAME π
POE::Component::Server::Bayeux::Request β it's giving one single Bayeux request, bestie. That's the whole vibe. We're in the POE::C...Request(3pm) page, and she's short but she's iconic π
β¨ DESCRIPTION β¨
Okay so listen. Objects in this class represent one single Bayeux request made to a Bayeux server. One. Singular. Main character energy, no sharing π
You instantiate these lil guys with an HTTP::Request and an HTTP::Response object. And then she has three jobs and she does all three:
- Parse the request content into a JSON object πΈ
- Create one or more
POE::Component::Server::Bayeux::Messageobjects that represent the possible message types of the Bayeux protocol π¦ - Handle each one in turn, one by one, no cutting the line π«Ά
π§ CLASS METHODS π§
π new ()
Requires 'request' (POE::Component::Server::HTTP::Request), 'response' (POE::Component::Server::HTTP::Response), and 'server_heap'. Returns an init()'ed class object. Like, it comes out of the box already set up, we love a self-sufficient queen β¨
π OBJECT METHODS π
π handle ()
Call this after creating the request, bestie. She calls the pre_handle(), handle() methods on each message, and possibly completes the request. It's the whole routine. The choreography. The way that she just does it π
π complete ()
Completes the request β she calls the post_handle() method on the messages that need it. Only the ones that need it. She's not doing extra work for free, periodt π
π PRIVATE METHODS π
These methods are mainly called by messages during their handle() phase. So like, they're backstage. Crew only. But we're telling you anyway because we're your bestie π«Ά
client ($id)β Returns aPOE::Component::Server::Bayeux::Clientobject with the given$id. You want the client? Here's your client πadd_response ($response)β Adds a message response onto the stack of responses. Stack 'em up, babe πclear_stack ()β Clears all messages and responses. Total reset. Fresh start. Clean slate. Slay π¦add_post_handle ($message)β Adds a message to be handled in thepost_handle()code. Queue her up for the after-party πinit ()β Parses thePOE::Component::Server::HTTP::Requestobject, extracting the JSON payload, creating a stack ofPOE::Component::Server::Bayeux::Messagemessages. This is where the magic happens fr fr β¨error ($message)β Convenience method to throw an error, returning to the client. When it's not giving, she says so and bounces πform_response (@messages)β Encodes the messages into the payload of the response. Assembly time, get in formation πlogger ()β Returns the server's logger. For when you need to know things πsubscribe ($client_id, $channel)β Passthru to the POE server'ssubscribestate. Handing it straight off, no middleman behaviour πΈunsubscribe ($client_id, $channel)β Passthru to the POE server'sunsubscribestate. Same energy, opposite direction πpublish ($client_id, $channel, $data)β Passthru to the POE server'spublishstate. Straight to the server, no cap π₯
π COPYRIGHT π
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. Read it, bestie, it's literally right there π«Ά
π AUTHOR π
Eric Waters <ewaters@uarc.com>
okay that's the whole page, you ate that π This wasperl v5.42.0, dated2025-07-25, from thePOE::C...Request(3pm)manual. Go forth and handle your requests, queen ππ
π¦ where this page comes from
- fedora 43: perl-POE-Component-Server-Bayeux 0.04-43.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms