POE::Event::Message::Header - Generic messaging protocol header
This document describes version 0.02, released November, 2005.
use POE::Event::Message::Header; $header = new POE::Event::Message::Header; $header = new POE::Event::Message::Header( $priorHeader ); $header->set( $attrName, $newValue ); $value = $header->get( $attrName ); $header->del( $attrName ); $id = $header->id(); $r2id = $header->r2id(); $header->addRouteTo( Args ); $header->addRouteBack( Args ); $route = $header->delRouteTo( ); # delete and return next $route = $header->delRouteBack( ); # delete and return next $route = $header->hasRouting(); # retain and return next $route = $header->hasRouteTo(); # retain and return next $route = $header->hasRouteBack(); # retain and return next $next = $header->nextRouteType(); # post, call, remote or '' $bool = $header->nextRouteIsRemote(); # 1 if remote or 0 if not $bool = $header->nextRouteIsLocal(); # 1 if post|call or 0 $bool = $header->nextRouteIsPost(); # 1 if post or 0 $bool = $header->nextRouteIsCall(); # 1 if call or 0 print $header->dump();
This class is not intended for direct use. Objects of this class are manipulated via the message envelope objects of the 'POE::Event::Message' class.
This class is a starting point for creating a generic application messaging protocol headers. The intent is for this to be used as a starting point when building network client/server applications.
Messages headers of this class have flexible routing capabilities that work both inside and outside of POE-based applications. Message objects can contain complex Perl data structures.
This method instantiates a new message header. Optionally it can be used to create a response to an existing message.
The optional Header argument, when included, is expected to be an original message of this class. This mechanism is used to create a 'response' to the original message.
Store, retrieve or delete header attributes.
These methods add auto-routing capabilities to messages that use this class. For a discussion of arguments and usage, see POE::Event::Message.
This method is included for convenience when developing or debugging applications that use this class. This does not produce a 'pretty' output, but is formatted to show the contents of the message object and the message header object, when one exists.
This class depends upon the following classes:
Chris Cobb [no dot spam at ccobb dot net]
Copyright (c) 2005-2010 by Chris Cobb, All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.