Class LimiterInstruction


  • public final class LimiterInstruction
    extends Object
    Represents an instruction from the SipOverloadControlPlugin for further processing of a request.

    Every LimiterInstruction has an LimiterInstruction.Action.

    A LimiterInstruction with an action of LimiterInstruction.Action.REJECT can include an optional SIP response. If the response is non-null, it will be sent by the SIP RA in place of the default overload control response. The SIP RA ignores a response set in a LimiterInstruction with any other action.

    • Method Detail

      • reject

        public static LimiterInstruction reject()
        A limiter instruction indicating that the request should be rejected and the default overload control response be sent.
        Returns:
        an instruction with an action of LimiterInstruction.Action.REJECT and null response.
      • reject

        public static LimiterInstruction reject​(javax.sip.message.Response response)
        A limiter instruction indicating that the request should be rejected and the specified response be sent. The response is expected to be an error response, i.e. have a 4xx, 5xx, or 6xx response code.
        Parameters:
        response - the response object. May be null.
        Returns:
        an instruction with an action of LimiterInstruction.Action.REJECT and the specified response.
      • getResponse

        public javax.sip.message.Response getResponse()
        The error response to send in the case of a LimiterInstruction.Action.REJECT action. The response is ignored for any other action.
        Returns:
        the SIP response, or null if a response has not been set.
      • hasResponse

        public boolean hasResponse()
        Determine if this LimiterInstruction contains a response object.
        Returns:
        true if a response object is present, false otherwise.
      • getAction

        public LimiterInstruction.Action getAction()
        The action for further request processing by the SIP RA.
        Returns:
        the action for how the SIP RA should further process the request.
      • isAccept

        public boolean isAccept()
      • isExempt

        public boolean isExempt()
      • isReject

        public boolean isReject()
      • isDiscard

        public boolean isDiscard()