|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Associates SIP messages belonging to the same SIP session. This is also known as a call leg. Two messages belong to the same SipSession if they have identical Call-ID, From, and To headers (modulo tags) as described in RFC 2543.
Method Summary | |
SipServletRequest |
createRequest(java.lang.String method)
Returns a new request |
SipApplicationSession |
getApplicationSession()
Returns the application session with which this SipSession
is associated. |
java.lang.Object |
getAttribute(java.lang.String name)
Returns the object bound with the specified name in this session, or null if no object is bound under the name. |
java.util.Enumeration |
getAttributeNames()
Returns an Enumeration over the String
objects containing the names of all the objects bound to this session. |
java.lang.String |
getCallId()
Returns the Call-ID for this SipSession . |
long |
getCreationTime()
Returns the time when this session was created, measured in milliseconds since midnight January 1, 1970 GMT. |
java.lang.String |
getId()
Returns a string containing the unique identifier assigned to this session. |
long |
getLastAccessedTime()
Returns the last time the client sent a request associated with this session, as the number of milliseconds since midnight January 1, 1970 GMT. |
SipAddress |
getLocalParty()
Returns the SipAddress identifying the local party. |
SipAddress |
getRemoteParty()
Returns the SipAddress identifying the remote party. |
void |
invalidate()
Invalidates this session and unbinds any objects bound to it. |
void |
removeAttribute(java.lang.String name)
Removes the object bound with the specified name from this session. |
void |
setAttribute(java.lang.String name,
java.lang.Object attribute)
Binds an object to this session, using the name specified. |
void |
setHandler(java.lang.String name)
Sets the handler for this SipSession . |
Method Detail |
public long getCreationTime()
java.lang.IllegalStateException
- if this method is called on an invalidated sessionpublic java.lang.String getId()
public long getLastAccessedTime()
public void invalidate()
java.lang.IllegalStateException
- if this method is called on an invalidated sessionpublic SipApplicationSession getApplicationSession()
SipSession
is associated.SipSession
public java.lang.String getCallId()
SipSession
. This is the
value of the Call-ID header for all messages belonging to this session.SipSession
public SipAddress getLocalParty()
SipAddress
identifying the local party. This is
the value of the From header of locally initiated requests in this leg.public SipAddress getRemoteParty()
SipAddress
identifying the remote party. This is
the value of the To header of locally initiated requests in this leg.public SipServletRequest createRequest(java.lang.String method)
method
- the SIP method of the new requestjava.lang.IllegalStateException
- if this SipSession
has been invalidatedpublic void setHandler(java.lang.String name) throws javax.servlet.ServletException
SipSession
.
This method can be used to
explicitly specify the name of the servlet which should handle all
subsequently received messages for this SipSession
.
The servlet must belong to the same application (i.e. same
ServletContext
) as the caller.name
- name of the servlet to be invoked for incoming
SIP messages belonging to this SipSession
javax.servlet.ServletException
- if no servlet with the specified name
exists in this applicationpublic java.lang.Object getAttribute(java.lang.String name)
name
- a string specifying the name of the objectjava.lang.IllegalStateException
- if this method is called on an invalidated sessionpublic java.util.Enumeration getAttributeNames()
Enumeration
over the String
objects containing the names of all the objects bound to this session.java.lang.IllegalStateException
- if this method is called on an invalidated sessionpublic void setAttribute(java.lang.String name, java.lang.Object attribute)
name
- the name to which the object is bound; cannot be nullattribute
- the object to be bound; cannot be nulljava.lang.IllegalStateException
- if this method is called on an invalidated sessionpublic void removeAttribute(java.lang.String name)
name
- the name of the object to remove from this sessionjava.lang.IllegalStateException
- if this method is called on an invalidated session
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |