|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.activeio.adapter.AsyncChannelToClientRequestChannel
public final class AsyncChannelToClientRequestChannel
Creates a RequestChannel
out of a SyncChannel
.
Does not support handing requests. It can only be used to send requests.
Field Summary |
---|
Fields inherited from interface org.activeio.Service |
---|
NO_WAIT_TIMEOUT, WAIT_FOREVER_TIMEOUT |
Constructor Summary | |
---|---|
AsyncChannelToClientRequestChannel(SyncChannel next)
|
Method Summary | |
---|---|
void |
dispose()
This method should not throw any exceptions. |
RequestListener |
getRequestListener()
|
Object |
narrow(Class target)
Since a Channel may be composed from a chain of other Channel obejcts, this method allows you to query the chain for the specified interface. |
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. |
void |
start()
Starts the channel. |
void |
stop(long timeout)
Stops the channel. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AsyncChannelToClientRequestChannel(SyncChannel next)
Method Detail |
---|
public Packet request(Packet request, long timeout) throws IOException
RequestChannel
request
in interface RequestChannel
IOException
public void setRequestListener(RequestListener requestListener) throws IOException
RequestChannel
RequestListener
that the protcol will use to deliver request packets
comming 'up' the channel.
setRequestListener
in interface RequestChannel
IOException
public RequestListener getRequestListener()
getRequestListener
in interface RequestChannel
public Object narrow(Class target)
Channel
narrow
in interface Channel
public void dispose()
Disposable
dispose
in interface Disposable
public void start() throws IOException
Service
start
in interface Service
IOException
public void stop(long timeout) throws IOException
Service
stop
in interface Service
timeout
- The amount of time the channel is allowed to take to gracefully stop. If the timeout
is exceeded, the channel should do a forcefull stop.
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |