|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bea.wcp.diameter.Session
Base class for Diameter application sessions. Diameter applications extend this class in order to provide application-specific handling of requests or answer messages for the application.
Constructor Summary | |
Session(Application app)
Creates a new client Session for the specified Application. |
|
Session(Application app,
java.lang.String id)
Creates a new server Session for the specified Application and session id. |
Method Summary | |
Request |
createRequest(Command cmd)
Creates a new Request for this session. |
Application |
getApplication()
Returns the Application for this Session. |
java.lang.Object |
getAttribute(java.lang.String name)
Returns the value of the specified session attribute. |
java.lang.String |
getId()
Returns the session identifier. |
SessionListener |
getListener()
Returns the SessionListener for this session. |
boolean |
isTerminated()
Returns true if this session has been terminated. |
protected void |
notifyListener(Message msg)
Deliver specified message to session listener. |
protected void |
rcvAnswer(Answer ans)
Called when an answer message has been received for this session. |
void |
rcvMessage(Message msg)
Called when a new Request or Answer has been received http://news.com.com/2061-10802_3-6160230.html?tag=nefd.aoffor this session. |
protected void |
rcvRequest(Request req)
Called when a new request message has been received for this session. |
void |
removeAttribute(java.lang.String name)
Removes the session attribute with the specified name. |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Sets the new value of a session attribute, replacing any previous value. |
void |
setListener(SessionListener listener)
Sets the SessionListener for this session. |
void |
sndMessage(Message msg)
Called by the container when a message is about to be sent but before it has been committed. |
void |
terminate()
Terminates the session. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Session(Application app)
public Session(Application app, java.lang.String id)
java.lang.IllegalStateException
- if a session with the same id has already been createdMethod Detail |
public Request createRequest(Command cmd)
cmd
- the command for the request
public final Application getApplication()
public java.lang.Object getAttribute(java.lang.String name)
name
- the attribute name
public final java.lang.String getId()
public SessionListener getListener()
public boolean isTerminated()
protected void notifyListener(Message msg) throws DiameterException, java.io.IOException
msg
- the message to be delivered
DiameterException
java.io.IOException
protected void rcvAnswer(Answer ans) throws DiameterException, java.io.IOException
ans
- the answer message that has been received
java.io.IOException
- if an error occured while processing the answer
DiameterException
public void rcvMessage(Message msg) throws DiameterException, java.io.IOException
msg
- the message that has been received
java.io.IOException
- if an error occured while processing the message
DiameterException
protected void rcvRequest(Request req) throws DiameterException, java.io.IOException
req
- the request that has been received
java.io.IOException
- if an error occurred while processing the request
DiameterException
public void removeAttribute(java.lang.String name)
name
- the attribute namepublic void setAttribute(java.lang.String name, java.lang.Object value)
name
- the attribute namevalue
- the new attribute valuepublic void setListener(SessionListener listener)
listener
- the new SessionListenerpublic void sndMessage(Message msg) throws java.io.IOException
msg
- the message being sent
java.io.IOException
- if an I/O error occurred while sending the messagepublic void terminate()
public java.lang.String toString()
|
Documentation is available at http://download.oracle.com/docs/cd/E13209_01/wlcp/wlss31/ Copyright 2007 BEA Systems Inc. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |