public class CoapDecoder extends Object implements StatelessProtocolDecoder<ByteBuffer,CoapMessage>
ByteBuffer
into CoapMessage
.Constructor and Description |
---|
CoapDecoder() |
Modifier and Type | Method and Description |
---|---|
Void |
createDecoderState()
Create a new session context for this decoder
|
CoapMessage |
decode(ByteBuffer input,
Void context)
Decode binary or protocol-specific content of type
INPUT into higher-level protocol message objects,
of type OUTPUT |
void |
finishDecode(Void context)
Finish decoding, for example if the decoder accumulated some unused input, it should discard it, or throw an
Exception
|
public Void createDecoderState()
createDecoderState
in interface ProtocolDecoder<ByteBuffer,CoapMessage,Void>
public CoapMessage decode(ByteBuffer input, Void context)
INPUT
into higher-level protocol message objects,
of type OUTPUTdecode
in interface ProtocolDecoder<ByteBuffer,CoapMessage,Void>
input
- the received message to decodecontext
- the decoding context (will be stored in the session for the next decode call)null
if nothing was decodedpublic void finishDecode(Void context)
finishDecode
in interface ProtocolDecoder<ByteBuffer,CoapMessage,Void>
Copyright © 2009–2013 Apache MINA Project. All rights reserved.