|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nist.javax.sip.stack.CongestionControlMessageValve
public class CongestionControlMessageValve
This is just a simple reusable congestion control valve JSIP apps can use to stop traffic when the number of server transactions reaches the limit specified in gov.nist.javax.sip.MAX_SERVER_TRANSACTIONS without breaking existing dialogs. The drop policy is specified in DROP_RESPONSE_STATUS where "0" means silent drop and any positive number will be interpreted as the status code of the error response that will be generated. To enable this in your application you must specify this property: gov.nist.javax.sip.SIP_MESSAGE_VALVE=gov.nist.javax.sip.stack.CongestionControlMessageValve It is advised to extend this class to add your application-specific control conditions
Field Summary | |
---|---|
protected int |
dropResponseStatus
|
protected int |
serverTransactionTableHighwaterMark
|
protected SipStackImpl |
sipStack
|
Constructor Summary | |
---|---|
CongestionControlMessageValve()
|
Method Summary | |
---|---|
void |
destroy()
This method is called when the valve is about to be destroyed. |
void |
init(SipStack stack)
This method is called when the valve is initialized. |
boolean |
processRequest(SIPRequest request,
MessageChannel messageChannel)
The callback method that is called for every request before any transaction/dialog mapping or allocation occur. |
boolean |
processResponse(Response response,
MessageChannel messageChannel)
The callback method that is called for every response before any transaction/dialog mapping or allocation occur. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected SipStackImpl sipStack
protected int serverTransactionTableHighwaterMark
protected int dropResponseStatus
Constructor Detail |
---|
public CongestionControlMessageValve()
Method Detail |
---|
public boolean processRequest(SIPRequest request, MessageChannel messageChannel)
SIPMessageValve
processRequest
in interface SIPMessageValve
public boolean processResponse(Response response, MessageChannel messageChannel)
SIPMessageValve
processResponse
in interface SIPMessageValve
public void destroy()
SIPMessageValve
destroy
in interface SIPMessageValve
public void init(SipStack stack)
SIPMessageValve
init
in interface SIPMessageValve
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |