Package com.bytedesk.call.mrcp4j.server
Class MrcpRequestDecoder
java.lang.Object
com.bytedesk.call.mrcp4j.server.MrcpRequestDecoder
- All Implemented Interfaces:
org.apache.mina.filter.codec.ProtocolDecoder
public class MrcpRequestDecoder
extends Object
implements org.apache.mina.filter.codec.ProtocolDecoder
Decodes request messages received in MRCPv2 format into
MrcpRequest instances.- Author:
- Niels Godfredsen <ngodfredsen@users.sourceforge.net>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringBuilderprivate static final intprivate static final intprivate static final intprivate static final intprivate static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MrcpRequestcreateRequest(String requestLine) voiddecode(org.apache.mina.core.session.IoSession session, org.apache.mina.core.buffer.IoBuffer in, org.apache.mina.filter.codec.ProtocolDecoderOutput out) voiddispose(org.apache.mina.core.session.IoSession session) voidfinishDecode(org.apache.mina.core.session.IoSession session, org.apache.mina.filter.codec.ProtocolDecoderOutput out) private StringreadLine(org.apache.mina.core.buffer.IoBuffer in)
-
Field Details
-
decodeBuf
-
REQUEST_LINE_MRCP_VERSION_PART
private static final int REQUEST_LINE_MRCP_VERSION_PART- See Also:
-
REQUEST_LINE_MESSAGE_LENGTH_PART
private static final int REQUEST_LINE_MESSAGE_LENGTH_PART- See Also:
-
REQUEST_LINE_METHOD_NAME_PART
private static final int REQUEST_LINE_METHOD_NAME_PART- See Also:
-
REQUEST_LINE_REQUEST_ID_PART
private static final int REQUEST_LINE_REQUEST_ID_PART- See Also:
-
REQUEST_LINE_PART_COUNT
private static final int REQUEST_LINE_PART_COUNT- See Also:
-
-
Constructor Details
-
MrcpRequestDecoder
public MrcpRequestDecoder()
-
-
Method Details
-
decode
public void decode(org.apache.mina.core.session.IoSession session, org.apache.mina.core.buffer.IoBuffer in, org.apache.mina.filter.codec.ProtocolDecoderOutput out) throws Exception - Specified by:
decodein interfaceorg.apache.mina.filter.codec.ProtocolDecoder- Throws:
Exception
-
readLine
-
createRequest
- Throws:
ParseException
-
finishDecode
public void finishDecode(org.apache.mina.core.session.IoSession session, org.apache.mina.filter.codec.ProtocolDecoderOutput out) throws Exception - Specified by:
finishDecodein interfaceorg.apache.mina.filter.codec.ProtocolDecoder- Throws:
Exception
-
dispose
- Specified by:
disposein interfaceorg.apache.mina.filter.codec.ProtocolDecoder- Throws:
Exception
-