jet.server.api
Interface TaskListener


public interface TaskListener

The listener interface for receiving task events (before task's running and after task's running) in JREntServer. The class that is interested in processing an task event implements this interface. In UI, user can specify one java class implemented this interface for a task, when this task's event occurs, corresponding method in listener object is invoked.


Method Summary
 void afterRun(ServerInfo serverInfo)
          Invoked after the especial task's running is finished.
 boolean beforeRun(ServerInfo serverInfo)
          Invoked before the especial task's running begin.
 void validateParameter(ServerInfo serverInfo)
          Invoked after parameter input submit to task and passed validation according to parameter definition.
 

Method Detail

beforeRun

boolean beforeRun(ServerInfo serverInfo)
Invoked before the especial task's running begin.

Parameters:
serverInfo - a interface that can get task's info
Returns:
return ture, task's running begin, else if return false, stop task's running.

afterRun

void afterRun(ServerInfo serverInfo)
Invoked after the especial task's running is finished.

Parameters:
serverInfo - a interface that can get task's info

validateParameter

void validateParameter(ServerInfo serverInfo)
                       throws TaskListenerException
Invoked after parameter input submit to task and passed validation according to parameter definition.

Parameters:
serverInfo -
Throws:
TaskListenerException