|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.activeio.adapter.AsynchChannelToServerRequestChannel
Creates a RequestChannel out of a AsynchChannel.
Does not support sending requests. It can only be used to handle requests.
| Field Summary |
| Fields inherited from interface org.activeio.Service |
NO_WAIT_TIMEOUT, WAIT_FOREVER_TIMEOUT |
| Constructor Summary | |
AsynchChannelToServerRequestChannel(AsynchChannel next)
|
|
| Method Summary | |
void |
dispose()
This method should not throw any exceptions. |
RequestListener |
getRequestListener()
|
java.lang.Object |
narrow(java.lang.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. |
void |
onPacket(Packet packet)
A AsynchChannel will call this method to deliver an 'up' packet to a consumer. |
void |
onPacketError(java.io.IOException error)
A AsynchChannel will call this method when a async failure occurs in the channel. |
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 AsynchChannelToServerRequestChannel(AsynchChannel next)
throws java.io.IOException
| Method Detail |
public Packet request(Packet request,
long timeout)
throws java.io.IOException
RequestChannel
request in interface RequestChannelrequest - timeout -
java.io.IOException
public void setRequestListener(RequestListener requestListener)
throws java.io.IOException
RequestChannelRequestListener that the protcol will use to deliver request packets
comming 'up' the channel.
setRequestListener in interface RequestChanneljava.io.IOExceptionpublic RequestListener getRequestListener()
getRequestListener in interface RequestChannelpublic java.lang.Object narrow(java.lang.Class target)
Channel
narrow in interface Channelpublic void dispose()
Disposable
dispose in interface Disposable
public void start()
throws java.io.IOException
Service
start in interface Servicejava.io.IOException
public void stop(long timeout)
throws java.io.IOException
Service
stop in interface Servicetimeout - 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.
java.io.IOExceptionpublic void onPacket(Packet packet)
AsynchChannelListenerAsynchChannel will call this method to deliver an 'up' packet to a consumer.
onPacket in interface AsynchChannelListenerpacket - public void onPacketError(java.io.IOException error)
AsynchChannelListenerAsynchChannel will call this method when a async failure occurs in the channel.
onPacketError in interface AsynchChannelListenererror - the exception that describes the failure.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||