public class Registration extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
Registration.Listener |
| Constructor and Description |
|---|
Registration(javax.servlet.sip.SipURI uri) |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(Registration.Listener listener) |
javax.servlet.sip.SipServletRequest |
createRegister(javax.servlet.sip.Address contact,
int expires) |
List<Credentials> |
getCredentials() |
javax.servlet.sip.SipFactory |
getFactory() |
List<Registration.Listener> |
getListeners() |
javax.servlet.sip.Address |
getOutboundProxy() |
long |
getTimeout() |
javax.servlet.sip.SipURI |
getURI() |
protected void |
processResponse(javax.servlet.sip.SipServletResponse response) |
boolean |
register(javax.servlet.sip.Address contact,
int expires)
Synchronously registers
contact with the given expiration
value. |
protected void |
registrationDone(javax.servlet.sip.Address contact,
int expires,
List<javax.servlet.sip.Address> contacts) |
protected void |
registrationFailed(int status) |
void |
removeListener(Registration.Listener listener) |
void |
setCredentials(List<Credentials> credentials) |
void |
setFactory(javax.servlet.sip.SipFactory factory) |
void |
setOutboundProxy(javax.servlet.sip.Address outboundProxy) |
void |
setTimeout(long timeout) |
boolean |
unregister(javax.servlet.sip.Address contact)
Synchronously unregisters
contact. |
public javax.servlet.sip.SipFactory getFactory()
public void setFactory(javax.servlet.sip.SipFactory factory)
public List<Credentials> getCredentials()
public void setCredentials(List<Credentials> credentials)
public long getTimeout()
public void setTimeout(long timeout)
public javax.servlet.sip.SipURI getURI()
public List<Registration.Listener> getListeners()
public void addListener(Registration.Listener listener)
public void removeListener(Registration.Listener listener)
public javax.servlet.sip.SipServletRequest createRegister(javax.servlet.sip.Address contact,
int expires)
public boolean register(javax.servlet.sip.Address contact,
int expires)
throws IOException,
javax.servlet.ServletException
contact with the given expiration
value.
This method returns either when success, failure or request timeout is
encountered, and the listener, if any, is notified as well.
Authentication is handled automatically if credentials were provided to
this Registration.contact - expires - true if registration was successful,
false otherwise.IOExceptionjavax.servlet.ServletExceptionpublic boolean unregister(javax.servlet.sip.Address contact)
throws IOException,
javax.servlet.ServletException
contact.contact - the contact to unregister. If null, then * is set
in the REGISTER request's Contact header, so that all contacts
are unregistered.true if unregistration was successful,
false otherwise.IOExceptionjavax.servlet.ServletExceptionprotected void registrationDone(javax.servlet.sip.Address contact,
int expires,
List<javax.servlet.sip.Address> contacts)
protected void registrationFailed(int status)
protected void processResponse(javax.servlet.sip.SipServletResponse response)
throws javax.servlet.ServletException,
IOException
javax.servlet.ServletExceptionIOExceptionpublic javax.servlet.sip.Address getOutboundProxy()
public void setOutboundProxy(javax.servlet.sip.Address outboundProxy)
Copyright © 2014. All Rights Reserved.