NAME
xDash::Spool::Dir - Base class for Spool
SYNOPSIS
package Spool;
# Test settings:
#use base xDash::Spool::Dummy;
#sub SetParameters { shift->SUPER::SetParameters(
# event_limit => 10, mean_interoccurence_time => 1 )
# Change if you have your own implemantation or
# Comment out the test settings above and uncomment the 1.&3.line below.
use base xDash::Spool::Dir;
# Do not forget to create spool directory, if xDash::Spool::Dir is used.
sub SetParameters { shift->SUPER::SetDirPath( '/home/xdash/sender/spool' ) }
DESCRIPTION
USAGE
The module is developed in the object orientated way. It can be used as the base class for spool using file system, which has to implement a fixed set of methods, called by the derived class Spool
. Spool
is hard coded in the xDash::Sender
(driver pattern). A file dropped in a specified directory is sent along the integration chain. File name is taken as the thread and file content as the job. The file is removed from the directory only if a job confirmation comes back from the Archivist. By deriving from the class, as the way of passing arguments, you have to implement explicit methods listed below . The synopsis above is an example of the client script generated by the xdscr after debugging.
METHODS
- SetDirPath( $directory_path )
-
Sets the directory, which is monitored for new files, to $directory_path.
BUGS
Any suggestions for improvement are welcomed!
If a bug is detected or nonconforming behavior, please send an error report to <jwach@cpan.org>.
COPYRIGHT
Copyright 2005 Jerzy Wachowiak <jwach@cpan.org>
This library is free software; you can redistribute it and/or modify it under the terms of the Apache 2.0 license attached to the module.