org.activeio
Interface RequestChannel

All Superinterfaces:
Channel, Disposable, Service
All Known Implementing Classes:
AsyncChannelToClientRequestChannel, AsyncChannelToConcurrentRequestChannel, AsyncChannelToServerRequestChannel

public interface RequestChannel
extends Channel

RequestChannel are used to model the request/reponse exchange that is used by higher level protcols such as HTTP and RMI.

Version:
$Revision$

Field Summary
 
Fields inherited from interface org.activeio.Service
NO_WAIT_TIMEOUT, WAIT_FOREVER_TIMEOUT
 
Method Summary
 RequestListener getRequestListener()
           
 Packet request(Packet request, long timeout)
          Used to send a packet of information going 'down' the channel and wait for it's reponse 'up' packet.
 void setRequestListener(RequestListener requestListener)
          Registers the RequestListener that the protcol will use to deliver request packets comming 'up' the channel.
 
Methods inherited from interface org.activeio.Channel
narrow
 
Methods inherited from interface org.activeio.Disposable
dispose
 
Methods inherited from interface org.activeio.Service
start, stop
 

Method Detail

request

public Packet request(Packet request,
                      long timeout)
               throws IOException
Used to send a packet of information going 'down' the channel and wait for it's reponse 'up' packet. This method blocks until the response packet is received or the operation experiences a timeout.

Parameters:
request -
timeout -
Returns:
the respnse packet or null if the timeout occured.
Throws:
IOException

setRequestListener

public void setRequestListener(RequestListener requestListener)
                        throws IOException
Registers the RequestListener that the protcol will use to deliver request packets comming 'up' the channel.

Throws:
IOException

getRequestListener

public RequestListener getRequestListener()
Returns:
the registered RequestListener


Copyright © -2007 The ActiveIO Project. All Rights Reserved.