POE::C...Request(3pm)

πŸ“¦
version 0.04 Β· 2 versions
, in fedora 43

πŸ’– 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:

  1. Parse the request content into a JSON object 🌸
  2. Create one or more POE::Component::Server::Bayeux::Message objects that represent the possible message types of the Bayeux protocol πŸ¦‹
  3. 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 a POE::Component::Server::Bayeux::Client object 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 the post_handle() code. Queue her up for the after-party πŸ’œ
  • init () β€” Parses the POE::Component::Server::HTTP::Request object, extracting the JSON payload, creating a stack of POE::Component::Server::Bayeux::Message messages. 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's subscribe state. Handing it straight off, no middleman behaviour 🌸
  • unsubscribe ($client_id, $channel) β€” Passthru to the POE server's unsubscribe state. Same energy, opposite direction πŸ™ˆ
  • publish ($client_id, $channel, $data) β€” Passthru to the POE server's publish state. Straight to the server, no cap πŸ”₯

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 was perl v5.42.0, dated 2025-07-25, from the POE::C...Request(3pm) manual. Go forth and handle your requests, queen πŸ‘‘πŸ’–
πŸ“¦ where this page comes from