NetKernel APIs


org.ten60.netkernel.layer1.nkf
Interface INKFAsyncRequestHandle

All Known Implementing Classes:
NKFAsyncRequestHandleImpl

public interface INKFAsyncRequestHandle

Proxy for issuing of an asynchronous subrequest


Method Summary
 IURRepresentation join()
          Wait for an asynchronous subrequest to complete and return result - same effect as join(0)
 IURRepresentation join(long aTimeout)
          Wait for an asynchronous subrequest to complete and return result
 void setListener(INKFAsyncRequestListener aListener)
          Register a listener to be notified when the result of the request is available.
 

Method Detail

join

public IURRepresentation join()
                       throws NKFException,
                              InterruptedException
Wait for an asynchronous subrequest to complete and return result - same effect as join(0)

Returns:
the result of executing the subrequest
Throws:
NKFException - an exception issued in trying to issue the sub request.
InterruptedException - thrown if waiting for the request to complete is interrupted

join

public IURRepresentation join(long aTimeout)
                       throws NKFException,
                              InterruptedException
Wait for an asynchronous subrequest to complete and return result

Returns:
the result of executing the subrequest, or null if a timeout
Throws:
NKFException - an exception issued in trying to issue the sub request.
InterruptedException - thrown if waiting for the request to complete is interrupted

setListener

public void setListener(INKFAsyncRequestListener aListener)
Register a listener to be notified when the result of the request is available. It is important to note that this method cannot be used to effect the response from an accessor as the callback may be made after the accessor completes. This method is more suitable for asynchronous transports.

Parameters:
aListener -

NetKernel APIs


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