org.curjent.example.agent.filecopy
Class FileVerifyListener

java.lang.Object
  extended by org.curjent.example.agent.filecopy.FileVerifyListener
All Implemented Interfaces:
CallStateListener<Void>

public class FileVerifyListener
extends Object
implements CallStateListener<Void>

The verification listener monitors copy calls of the file copy agent for FINISHED execution states. Successful copies are verified asynchronously via the verification agent. Copy exceptions are logged.


Field Summary
(package private)  FileVerify verifier
           
 
Constructor Summary
FileVerifyListener(FileVerify verifier)
           
 
Method Summary
 void callStateChanged(AgentCall<Void> call, CallState previous)
          Notification that a call's state has changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

verifier

final FileVerify verifier
Constructor Detail

FileVerifyListener

FileVerifyListener(FileVerify verifier)
Method Detail

callStateChanged

public void callStateChanged(AgentCall<Void> call,
                             CallState previous)
Description copied from interface: CallStateListener
Notification that a call's state has changed. The listener is notified after the call's state has changed. Therefore, the new call state is available via call.getState().

An exception thrown by a listener is treated as an unhandled exception. The exception is passed to the handler configured with AgentConfig.setUnhandledExceptionHandler(ExceptionHandler). It is not thrown to the caller.

To throw an exception to the caller, such as for a synchronous call or for any call transitioning to the STARTING state, finish the call with AgentCall.finish() and set the exception with AgentCall.setException(Throwable).

Specified by:
callStateChanged in interface CallStateListener<Void>


Copyright 2009-2011 Tom Landon
Apache License 2.0