public class IoHandlerChain extends java.lang.Object implements IoHandlerCommand
IoHandlerCommand
s.限定符和类型 | 类和说明 |
---|---|
class |
IoHandlerChain.Entry
Represents a name-command pair that an
IoHandlerChain contains. |
IoHandlerCommand.NextCommand
构造器和说明 |
---|
IoHandlerChain()
Creates a new, empty chain of
IoHandlerCommand s. |
限定符和类型 | 方法和说明 |
---|---|
void |
addAfter(java.lang.String baseName,
java.lang.String name,
IoHandlerCommand command) |
void |
addBefore(java.lang.String baseName,
java.lang.String name,
IoHandlerCommand command) |
void |
addFirst(java.lang.String name,
IoHandlerCommand command) |
void |
addLast(java.lang.String name,
IoHandlerCommand command) |
void |
clear() |
boolean |
contains(java.lang.Class<? extends IoHandlerCommand> commandType) |
boolean |
contains(IoHandlerCommand command) |
boolean |
contains(java.lang.String name) |
void |
execute(IoHandlerCommand.NextCommand next,
IoSession session,
java.lang.Object message)
Execute a unit of processing work to be performed.
|
IoHandlerCommand |
get(java.lang.String name) |
java.util.List<IoHandlerChain.Entry> |
getAll() |
java.util.List<IoHandlerChain.Entry> |
getAllReversed() |
IoHandlerChain.Entry |
getEntry(java.lang.String name) |
IoHandlerCommand.NextCommand |
getNextCommand(java.lang.String name) |
IoHandlerCommand |
remove(java.lang.String name) |
java.lang.String |
toString() |
public IoHandlerChain()
IoHandlerCommand
s.public IoHandlerChain.Entry getEntry(java.lang.String name)
public IoHandlerCommand get(java.lang.String name)
public IoHandlerCommand.NextCommand getNextCommand(java.lang.String name)
public void addFirst(java.lang.String name, IoHandlerCommand command)
public void addLast(java.lang.String name, IoHandlerCommand command)
public void addBefore(java.lang.String baseName, java.lang.String name, IoHandlerCommand command)
public void addAfter(java.lang.String baseName, java.lang.String name, IoHandlerCommand command)
public IoHandlerCommand remove(java.lang.String name)
public void clear() throws java.lang.Exception
java.lang.Exception
public void execute(IoHandlerCommand.NextCommand next, IoSession session, java.lang.Object message) throws java.lang.Exception
IoHandlerCommand
Execute a unit of processing work to be performed. This
IoHandlerCommand
may either complete the required processing
and just return to stop the processing, or delegate remaining
processing to the next IoHandlerCommand
in a IoHandlerChain
containing this IoHandlerCommand
by calling
IoHandlerCommand.NextCommand.execute(IoSession,Object)
.
execute
在接口中 IoHandlerCommand
next
- an indirect reference to the next IoHandlerCommand
that
provides a way to forward the request to the next IoHandlerCommand
.session
- the IoSession
which is associated with
this requestmessage
- the message object of this requestjava.lang.Exception
- general purpose exception return
to indicate abnormal terminationpublic java.util.List<IoHandlerChain.Entry> getAll()
public java.util.List<IoHandlerChain.Entry> getAllReversed()
public boolean contains(java.lang.String name)
public boolean contains(IoHandlerCommand command)
public boolean contains(java.lang.Class<? extends IoHandlerCommand> commandType)
public java.lang.String toString()
toString
在类中 java.lang.Object