org.curjent.example.agent.ftpxfer
Class FTPTransferTasks
java.lang.Object
org.curjent.agent.FixedTasks
org.curjent.example.agent.ftpxfer.FTPTransferTasks
- All Implemented Interfaces:
- AgentTasks
class FTPTransferTasks
- extends FixedTasks
Source for FTP transfer tasks.
FTPTransferTasks is an example of how to manage the lifecycle of agent tasks.
Nothing special is required when a task is acquired. Connections are
dynamically established as needed since a connection is not needed for all
calls. The release method is overridden, however, in order to disconnect a
potentially live connection when a task is released.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FTPTransferTasks
FTPTransferTasks(String remote,
String local,
int count)
release
public void release(Object task)
throws Throwable
- Description copied from class:
FixedTasks
- Adds the given
task
to our list of available tasks.
- Specified by:
release
in interface AgentTasks
- Overrides:
release
in class FixedTasks
- Throws:
Throwable
- An unexpected error.
newTasks
private static FTPTransferTask[] newTasks(String remote,
String local,
int count)
Copyright 2009-2011 Tom Landon
Apache License 2.0