|
Oracle Communications Converged Application Server Java API Reference 5.1 E36938-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
com.bea.wcp.diameter.Session
public class 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, String id)Creates a new server Session for the specified Application and session id. |
|
| Method Summary | |
|---|---|
XmlBuffer |
appendXml(XmlBuffer xb) |
Request |
createRequest(Command cmd)Creates a new Request for this session. |
Application |
getApplication()Returns the Application for this Session. |
Object |
getAttribute(String name)Returns the value of the specified session attribute. |
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(String name)Removes the session attribute with the specified name. |
void |
setAttribute(String name, 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. |
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,
String id)
app - the Application for the sessionid - the session idIllegalStateException - if a session with the same id has already been createdpublic Session(Application app)
app - the Application for the session| Method Detail |
|---|
public void setListener(SessionListener listener)
listener - the new SessionListenerpublic SessionListener getListener()
public final String getId()
public final Application getApplication()
public void setAttribute(String name,
Object value)
name - the attribute namevalue - the new attribute valuepublic Object getAttribute(String name)
name - the attribute namepublic void removeAttribute(String name)
name - the attribute namepublic void terminate()
public boolean isTerminated()
public Request createRequest(Command cmd)
cmd - the command for the request
protected void notifyListener(Message msg)
throws DiameterException,
IOException
msg - the message to be deliveredDiameterExceptionIOException
public void rcvMessage(Message msg)
throws DiameterException,
IOException
msg - the message that has been receivedIOException - if an error occured while processing the messageDiameterException
protected void rcvRequest(Request req)
throws DiameterException,
IOException
req - the request that has been receivedIOException - if an error occurred while processing the requestDiameterException
protected void rcvAnswer(Answer ans)
throws DiameterException,
IOException
ans - the answer message that has been receivedIOException - if an error occured while processing the answerDiameterException
public void sndMessage(Message msg)
throws IOException
msg - the message being sentIOException - if an I/O error occurred while sending the messagepublic String toString()
toString in class Objectpublic XmlBuffer appendXml(XmlBuffer xb)
|
Oracle Communications Converged Application Server Java API Reference 5.1 E36938-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright © 2012 Oracle Corporation. All Rights Reserved.