|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.activeio.FilterAsynchChannelServer
A AsynchChannelFilter can be used as a filter between a AsynchChannel
and it's org.activeio.ChannelConsumer. Most AsynchChannel
that are not directly accessing the network will extends the AsynchChannelFilter since they act as a
filter between the client and the network. O
| Field Summary | |
protected AcceptListener |
acceptListener
|
protected AsynchChannelServer |
next
|
| Fields inherited from interface org.activeio.Service |
NO_WAIT_TIMEOUT, WAIT_FOREVER_TIMEOUT |
| Constructor Summary | |
FilterAsynchChannelServer(AsynchChannelServer next)
|
|
| Method Summary | |
void |
dispose()
This method should not throw any exceptions. |
java.net.URI |
getBindURI()
The URI that was used when the channel was bound. |
java.net.URI |
getConnectURI()
Once bound, the channel may be able to construct a URI that is more sutible for when a client needs to connect to the server. |
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 |
onAccept(Channel channel)
A AsynchChannelServer will call this method to when a new channel connection has been
accepted. |
void |
onAcceptError(java.io.IOException error)
A AsynchChannelServer will call this method when a async failure occurs when accepting
a connection. |
void |
setAcceptListener(AcceptListener acceptListener)
Registers an AcceptListener which is notified of accepted channels. |
void |
start()
Starts the channel. |
void |
stop(long timeout)
Stops the channel. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected final AsynchChannelServer next
protected AcceptListener acceptListener
| Constructor Detail |
public FilterAsynchChannelServer(AsynchChannelServer next)
| Method Detail |
public void setAcceptListener(AcceptListener acceptListener)
AsynchChannelServer
setAcceptListener in interface AsynchChannelServeracceptListener - public void dispose()
Disposable
dispose in interface DisposableDisposable.dispose()
public void start()
throws java.io.IOException
Service
start in interface Servicejava.io.IOException - if the next channel has not been set.Service.start()
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.IOExceptionService.stop(long)public void onAccept(Channel channel)
AcceptListenerAsynchChannelServer will call this method to when a new channel connection has been
accepted.
onAccept in interface AcceptListenerpublic void onAcceptError(java.io.IOException error)
AcceptListenerAsynchChannelServer will call this method when a async failure occurs when accepting
a connection.
onAcceptError in interface AcceptListenererror - the exception that describes the failure.public java.net.URI getBindURI()
ChannelServer
getBindURI in interface ChannelServerpublic java.net.URI getConnectURI()
ChannelServer
getConnectURI in interface ChannelServerpublic java.lang.Object narrow(java.lang.Class target)
Channel
narrow in interface Channelpublic java.lang.String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||