Tibco::Rv::Dispatcher - Tibco Queue dispatching thread
$queue = $rv->createQueue; $dispatcher = new Tibco::Rv::Dispatcher( dispatchable => $queue );
A Tibco::Rv::Dispatcher object is an independent thread that repeatedly dispatches events waiting on the specified dispatchable. A dispatchable is either a Tibco::Rv::Queue or a Tibco::Rv::QueueGroup.
Tibco::Rv::Dispatcher
%args: dispatchable => $dispatchable, name => $name, idleTimeout => $idleTimeout
Creates a Tibco::Rv::Dispatcher. If not specified, dispatchable defaults to the Default Queue, name defaults to 'dispatcher', and idleTimeout defaults to Tibco::Rv::WAIT_FOREVER.
Tibco::Rv::WAIT_FOREVER
Upon creating $dispatcher, it starts a separate thread, which repeatedly calls timedDispatch on $dispatchable, passing it the $idleTimeout value. The thread exits after $idleTimeout seconds have passed without any events being placed on the $dispatchable. $idleTimeout can specify fractional seconds.
$dispatcher
timedDispatch
$dispatchable
$idleTimeout
If $idleTimeout is Tibco::Rv::WAIT_FOREVER (the default value), then $dispatcher continues dispatching events until DESTROY is called or the program exits -- when no events are waiting on the $dispatchable in this case, $dispatcher simply blocks. If $idleTimeout is Tibco::Rv::NO_WAIT, then $dispatcher dispatches events until no events are waiting on $dispatchable, at which point the thread exits.
Tibco::Rv::NO_WAIT
Returns the Queue or QueueGroup that $dispatcher is dispatching events on.
Returns the idleTimeout value $dispatcher is using to call timedDispatch on its dispatchable.
Returns the name of $dispatcher.
Sets $dispatcher's name to $name. Use this to distinguish multiple dispatchers and assist troubleshooting. If $name is undef, sets name to ''.
$name
undef
Exits the thread and destroys $dispatcher. Called automatically at program exit.
Paul Sturm <sturm@branewave.com>
To install Tibco::Rv, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tibco::Rv
CPAN shell
perl -MCPAN -e shell install Tibco::Rv
For more information on module installation, please visit the detailed CPAN module installation guide.