|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.mina.filter.codec.statemachine.DecodingStateProtocolDecoder
public class DecodingStateProtocolDecoder
ProtocolDecoder which uses a DecodingState to decode data.
Use a DecodingStateMachine as DecodingState to create
a state machine which can decode your protocol.
NOTE: This is a stateful decoder. You should create one instance per session.
| Constructor Summary | |
|---|---|
DecodingStateProtocolDecoder(DecodingState state)
Creates a new instance using the specified DecodingState
instance. |
|
| Method Summary | |
|---|---|
void |
decode(IoSession session,
IoBuffer in,
ProtocolDecoderOutput out)
Decodes binary or protocol-specific content into higher-level message objects. |
void |
dispose(IoSession session)
Releases all resources related with this decoder. |
void |
finishDecode(IoSession session,
ProtocolDecoderOutput out)
Invoked when the specified session is closed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DecodingStateProtocolDecoder(DecodingState state)
DecodingState
instance.
state - the DecodingState.
NullPointerException - if the specified state is null.| Method Detail |
|---|
public void decode(IoSession session,
IoBuffer in,
ProtocolDecoderOutput out)
throws Exception
ProtocolDecoder.decode(IoSession, IoBuffer, ProtocolDecoderOutput)
method with read data, and then the decoder implementation puts decoded
messages into ProtocolDecoderOutput.
decode in interface ProtocolDecoderException - if the read data violated protocol specification
public void finishDecode(IoSession session,
ProtocolDecoderOutput out)
throws Exception
ProtocolDecoder.decode(IoSession, IoBuffer, ProtocolDecoderOutput)
method didn't process completely.
finishDecode in interface ProtocolDecoderException - if the read data violated protocol specification
public void dispose(IoSession session)
throws Exception
dispose in interface ProtocolDecoderException - if failed to dispose all resources
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||