NAME

XAS::Lib::Stomp::POE::Filter - An I/O filter for the POE Environment

SYNOPSIS

  use XAS::Lib::Stomp::POE::Filter;

  For a server

  POE::Component::Server::TCP->new(
      ...
      Filter => XAS::Lib::Stomp::POE::Filter->new(),
      ...
  );

  For a client

  POE::Component::Client::TCP->new(
      ...
      Filter => XAS::Lib::Stomp::POE::Filter->new(),
      ...
  );

DESCRIPTION

This module is a filter for the POE environment. It will translate the input buffer into XAS::Lib::Stomp::Frame objects and serialize the output buffer from said object.

METHODS

new

This method initializes the module.

get_one_start($buffers)

This method parses one frame for a buffer and stores it in an internal frames buffer.

$buffers

A reference to a buffer.

get_one

This method returns one frame from the internal buffer.

get_pending

This method returns the number of pending frames.

put($buffers)

This method pulls frames out of the buffer, stringifies them and places them into a internal array. When done it returns that array.

$buffers

A reference to a buffer of XAS::Lib::Stomp::Frame frames.

SEE ALSO

XAS

See the documentation for POE::Filter for usage.

For more information on the STOMP protocol, please refer to: http://stomp.github.io/ .

AUTHOR

Kevin L. Esteb, <kevin@kesteb.us>

COPYRIGHT AND LICENSE

Copyright (C) 2014 Kevin L. Esteb

This is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0. For details, see the full text of the license at http://www.perlfoundation.org/artistic_license_2_0.