Kevin L. Esteb > XAS-0.04 > XAS::Spooler::Connector

Download:
XAS-0.04.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.01   Source   Latest Release: XAS-0.05

NAME ^

XAS::Spooler::Connector - Perl extension for the XAS environment

SYNOPSIS ^

  use XAS::Spooler::Connector;

  my $connection = XAS::Spooler::Connector->spawn(
      RemoteAddress   => $hostname,
      RemotePort      => $port,
      RetryReconnect  => TRUE,
      EnableKeepAlive => TRUE,
      Hostname        => $xas->host,
      Alias           => 'connector',
      Processor       => $processor,
      Logger          => 'logger',
      Queue           => $ddc_queue
  );

DESCRIPTION ^

This module use to connect to a message queue server for spoolers. It provides the necessary events and methods so the Factory can do its job.

PUBLIC METHODS ^

spawn

This method creates the initial session, setups the scheduling for gather_data() and initializes JSON processing. It takes the following configuration items:

Processor

A pointer to the ProcessFactory object.

Queue

The name of the queue to send messages to on the message queue server.

Hostname

The name of the host that this is running on.

PUBLIC EVENTS ^

connection_down

This event signal that the connection had been dropped, we are just stopping the collection of data. This is done by notifing the ProcessFactory that data collection should stop.

handle_shutdown

This event notifies the ProcessFactory that we are shutting down.

gather_data

This event provides an interface to the ProcesFactory to send data to the message queue server.

send_packet

This event will format the data to be sent to the message queue server.

SEE ALSO ^

XAS

AUTHOR ^

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

COPYRIGHT AND LICENSE ^

Copyright (C) 2012 by Kevin L. Esteb

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: