public class Session extends java.lang.Object implements SessionManager.SipSessionIf, org.eclipse.jetty.util.component.Dumpable
| Modifier and Type | Class and Description |
|---|---|
class |
Session.DialogInfo |
static class |
Session.Role |
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
_attributes |
protected java.lang.String |
_callId |
protected java.util.List<ClientTransaction> |
_clientTransactions |
protected java.lang.String |
_linkedSessionId |
protected javax.servlet.sip.Address |
_localParty |
protected javax.servlet.sip.ar.SipApplicationRoutingRegion |
_region |
protected javax.servlet.sip.Address |
_remoteParty |
protected Session.Role |
_role |
protected java.util.List<ServerTransaction> |
_serverTransactions |
protected javax.servlet.sip.SipSession.State |
_state |
protected javax.servlet.sip.URI |
_subscriberURI |
| Modifier | Constructor and Description |
|---|---|
|
Session(ApplicationSession applicationSession,
java.lang.String id,
SipRequest request) |
|
Session(ApplicationSession applicationSession,
java.lang.String id,
java.lang.String callId,
javax.servlet.sip.Address local,
javax.servlet.sip.Address remote) |
protected |
Session(ApplicationSession applicationSession,
java.lang.String id,
java.lang.String callId,
javax.servlet.sip.Address local,
javax.servlet.sip.Address remote,
long created,
long lastAccessed) |
|
Session(java.lang.String id,
Session other) |
| Modifier and Type | Method and Description |
|---|---|
void |
access() |
void |
addClientTransaction(ClientTransaction transaction) |
void |
addServerTransaction(ServerTransaction transaction) |
ApplicationSession |
appSession() |
protected void |
createProxyDialog(SipResponse response) |
javax.servlet.sip.SipServletRequest |
createRequest(java.lang.String method) |
void |
createUA(javax.servlet.sip.UAMode mode) |
protected java.lang.Object |
doPutOrRemove(java.lang.String name,
java.lang.Object value) |
java.lang.String |
dump() |
void |
dump(java.lang.Appendable out,
java.lang.String indent) |
boolean |
equals(java.lang.Object o) |
javax.servlet.sip.SipApplicationSession |
getApplicationSession() |
java.lang.Object |
getAttribute(java.lang.String name) |
java.util.Enumeration<java.lang.String> |
getAttributeNames() |
java.lang.String |
getCallId() |
java.util.List<ClientTransaction> |
getClientTransactions() |
javax.servlet.sip.Address |
getContact() |
javax.servlet.sip.Address |
getContact(SipConnection connection) |
javax.servlet.sip.Address |
getContact(SipConnector connector) |
long |
getCreationTime() |
SipServletHolder |
getHandler() |
java.lang.String |
getId() |
boolean |
getInvalidateWhenReady() |
long |
getLastAccessedTime() |
Session |
getLinkedSession() |
javax.servlet.sip.Address |
getLocalParty() |
java.lang.String |
getLocalTag() |
javax.servlet.sip.ar.SipApplicationRoutingRegion |
getRegion() |
javax.servlet.sip.Address |
getRemoteParty() |
protected SipServer |
getServer() |
java.util.List<ServerTransaction> |
getServerTransactions() |
javax.servlet.ServletContext |
getServletContext() |
Session |
getSession() |
javax.servlet.sip.SipSession.State |
getState() |
javax.servlet.sip.URI |
getSubscriberURI() |
Session.DialogInfo |
getUa() |
void |
invalidate() |
void |
invalidateIfReady() |
void |
invokeServlet(SipRequest request) |
void |
invokeServlet(SipResponse response) |
boolean |
isDialog(java.lang.String callId,
java.lang.String fromTag,
java.lang.String toTag) |
boolean |
isProxy() |
boolean |
isReadyToInvalidate() |
boolean |
isSameDialog(SipResponse response) |
boolean |
isTerminated() |
boolean |
isUA() |
boolean |
isValid() |
protected Session.DialogInfo |
newDialogInfo() |
void |
putAttribute(java.lang.String name,
java.lang.Object value) |
void |
removeAttribute(java.lang.String name) |
void |
removeTransaction(Transaction transaction) |
ClientTransaction |
sendRequest(SipRequest request) |
ClientTransaction |
sendRequest(SipRequest request,
ClientTransactionListener listener) |
void |
sendResponse(SipResponse response,
boolean reliable) |
void |
setAttribute(java.lang.String name,
java.lang.Object value) |
void |
setHandler(SipServletHolder handler) |
void |
setHandler(java.lang.String name) |
void |
setInvalidateWhenReady(boolean invalidateWhenReady) |
void |
setLinkedSession(Session session) |
void |
setOutboundInterface(java.net.InetAddress address) |
void |
setOutboundInterface(java.net.InetSocketAddress address) |
void |
setProxy() |
void |
setRecordRoute(boolean recordRoute) |
void |
setRegion(javax.servlet.sip.ar.SipApplicationRoutingRegion region) |
void |
setSubscriberURI(javax.servlet.sip.URI uri) |
void |
setUAS() |
java.lang.String |
toString() |
void |
updateState(SipResponse response,
boolean uac) |
void |
updateStateOnProxyComplete(boolean forceTerminated)
When in proxy mode, the server transaction become complete, the derived sessions
state should be set to TERMINATED.
|
protected javax.servlet.sip.SipSession.State _state
protected Session.Role _role
protected final java.lang.String _callId
protected javax.servlet.sip.Address _localParty
protected javax.servlet.sip.Address _remoteParty
protected java.util.Map<java.lang.String,java.lang.Object> _attributes
protected java.util.List<ServerTransaction> _serverTransactions
protected java.util.List<ClientTransaction> _clientTransactions
protected java.lang.String _linkedSessionId
protected javax.servlet.sip.ar.SipApplicationRoutingRegion _region
protected javax.servlet.sip.URI _subscriberURI
public Session(ApplicationSession applicationSession, java.lang.String id, SipRequest request)
public Session(ApplicationSession applicationSession, java.lang.String id, java.lang.String callId, javax.servlet.sip.Address local, javax.servlet.sip.Address remote)
protected Session(ApplicationSession applicationSession, java.lang.String id, java.lang.String callId, javax.servlet.sip.Address local, javax.servlet.sip.Address remote, long created, long lastAccessed)
public Session(java.lang.String id,
Session other)
public ApplicationSession appSession()
public boolean isUA()
public boolean isProxy()
public void setLinkedSession(Session session)
public Session getLinkedSession()
protected SipServer getServer()
protected java.lang.Object doPutOrRemove(java.lang.String name,
java.lang.Object value)
public void setProxy()
public void setRecordRoute(boolean recordRoute)
public void setUAS()
public void createUA(javax.servlet.sip.UAMode mode)
protected Session.DialogInfo newDialogInfo()
public void sendResponse(SipResponse response, boolean reliable) throws java.io.IOException
java.io.IOExceptionpublic ClientTransaction sendRequest(SipRequest request, ClientTransactionListener listener) throws java.io.IOException
java.io.IOExceptionpublic ClientTransaction sendRequest(SipRequest request) throws java.io.IOException
java.io.IOExceptionpublic void invokeServlet(SipRequest request) throws SipException
SipExceptionpublic void invokeServlet(SipResponse response)
public void access()
public void updateStateOnProxyComplete(boolean forceTerminated)
SipReponse - the last received response for the branch.public void updateState(SipResponse response, boolean uac)
public boolean isSameDialog(SipResponse response)
public boolean isDialog(java.lang.String callId,
java.lang.String fromTag,
java.lang.String toTag)
protected void createProxyDialog(SipResponse response)
public javax.servlet.sip.Address getContact()
public javax.servlet.sip.Address getContact(SipConnector connector)
public javax.servlet.sip.Address getContact(SipConnection connection)
public javax.servlet.sip.SipServletRequest createRequest(java.lang.String method)
createRequest in interface javax.servlet.sip.SipSessionpublic SipServletHolder getHandler()
public void setHandler(SipServletHolder handler)
public javax.servlet.sip.SipApplicationSession getApplicationSession()
getApplicationSession in interface javax.servlet.sip.SipSessionSipSession.getApplicationSession()public java.lang.Object getAttribute(java.lang.String name)
getAttribute in interface javax.servlet.sip.SipSessionSipSession.getAttribute(String)public java.util.Enumeration<java.lang.String> getAttributeNames()
getAttributeNames in interface javax.servlet.sip.SipSessionSipSession.getAttributeNames()public java.lang.String getCallId()
getCallId in interface javax.servlet.sip.SipSessionpublic long getCreationTime()
getCreationTime in interface javax.servlet.sip.SipSessionSipSession.getCreationTime()public java.lang.String getId()
getId in interface javax.servlet.sip.SipSessionSipSession.getId()public boolean getInvalidateWhenReady()
getInvalidateWhenReady in interface javax.servlet.sip.SipSessionpublic long getLastAccessedTime()
getLastAccessedTime in interface javax.servlet.sip.SipSessionSipSession.getLastAccessedTime()public javax.servlet.sip.Address getLocalParty()
getLocalParty in interface javax.servlet.sip.SipSessionpublic javax.servlet.sip.ar.SipApplicationRoutingRegion getRegion()
getRegion in interface javax.servlet.sip.SipSessionpublic javax.servlet.sip.Address getRemoteParty()
getRemoteParty in interface javax.servlet.sip.SipSessionpublic java.lang.String getLocalTag()
public javax.servlet.ServletContext getServletContext()
getServletContext in interface javax.servlet.sip.SipSessionSipSession.getServletContext()public javax.servlet.sip.SipSession.State getState()
getState in interface javax.servlet.sip.SipSessionSipSession.getState()public javax.servlet.sip.URI getSubscriberURI()
getSubscriberURI in interface javax.servlet.sip.SipSessionpublic void invalidate()
invalidate in interface javax.servlet.sip.SipSessionpublic boolean isReadyToInvalidate()
isReadyToInvalidate in interface javax.servlet.sip.SipSessionpublic void invalidateIfReady()
public boolean isValid()
isValid in interface javax.servlet.sip.SipSessionSipSession.isValid()public boolean isTerminated()
public void removeAttribute(java.lang.String name)
removeAttribute in interface javax.servlet.sip.SipSessionSipSession.removeAttribute(String)public void setAttribute(java.lang.String name,
java.lang.Object value)
setAttribute in interface javax.servlet.sip.SipSessionSipSession.setAttribute(String, Object)public void putAttribute(java.lang.String name,
java.lang.Object value)
public void setHandler(java.lang.String name)
throws javax.servlet.ServletException
setHandler in interface javax.servlet.sip.SipSessionjavax.servlet.ServletExceptionSipSession.setHandler(String)public void setInvalidateWhenReady(boolean invalidateWhenReady)
setInvalidateWhenReady in interface javax.servlet.sip.SipSessionpublic void setOutboundInterface(java.net.InetSocketAddress address)
setOutboundInterface in interface javax.servlet.sip.SipSessionpublic void setOutboundInterface(java.net.InetAddress address)
setOutboundInterface in interface javax.servlet.sip.SipSessionpublic void addServerTransaction(ServerTransaction transaction)
public void removeTransaction(Transaction transaction)
public java.util.List<ServerTransaction> getServerTransactions()
public void addClientTransaction(ClientTransaction transaction)
public java.util.List<ClientTransaction> getClientTransactions()
public void setSubscriberURI(javax.servlet.sip.URI uri)
public void setRegion(javax.servlet.sip.ar.SipApplicationRoutingRegion region)
public Session.DialogInfo getUa()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic Session getSession()
getSession in interface SessionManager.SipSessionIfpublic java.lang.String dump()
dump in interface org.eclipse.jetty.util.component.Dumpablepublic void dump(java.lang.Appendable out,
java.lang.String indent)
throws java.io.IOException
dump in interface org.eclipse.jetty.util.component.Dumpablejava.io.IOExceptionCopyright © 2015. All Rights Reserved.