org.mobicents.servlet.sip.message
Class MobicentsSipApplicationSessionFacade
java.lang.Object
org.mobicents.servlet.sip.message.MobicentsSipApplicationSessionFacade
- All Implemented Interfaces:
- java.io.Externalizable, java.io.Serializable, SipApplicationSession, MobicentsSipApplicationSession
public class MobicentsSipApplicationSessionFacade
- extends java.lang.Object
- implements MobicentsSipApplicationSession, java.io.Externalizable
The purpose of this class is to be a facade to the real sip application session as well as a
serializable session class that can be put as a session attribute in other sessions or even its own session.
Basically instead of replicating the whole attribute map, we will replicate the id, then on the remote side we will
read the ID and look it up in the remote session manager.
- Author:
- vralev, jean.deruelle@gmail.com
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
MobicentsSipApplicationSessionFacade
public MobicentsSipApplicationSessionFacade()
MobicentsSipApplicationSessionFacade
public MobicentsSipApplicationSessionFacade(MobicentsSipApplicationSession sipApplicationSession)
getMobicentstSipApplicationSession
public MobicentsSipApplicationSession getMobicentstSipApplicationSession()
access
public void access()
- Specified by:
access in interface MobicentsSipApplicationSession
addHttpSession
public boolean addHttpSession(javax.servlet.http.HttpSession httpSession)
- Specified by:
addHttpSession in interface MobicentsSipApplicationSession
addServletTimer
public void addServletTimer(ServletTimer servletTimer)
- Specified by:
addServletTimer in interface MobicentsSipApplicationSession
addSipSession
public boolean addSipSession(MobicentsSipSession mobicentsSipSession)
- Specified by:
addSipSession in interface MobicentsSipApplicationSession
findHttpSession
public javax.servlet.http.HttpSession findHttpSession(java.lang.String id)
- Specified by:
findHttpSession in interface MobicentsSipApplicationSession
getCurrentRequestHandler
public java.lang.String getCurrentRequestHandler()
- Specified by:
getCurrentRequestHandler in interface MobicentsSipApplicationSession
getKey
public SipApplicationSessionKey getKey()
- Specified by:
getKey in interface MobicentsSipApplicationSession
getSemaphore
public java.util.concurrent.Semaphore getSemaphore()
- Specified by:
getSemaphore in interface MobicentsSipApplicationSession
getSipContext
public SipContext getSipContext()
- Specified by:
getSipContext in interface MobicentsSipApplicationSession
hasTimerListener
public boolean hasTimerListener()
- Specified by:
hasTimerListener in interface MobicentsSipApplicationSession
isExpired
public boolean isExpired()
- Specified by:
isExpired in interface MobicentsSipApplicationSession
notifySipApplicationSessionListeners
public void notifySipApplicationSessionListeners(SipApplicationSessionEventType expiration)
- Specified by:
notifySipApplicationSessionListeners in interface MobicentsSipApplicationSession
onSipSessionReadyToInvalidate
public void onSipSessionReadyToInvalidate(MobicentsSipSession mobicentsSipSession)
- Specified by:
onSipSessionReadyToInvalidate in interface MobicentsSipApplicationSession
removeHttpSession
public boolean removeHttpSession(javax.servlet.http.HttpSession httpSession)
- Specified by:
removeHttpSession in interface MobicentsSipApplicationSession
removeServletTimer
public void removeServletTimer(ServletTimer servletTimer)
- Specified by:
removeServletTimer in interface MobicentsSipApplicationSession
setCurrentRequestHandler
public void setCurrentRequestHandler(java.lang.String currentRequestHandler)
- Specified by:
setCurrentRequestHandler in interface MobicentsSipApplicationSession
tryToInvalidate
public void tryToInvalidate()
- Specified by:
tryToInvalidate in interface MobicentsSipApplicationSession
encodeURI
public void encodeURI(URI uri)
- Specified by:
encodeURI in interface SipApplicationSession
encodeURL
public java.net.URL encodeURL(java.net.URL url)
- Specified by:
encodeURL in interface SipApplicationSession
getApplicationName
public java.lang.String getApplicationName()
- Specified by:
getApplicationName in interface SipApplicationSession
getAttribute
public java.lang.Object getAttribute(java.lang.String name)
- Specified by:
getAttribute in interface SipApplicationSession
getAttributeNames
public java.util.Iterator<java.lang.String> getAttributeNames()
- Specified by:
getAttributeNames in interface SipApplicationSession
getCreationTime
public long getCreationTime()
- Specified by:
getCreationTime in interface SipApplicationSession
getExpirationTime
public long getExpirationTime()
- Specified by:
getExpirationTime in interface SipApplicationSession
getId
public java.lang.String getId()
- Specified by:
getId in interface SipApplicationSession
getInvalidateWhenReady
public boolean getInvalidateWhenReady()
- Specified by:
getInvalidateWhenReady in interface SipApplicationSession
getLastAccessedTime
public long getLastAccessedTime()
- Specified by:
getLastAccessedTime in interface SipApplicationSession
getSession
public java.lang.Object getSession(java.lang.String id,
SipApplicationSession.Protocol protocol)
- Specified by:
getSession in interface SipApplicationSession
getSessions
public java.util.Iterator<?> getSessions()
- Specified by:
getSessions in interface SipApplicationSession
getSessions
public java.util.Iterator<?> getSessions(java.lang.String protocol)
- Specified by:
getSessions in interface SipApplicationSession
getSipSession
public SipSession getSipSession(java.lang.String id)
- Specified by:
getSipSession in interface SipApplicationSession
getTimer
public ServletTimer getTimer(java.lang.String id)
- Specified by:
getTimer in interface SipApplicationSession
getTimers
public java.util.Collection<ServletTimer> getTimers()
- Specified by:
getTimers in interface SipApplicationSession
invalidate
public void invalidate()
- Specified by:
invalidate in interface SipApplicationSession
isReadyToInvalidate
public boolean isReadyToInvalidate()
- Specified by:
isReadyToInvalidate in interface SipApplicationSession
isValid
public boolean isValid()
- Specified by:
isValid in interface SipApplicationSession
isValidInternal
public boolean isValidInternal()
- Specified by:
isValidInternal in interface MobicentsSipApplicationSession
removeAttribute
public void removeAttribute(java.lang.String name)
- Specified by:
removeAttribute in interface SipApplicationSession
setAttribute
public void setAttribute(java.lang.String name,
java.lang.Object attribute)
- Specified by:
setAttribute in interface SipApplicationSession
setExpires
public int setExpires(int deltaMinutes)
- Specified by:
setExpires in interface SipApplicationSession
setInvalidateWhenReady
public void setInvalidateWhenReady(boolean invalidateWhenReady)
- Specified by:
setInvalidateWhenReady in interface SipApplicationSession
getSession
public MobicentsSipApplicationSessionFacade getSession()
- Specified by:
getSession in interface MobicentsSipApplicationSession
readExternal
public void readExternal(java.io.ObjectInput arg0)
throws java.io.IOException,
java.lang.ClassNotFoundException
- Specified by:
readExternal in interface java.io.Externalizable
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
writeExternal
public void writeExternal(java.io.ObjectOutput arg0)
throws java.io.IOException
- Specified by:
writeExternal in interface java.io.Externalizable
- Throws:
java.io.IOException
getJvmRoute
public java.lang.String getJvmRoute()
- Specified by:
getJvmRoute in interface MobicentsSipApplicationSession
setJvmRoute
public void setJvmRoute(java.lang.String jvmRoute)
- Specified by:
setJvmRoute in interface MobicentsSipApplicationSession
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
setExpirationTimerTask
public void setExpirationTimerTask(SipApplicationSessionTimerTask expirationTimerTask)
- Specified by:
setExpirationTimerTask in interface MobicentsSipApplicationSession
setExpired
public void setExpired(boolean hasExpired)
- Specified by:
setExpired in interface MobicentsSipApplicationSession
getExpirationTimeInternal
public long getExpirationTimeInternal()
- Specified by:
getExpirationTimeInternal in interface MobicentsSipApplicationSession
Copyright © 2010. All Rights Reserved.