Interface OCMessageFactory

    • Method Detail

      • encodeMessage

        byte[] encodeMessage​(Message message)
        Encodes this message as it would appear when sent on the network
        Parameters:
        message - the message to encode
        Returns:
        a byte array containing the encoded message
      • decodeMessage

        Message decodeMessage​(byte[] data)
                       throws ParseException
        Decodes a message directly from a byte array. The bytes are parsed by the SIP parser as if they were received from the network.
        Parameters:
        data - the SIP message data
        Returns:
        a Request or Response object
        Throws:
        ParseException - if the parser could not understand the message