public class JDBCTask extends SenderTask
JDBCTask
implements tasks for cyclic retrieving stanzas from
database and sending them to the StanzaHandler object.
xmpp_stanza
table but you can
specify different table name in connection string. Sample connection string:
jdbc:mysql://localhost/tigasedb?user=tigase&password=pass&table=xmpp_stanza
Constructor and Description |
---|
JDBCTask() |
Modifier and Type | Method and Description |
---|---|
boolean |
cancel() |
String |
getInitString()
getInitString method returns initialization string passed
to it in init() method. |
void |
init(StanzaHandler handler,
String initString)
init method is a task specific initialization rountine. |
void |
run()
run method is where all task work is done. |
getName, setName
scheduledExecutionTime
public void init(StanzaHandler handler, String initString) throws IOException
init
method is a task specific initialization rountine.init
in class SenderTask
handler
- 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.IOException
- if an error occurs during task or data storage
initialization.public String getInitString()
getInitString
method returns initialization string passed
to it in init()
method.getInitString
in class SenderTask
String
value of initialization string.Copyright © 2019 "Tigase, Inc.". All rights reserved.