public abstract class AbstractChallengedMessageHandler extends Object implements ChallengedMessageHandler
ChallengedMessageHandler. It simply handles messages as they come and
notifies all the threads waiting for this. It stores neither handled requests
nor responses.
If credentials are provided, then authentication is automatically handled
with the help of a AuthenticationHelper. Responses with a challenge
which can be successfully resolved by the helper are handled silently and are
not notified. Once a helper was used, it is attached to the response's
session, so users of this object should retrieve it and call its
AuthenticationHelper.addAuthentication(SipServletRequest) on any new
request belonging to the same session request before sending it.
| Modifier and Type | Field and Description |
|---|---|
static String |
HANDLED_ATTRIBUTE |
| Constructor and Description |
|---|
AbstractChallengedMessageHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
addToCredentials(Credentials credentials) |
protected void |
doWait(Object o) |
protected void |
doWait(Object o,
long timeout) |
protected AuthenticationHelper |
getAuthenticationHelper(javax.servlet.sip.SipServletMessage message) |
List<Credentials> |
getCredentials() |
protected AuthenticationHelper |
getOrCreateAuthenticationHelper(javax.servlet.sip.SipServletMessage message) |
long |
getTimeout() |
boolean |
handleAuthentication(javax.servlet.sip.SipServletResponse response)
Handles responses containing a challenge.
|
void |
setCredentials(List<Credentials> credentials) |
void |
setTimeout(long timeout) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandleRequest, handleResponsepublic static final String HANDLED_ATTRIBUTE
public List<Credentials> getCredentials()
public void setCredentials(List<Credentials> credentials)
public void addToCredentials(Credentials credentials)
public long getTimeout()
public void setTimeout(long timeout)
public boolean handleAuthentication(javax.servlet.sip.SipServletResponse response)
throws IOException,
javax.servlet.ServletException
ChallengedMessageHandlerhandleAuthentication in interface ChallengedMessageHandlertrue if the message should be forwarded up to this
MessageHandler user, false otherwise.IOExceptionjavax.servlet.ServletExceptionprotected AuthenticationHelper getAuthenticationHelper(javax.servlet.sip.SipServletMessage message)
protected AuthenticationHelper getOrCreateAuthenticationHelper(javax.servlet.sip.SipServletMessage message)
protected void doWait(Object o)
protected void doWait(Object o, long timeout)
Copyright © 2014. All Rights Reserved.