Interface OCMessage

  • All Superinterfaces:
    Cloneable, javax.sip.message.Message, Serializable

    public interface OCMessage
    extends javax.sip.message.Message
    OC-proprietary extensions to Message. Message objects created by the OC SIP Resource Adaptor can be safely type cast to this interface.
    Since:
    OCSIP RA Type 2.1
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void compactHeaders()
      Convenience method to make all headers in the message use their compact forms.
      Endpoint getPeer()
      Get the remote endpoint this message was sent from.
      boolean isCompact​(String headerName)
      Tests whether the given header is currently using compact or long form.
      void setCompact​(String headerName, boolean compact)
      Specify whether a header uses its compact or long form when the message is encoded.
      • Methods inherited from interface javax.sip.message.Message

        addFirst, addHeader, addLast, clone, equals, getContent, getContentDisposition, getContentEncoding, getContentLanguage, getContentLength, getExpires, getHeader, getHeaderNames, getHeaders, getRawContent, getSIPVersion, getUnrecognizedHeaders, hashCode, removeContent, removeFirst, removeHeader, removeLast, setContent, setContentDisposition, setContentEncoding, setContentLanguage, setContentLength, setExpires, setHeader, setSIPVersion, toString
    • Method Detail

      • setCompact

        void setCompact​(String headerName,
                        boolean compact)
        Specify whether a header uses its compact or long form when the message is encoded. By default, headers created by HeaderFactory will use long form, e.g. "Via" instead of "v".

        If the given header does not exist or has no compact form defined, this method has no effect.

        If multiple header values are present, all header values will use the compact or long form as specified by this method.

        If additional header values are added to the header after this method is called, they will also use the compact or long form as specified by this method.

        Parameters:
        headerName - the name (full or compact, case-insensitive) of the header.
        compact - if true, the header will use its compact form (if any).
        Since:
        OCSIP RA Type 2.1
      • isCompact

        boolean isCompact​(String headerName)
        Tests whether the given header is currently using compact or long form.
        Parameters:
        headerName - the name (full or compact, case-insensitive) of the header.
        Returns:
        true if the header is using compact form, or false if the header is using long form or has no compact form defined
        Since:
        OCSIP RA Type 2.1
      • compactHeaders

        void compactHeaders()
        Convenience method to make all headers in the message use their compact forms.
        Since:
        OCSIP RA Type 2.1
      • getPeer

        Endpoint getPeer()
        Get the remote endpoint this message was sent from.
        Returns:
        the remote peer for incoming messages, null otherwise.