SilverStream
Application Server 3.5

com.sssw.srv.busobj
Interface AgiDataRunner


public interface AgiDataRunner

Used to simulate the behavior of SilverStream's Version 1 Agent classes. It provides methods that simulate the before agent processing, data, and after agent processing events. It also provides methods used to cancel a business object.

An object implementing this interface can be passed to AgoBusinessObjectEvent.runAgData() along with an object implementing AgiRowCursor.


Method Summary
 void cancelAgent()
          Cancels the running of this AgiDataRunner.
 boolean isAgentCancelled()
          Returns a boolean true if cancelAgent() was called for this AgiDataRunner.
 void runAfter(AgoBusinessObjectEvent evt)
          Called after the last row of the AgData is set.
 void runBefore(AgoBusinessObjectEvent evt)
          Called before the first row of the AgData is set.
 void runData(AgoBusinessObjectEvent evt)
          Called once for each row of the AgData.
 void uncancelAgent()
          Uncancels an agent that was cancelled by the cancelAgent() method.
 

Method Detail

runBefore

public void runBefore(AgoBusinessObjectEvent evt)
Called before the first row of the AgData is set.
Parameters:
evt -  
See Also:
AgiDataRunner.runAfter(AgoBusinessObjectEvent evt), AgiDataRunner.runData( AgoBusinessObjectEvent evt ), AgoBusinessObjectEvent

runData

public void runData(AgoBusinessObjectEvent evt)
Called once for each row of the AgData. For invoked triggers, for table triggers, and for http request that also operate on data, the method is called for each database row that the agent processes. For objects with mail triggers, it is called for each message that is processed.
Parameters:
evt -  
Usage:

runData() is called after the runBefore() and before the runAfter() methods.

See Also:
AgiDataRunner.runAfter(AgoBusinessObjectEvent evt), AgiDataRunner.runBefore(AgoBusinessObjectEvent evt), AgoBusinessObjectEvent

runAfter

public void runAfter(AgoBusinessObjectEvent evt)
Called after the last row of the AgData is set.
Parameters:
evt -  
Usage:

If, for example, the object is a triggered business object, with a scheduled trigger that processes 20 rows in a dataset, then the runAfter() method is called once after the 20 rows are processed. If the object is triggered by the receipt of mail, then the runAfter() method is called once after all of the mail messages have been processed.

See Also:
AgiDataRunner.runData(AgoBusinessObjectEvent evt), AgiDataRunner.runBefore(AgoBusinessObjectEvent evt), AgoBusinessObjectEvent

isAgentCancelled

public boolean isAgentCancelled()
Returns a boolean true if cancelAgent() was called for this AgiDataRunner.
See Also:
AgiDataRunner.runBefore(AgoBusinessObjectEvent evt), AgiDataRunner.uncancelAgent(), AgiDataRunner.cancelAgent(), AgoBusinessObjectEvent

cancelAgent

public void cancelAgent()
Cancels the running of this AgiDataRunner. If the AgiDataRunner is cancelled, runAgData() stops looping over the rows and will terminate. It does not call the runAfter() method.
Usage:

The method in which the cancelAgent() method is called will complete before the agent is cancelled. The cancelled status of an agent can be reset by calling the uncancelAgent() method, but uncancelAgent() must be called in the same event that called cancelAgent().

See Also:
AgiDataRunner.uncancelAgent(), AgiDataRunner.isAgentCancelled()

uncancelAgent

public void uncancelAgent()
Uncancels an agent that was cancelled by the cancelAgent() method.
Usage:

The uncancelAgent() method must be called in the same event as the cancelAgent() method was called.

See Also:
AgiDataRunner.cancelAgent(), AgiDataRunner.isAgentCancelled()

SilverStream
Application Server 3.5