jet.server.api
Interface TaskListener


public interface TaskListener

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


Method Summary
 void afterRun(ServerInfo serverInfo)
          Invokes after the specified task finishes running.
 boolean beforeRun(ServerInfo serverInfo)
          Invokes before the specified task begins to run.
 void validateParameter(ServerInfo serverInfo)
          Invokes after parameter input is submitted to the task and passes validation according to parameter definition.
 

Method Detail

beforeRun

boolean beforeRun(ServerInfo serverInfo)
Invokes before the specified task begins to run.

Parameters:
serverInfo - an interface that can get the task's information
Returns:
return true, the task begins to run, or else if returned false, stop the task running.

afterRun

void afterRun(ServerInfo serverInfo)
Invokes after the specified task finishes running.

Parameters:
serverInfo - an interface that can get the task's information

validateParameter

void validateParameter(ServerInfo serverInfo)
                       throws TaskListenerException
Invokes after parameter input is submitted to the task and passes validation according to parameter definition.

Parameters:
serverInfo -
Throws:
TaskListenerException