org.systinet.wasp.async
Interface AsyncCallback

All Known Implementing Classes:
GenericAsyncCallback

public interface AsyncCallback

AsyncCallback is a listener able to listen to a moment when response of asynchronous invocation comes to client. This class is implemented by developer and is registered to asynchronous communication using AsyncConversation.setCallback(org.systinet.wasp.async.AsyncCallback). See AsyncConversation for more informations about how to use this class.

Component:
Core

Method Summary
 void onResponse(AsyncConversation asyncConversation)
          This method is called once the response for request identified by AsyncConversation parameter comes to client.
 void onTimeout(AsyncConversation asyncConversation)
          This method is called when timeout of waiting for response occures.
 

Method Detail

onResponse

public void onResponse(AsyncConversation asyncConversation)
This method is called once the response for request identified by AsyncConversation parameter comes to client.

Parameters:
asyncConversation - AsyncConversation object, which indicates the invocation this response comes for. For more information on AsyncConversation see AsyncConversation

onTimeout

public void onTimeout(AsyncConversation asyncConversation)
This method is called when timeout of waiting for response occures. The amount of time to be waiting for response can be set using AsyncConversation.setTimeout(long).

Parameters:
asyncConversation - timeouted AsyncConversation