org.mobicents.servlet.sip.core.session
Class SipSessionKey
java.lang.Object
org.mobicents.servlet.sip.core.session.SipSessionKey
- All Implemented Interfaces:
- java.io.Serializable
public final class SipSessionKey
- extends java.lang.Object
- implements java.io.Serializable
Class representing the key (which will also be its id) for a sip session.
It is composed of the From Header parameter Tag, the To Header parameter tag, the Call-Id, the app session id and the application Name.
IT is maaped to the SIP Dialog from RFC3261 (from tag, to tag + call-ID)
It is to be noted that the To Header parameter Tag will not be used in SipSessionKey comparison (equals() and hashcode() methods).
It will only be used to check if a new derived sip session needs to be created.
- Author:
- Jean Deruelle
- See Also:
- Serialized Form
|
Constructor Summary |
SipSessionKey(java.lang.String fromTag,
java.lang.String toTag,
java.lang.String callId,
java.lang.String applicationSessionId,
java.lang.String applicationName)
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
SipSessionKey
public SipSessionKey(java.lang.String fromTag,
java.lang.String toTag,
java.lang.String callId,
java.lang.String applicationSessionId,
java.lang.String applicationName)
- Parameters:
fromAddress - fromTag - toAddress - toTag - callId - applicationSessionId - applicationName -
getFromTag
public java.lang.String getFromTag()
- Returns:
- the fromTag
getToTag
public java.lang.String getToTag()
- Returns:
- the toTag
getCallId
public java.lang.String getCallId()
- Returns:
- the callId
getApplicationSessionId
public java.lang.String getApplicationSessionId()
- Returns:
- the applicationSessionId
getApplicationName
public java.lang.String getApplicationName()
- Returns:
- the applicationName
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
setToTag
public void setToTag(java.lang.String toTag,
boolean recomputeSessionId)
- Sets the to tag on the key when we receive a response.
We recompute the session id only for derived session otherwise the id will change
when the a request is received or sent and the response is sent back or received which should not happen
See TCK test SipSessionListenerTest.testSessionDestroyed001
- Parameters:
toTag - the toTag to setrecomputeSessionId - check if the sessionid need to be recomputed
setToString
public void setToString(java.lang.String toString)
- Parameters:
toString - the toString to set
computeToString
public void computeToString()
Copyright © 2011. All Rights Reserved.