Interface SipOverloadControlContext
-
public interface SipOverloadControlContext
Provides limited access to SIP stack functions for use by the overload control plugin. The plugin may create URI, address and header objects for use in error responses.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description javax.sip.message.Response
createResponse(int statusCode, javax.sip.message.Request request)
Create an error response for the request, for use withLimiterInstruction.reject(Response)
.javax.sip.address.AddressFactory
getAddressFactory()
Get the SIP RA'sAddressFactory
instance, for creating URIs and addresses used in headers.OCHeaderFactory
getHeaderFactory()
Get the SIP RA'sOCHeaderFactory
instance, for creating headers in error responses.
-
-
-
Method Detail
-
getAddressFactory
javax.sip.address.AddressFactory getAddressFactory()
Get the SIP RA'sAddressFactory
instance, for creating URIs and addresses used in headers.- Returns:
- an
AddressFactory
-
getHeaderFactory
OCHeaderFactory getHeaderFactory()
Get the SIP RA'sOCHeaderFactory
instance, for creating headers in error responses.- Returns:
- an
OCHeaderFactory
-
createResponse
javax.sip.message.Response createResponse(int statusCode, javax.sip.message.Request request)
Create an error response for the request, for use withLimiterInstruction.reject(Response)
. The response must have a status code of 300-699. A provisional or success response would create a dialog, which cannot be supported as the overload control plugin is not capable of acting as a SIP user agent.- Parameters:
statusCode
- the SIP status code for the response. This must be in the range 300-699.request
- the incoming request being processed by the overload control plugin.- Returns:
- a SIP response.
- Throws:
IllegalArgumentException
- if the status code is not in the range 300-699.
-
-