NetKernel APIs


org.ten60.netkernel.layer1.nkf
Interface INKFAsyncRequestListener


public interface INKFAsyncRequestListener

Interface for a callback registered against an asynchronous request.


Method Summary
 void receiveException(NKFException aException, INKFRequest aRequest, INKFConvenienceHelper context)
          Called when a request fails.
 void receiveRepresentation(IURRepresentation aRepresentation, INKFRequest aRequest, INKFConvenienceHelper context)
          Called when the result of a request is made available.
 

Method Detail

receiveRepresentation

public void receiveRepresentation(IURRepresentation aRepresentation,
                                  INKFRequest aRequest,
                                  INKFConvenienceHelper context)
                           throws Exception
Called when the result of a request is made available. This method will be called only once per request issued. It is important for this method to call context.setResponse(null) if it wishes for the request not to be satisfied upon completion of the method.

Parameters:
aRepresentation - The representation that was returned as a result of the request.
aRequest - The request that was issued
context - The context that the request was issued in
Throws:
Exception

receiveException

public void receiveException(NKFException aException,
                             INKFRequest aRequest,
                             INKFConvenienceHelper context)
                      throws Exception
Called when a request fails. This method will be called only once per request issued. To cause an exception to propagate to the calling service this method must re-throw the exception.

Parameters:
aException - An exception issuing the request
aRequest - The request that was issued
context - The context that the request was issued in
Throws:
Exception

NetKernel APIs


Copyright © 2002-2004 1060 Research Ltd. All Rights Reserved.