Class SipStatusUtil


  • public final class SipStatusUtil
    extends java.lang.Object
    Utility class for SIP response status codes.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  SipStatusUtil.SipStatusType
      Represents the Response SipStatusType.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static SipStatusUtil.SipStatusType classifyStatusCode​(int statusCode)
      Classifies SIP response status codes into one of the following categories: Provisional, Success, Failure, Invalid.
      static java.lang.String getReasonPhrase​(int statusCode)
      Get the standard reason phrase for a SIP status code, or "Unknown" if the status code is not recognised.
      static boolean isFailureStatusCode​(int statusCode)
      Convenience method for returning if status code falls between allowable values for SipStatusType.Failure.
      static boolean isProvisionalStatusCode​(int statusCode)
      Convenience method for returning if status code falls between allowable values for SipStatusType.Provisional.
      static boolean isSubscriptionTerminatingCode​(int statusCode)
      Convenience method for returning if status code should terminate the subscription
      static boolean isSuccessfulStatusCode​(int statusCode)
      Convenience method for returning if status code falls between allowable values for SipStatusType.Success.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • classifyStatusCode

        public static SipStatusUtil.SipStatusType classifyStatusCode​(int statusCode)
        Classifies SIP response status codes into one of the following categories: Provisional, Success, Failure, Invalid.
      • isSuccessfulStatusCode

        public static boolean isSuccessfulStatusCode​(int statusCode)
        Convenience method for returning if status code falls between allowable values for SipStatusType.Success.
        Returns:
        true if status code falls between allowable values for SipStatusType.Success.
      • isProvisionalStatusCode

        public static boolean isProvisionalStatusCode​(int statusCode)
        Convenience method for returning if status code falls between allowable values for SipStatusType.Provisional.
        Returns:
        true if status code falls between allowable values for SipStatusType.Provisional.
      • isFailureStatusCode

        public static boolean isFailureStatusCode​(int statusCode)
        Convenience method for returning if status code falls between allowable values for SipStatusType.Failure.
        Returns:
        true if status code falls between allowable values for SipStatusType.Failure.
      • isSubscriptionTerminatingCode

        public static boolean isSubscriptionTerminatingCode​(int statusCode)
        Convenience method for returning if status code should terminate the subscription
        Returns:
        true if status code should terminate the subscription outlined in RFC 6665.
      • getReasonPhrase

        public static java.lang.String getReasonPhrase​(int statusCode)
        Get the standard reason phrase for a SIP status code, or "Unknown" if the status code is not recognised.