Interface SipOverloadControlPlugin
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface SipOverloadControlPlugin
This interface allows Rhino's overload control system to be extended for SIP.Implementations of this interface must be thread safe, non-blocking, and as close to O(1) as is practical. If an expensive operation is required, consider doing this at or prior to construction and also consider the use of caching.
An instance of this interface can be registered with the SIP RA using
OCSleeSipProvider.registerOverloadControlPlugin(SipOverloadControlPlugin)
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LimiterInstruction
invoke(SipOverloadControlContext context, javax.sip.message.Request request)
This operation is invoked by the SIP RA when it receives a SIP request from the network.
-
-
-
Method Detail
-
invoke
LimiterInstruction invoke(SipOverloadControlContext context, javax.sip.message.Request request)
This operation is invoked by the SIP RA when it receives a SIP request from the network. It allows the overload control plugin to dictate how the request should be further processed by the RA.This operation is invoked in the critical path of the SIP RA, for all received SIP requests. Implementations of this operation must be thread safe, non-blocking, and as close to O(1) as is possible.
If the implementation of this method throws an exception or returns null, the RA will carry on processing the request as though the plugin had returned
LimiterInstruction.accept()
.- Parameters:
context
- aSipOverloadControlContext
to assist the plugin in creating error responses.request
- the SIP request.- Returns:
- a LimiterInstruction indicating how the request should be further processed.
A null return value is treated as though the instruction has an action of
LimiterInstruction.Action.ACCEPT
.
-
-