springs.agent
Class Schedule

java.lang.Object
  |
  +--springs.agent.Schedule
All Implemented Interfaces:
java.io.Serializable

public class Schedule
extends java.lang.Object
implements java.io.Serializable

The schedule of an agent.

Author:
Sergio Ilarri Artigas
See Also:
Serialized Form

Field Summary
private  java.util.Vector _scheduleEntries
           
 
Constructor Summary
Schedule()
          Constructor.
 
Method Summary
 void addTask(java.lang.String method)
          Add a task consisting of calling a certain method.
 void addTask(java.lang.String targetURL, int targetPort)
          Adds a task to travel to another context.
 void addTask(java.lang.String targetURL, int targetPort, java.lang.String callbackMethod)
          Adds a task to travel to another context.
 void addTask(java.lang.String targetURL, int targetPort, java.lang.String callbackMethod, java.lang.Object[] args)
          Adds a task to travel to another context.
 void addTask(java.lang.String method, java.lang.Object[] args)
          Add a task consisting of calling a certain method.
 boolean moreTasks()
          Checks if the agent has more tasks in its schedule.
 springs.agent.Task takeNextTask()
          Gets the next task, and removes it from the list of pending tasks.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_scheduleEntries

private java.util.Vector _scheduleEntries
Constructor Detail

Schedule

public Schedule()
Constructor.

Method Detail

addTask

public void addTask(java.lang.String targetURL,
                    int targetPort)
Adds a task to travel to another context.

Parameters:
targetURL - the target URL.
targetPort - the target port.
See Also:
String

addTask

public void addTask(java.lang.String targetURL,
                    int targetPort,
                    java.lang.String callbackMethod)
Adds a task to travel to another context.

Parameters:
targetURL - the target URL.
targetPort - the target port.
callbackMethod - the callback method.
See Also:
String

addTask

public void addTask(java.lang.String targetURL,
                    int targetPort,
                    java.lang.String callbackMethod,
                    java.lang.Object[] args)
Adds a task to travel to another context.

Parameters:
targetURL - the target URL.
targetPort - the target port.
callbackMethod - the callback method.
args - the arguments for the callback method.
See Also:
String, Object

addTask

public void addTask(java.lang.String method)
Add a task consisting of calling a certain method.

Parameters:
method - the method.
See Also:
String

addTask

public void addTask(java.lang.String method,
                    java.lang.Object[] args)
Add a task consisting of calling a certain method.

Parameters:
method - the method.
args - the arguments for the method.
See Also:
String, Object

moreTasks

public boolean moreTasks()
Checks if the agent has more tasks in its schedule.

Returns:
a boolean indicating that.

takeNextTask

public springs.agent.Task takeNextTask()
Gets the next task, and removes it from the list of pending tasks.

Returns:
the next task; null if any.
See Also:
Task