public abstract class CommonEventFilter extends IoFilterAdapter
IoFilter.NextFilter
构造器和说明 |
---|
CommonEventFilter() |
destroy, init, inputClosed, onPostAdd, onPostRemove, onPreAdd, onPreRemove, toString
protected abstract void filter(IoFilterEvent event) throws java.lang.Exception
java.lang.Exception
public final void sessionCreated(IoFilter.NextFilter nextFilter, IoSession session) throws java.lang.Exception
IoFilterAdapter
IoHandler.sessionCreated(IoSession)
event.sessionCreated
在接口中 IoFilter
sessionCreated
在类中 IoFilterAdapter
nextFilter
- the IoFilter.NextFilter
for this filter. You can reuse this
object until this filter is removed from the chain.session
- The IoSession
which has received this eventjava.lang.Exception
- If an error occurred while processing the eventpublic final void sessionOpened(IoFilter.NextFilter nextFilter, IoSession session) throws java.lang.Exception
IoFilterAdapter
IoHandler.sessionOpened(IoSession)
event.sessionOpened
在接口中 IoFilter
sessionOpened
在类中 IoFilterAdapter
nextFilter
- the IoFilter.NextFilter
for this filter. You can reuse this
object until this filter is removed from the chain.session
- The IoSession
which has received this eventjava.lang.Exception
- If an error occurred while processing the eventpublic final void sessionClosed(IoFilter.NextFilter nextFilter, IoSession session) throws java.lang.Exception
IoFilterAdapter
IoHandler.sessionClosed(IoSession)
event.sessionClosed
在接口中 IoFilter
sessionClosed
在类中 IoFilterAdapter
nextFilter
- the IoFilter.NextFilter
for this filter. You can reuse this
object until this filter is removed from the chain.session
- The IoSession
which has received this eventjava.lang.Exception
- If an error occurred while processing the eventpublic final void sessionIdle(IoFilter.NextFilter nextFilter, IoSession session, IdleStatus status) throws java.lang.Exception
IoFilterAdapter
IoHandler.sessionIdle(IoSession,IdleStatus)
event.sessionIdle
在接口中 IoFilter
sessionIdle
在类中 IoFilterAdapter
nextFilter
- the IoFilter.NextFilter
for this filter. You can reuse this
object until this filter is removed from the chain.session
- The IoSession
which has received this eventstatus
- The IdleStatus
typejava.lang.Exception
- If an error occurred while processing the eventpublic final void exceptionCaught(IoFilter.NextFilter nextFilter, IoSession session, java.lang.Throwable cause) throws java.lang.Exception
IoFilterAdapter
IoHandler.exceptionCaught(IoSession,Throwable)
event.exceptionCaught
在接口中 IoFilter
exceptionCaught
在类中 IoFilterAdapter
nextFilter
- the IoFilter.NextFilter
for this filter. You can reuse this
object until this filter is removed from the chain.session
- The IoSession
which has received this eventcause
- The exception that cause this event to be receivedjava.lang.Exception
- If an error occurred while processing the eventpublic final void messageReceived(IoFilter.NextFilter nextFilter, IoSession session, java.lang.Object message) throws java.lang.Exception
IoFilterAdapter
IoHandler.messageReceived(IoSession,Object)
event.messageReceived
在接口中 IoFilter
messageReceived
在类中 IoFilterAdapter
nextFilter
- the IoFilter.NextFilter
for this filter. You can reuse this
object until this filter is removed from the chain.session
- The IoSession
which has received this eventmessage
- The received messagejava.lang.Exception
- If an error occurred while processing the eventpublic final void messageSent(IoFilter.NextFilter nextFilter, IoSession session, WriteRequest writeRequest) throws java.lang.Exception
IoFilterAdapter
IoHandler.messageSent(IoSession,Object)
event.messageSent
在接口中 IoFilter
messageSent
在类中 IoFilterAdapter
nextFilter
- the IoFilter.NextFilter
for this filter. You can reuse this
object until this filter is removed from the chain.session
- The IoSession
which has received this eventwriteRequest
- The WriteRequest
that contains the sent messagejava.lang.Exception
- If an error occurred while processing the eventpublic final void filterWrite(IoFilter.NextFilter nextFilter, IoSession session, WriteRequest writeRequest) throws java.lang.Exception
IoFilterAdapter
IoSession.write(Object)
method invocation.filterWrite
在接口中 IoFilter
filterWrite
在类中 IoFilterAdapter
nextFilter
- the IoFilter.NextFilter
for this filter. You can reuse this
object until this filter is removed from the chain.session
- The IoSession
which has to process this invocationwriteRequest
- The WriteRequest
to processjava.lang.Exception
- If an error occurred while processing the eventpublic final void filterClose(IoFilter.NextFilter nextFilter, IoSession session) throws java.lang.Exception
IoFilterAdapter
IoSession.close(boolean)
method invocation.filterClose
在接口中 IoFilter
filterClose
在类中 IoFilterAdapter
nextFilter
- the IoFilter.NextFilter
for this filter. You can reuse this
object until this filter is removed from the chain.session
- The IoSession
which has to process this method
invocationjava.lang.Exception
- If an error occurred while processing the event