|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.TimerTask
tigase.server.ssender.SenderTask
tigase.server.ssender.FileTask
public class FileTask
FileTask implements tasks for cyclic retrieving stanzas from
a directory and sending them to the StanzaHandler object.
Any file in given directory is treated the same way - Tigase assumes it contains valid XML data with XMPP stanza to send. You can however set in configuration, using wildchars which files contain stanzas. All stanzas must contain complete data including correct "from" and "to" attributes.
By default it looks for *.stanza files in
/var/spool/jabber/ folder but you can specify different
directory name in initialization string. Sample initialization strings:
/var/spool/jabber/*.stanza
/var/spool/jabber/*
The last is equal to:
/var/spool/jabber/
Note the last forward slash '/' is required in such case if the last element of the path is a directory.
Please note! Tigase must have writing permissions for this directory, otherwise it may not function properly.
Created: Fri Apr 20 12:10:55 2007
| Constructor Summary | |
|---|---|
FileTask()
|
|
| Method Summary | |
|---|---|
java.lang.String |
getInitString()
getInitString method returns initialization string passed
to it in init() method. |
void |
init(StanzaHandler handler,
java.lang.String initString)
init method is a task specific initialization rountine. |
void |
run()
run method is where all task work is done. |
| Methods inherited from class tigase.server.ssender.SenderTask |
|---|
getName, setName |
| Methods inherited from class java.util.TimerTask |
|---|
cancel, scheduledExecutionTime |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileTask()
| Method Detail |
|---|
public void init(StanzaHandler handler,
java.lang.String initString)
throws java.io.IOException
init method is a task specific initialization rountine.
init in class SenderTaskhandler - a StanzaHandler value is a reference to object
which handles all stanza retrieved from data source. The handler is
responsible for delivering stanza to destination address.initString - a String value is an initialization string
for this task. For example database tasks would expect database connection
string here, filesystem task would expect directory here.
java.io.IOException - if an error occurs during task or data storage
initialization.public java.lang.String getInitString()
getInitString method returns initialization string passed
to it in init() method.
getInitString in class SenderTaskString value of initialization string.public void run()
run method is where all task work is done.
run in interface java.lang.Runnablerun in class java.util.TimerTask
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||