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 Details

    • decodeBuf

      private StringBuilder 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:
      decode in interface org.apache.mina.filter.codec.ProtocolDecoder
      Throws:
      Exception
    • readLine

      private String readLine(org.apache.mina.core.buffer.IoBuffer in)
    • createRequest

      public static MrcpRequest createRequest(String requestLine) throws ParseException
      Throws:
      ParseException
    • finishDecode

      public void finishDecode(org.apache.mina.core.session.IoSession session, org.apache.mina.filter.codec.ProtocolDecoderOutput out) throws Exception
      Specified by:
      finishDecode in interface org.apache.mina.filter.codec.ProtocolDecoder
      Throws:
      Exception
    • dispose

      public void dispose(org.apache.mina.core.session.IoSession session) throws Exception
      Specified by:
      dispose in interface org.apache.mina.filter.codec.ProtocolDecoder
      Throws:
      Exception