Package com.bea.wcp.diameter.cc
Class ClientSession
java.lang.Object
com.bea.wcp.diameter.Session
com.bea.wcp.diameter.cc.ClientSession
- All Implemented Interfaces:
Externalizable,Serializable
- Direct Known Subclasses:
RoSession
Diameter credit control application client session. See RFC 4006 for details.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionUsed by Externalizable.ClientSession(Application app) Creates a new ClientSession for the specified application.ClientSession(Application app, String id) ClientSession(Application app, String id, Object parent) -
Method Summary
Modifier and TypeMethodDescriptioncreateCCR(RequestType type) Creates a new credit-control request (CCR) for the specified request type.voidReceives a credit-control answer (CCA) message for this session.voidrcvRequest(Request req) Called by the container when a new request has been received.voidvoidsndMessage(Message msg) Called by the container just before a CCR/CCA message has been sent.voidMethods inherited from class com.bea.wcp.diameter.Session
appendXml, createRequest, getAdapter, getApplication, getAttribute, getId, getListener, isTerminated, notifyListener, rcvMessage, removeAttribute, setAdapter, setAttribute, setListener, terminate, toString
-
Constructor Details
-
ClientSession
public ClientSession()Used by Externalizable. -
ClientSession
Creates a new ClientSession for the specified application. -
ClientSession
-
ClientSession
-
-
Method Details
-
createCCR
Creates a new credit-control request (CCR) for the specified request type.- Parameters:
type- the credit-control request type- Returns:
- the new CCR for this session
-
sndMessage
Called by the container just before a CCR/CCA message has been sent. Updates the current credit-control state machine accordingly.- Overrides:
sndMessagein classSession- Parameters:
msg- the CCR/CCA message to be sent- Throws:
IOException- if an I/O error occurred while sending the messageIllegalStateException- if the session is terminated, a request is pending, or a request is out of sequence (invalid request number)
-
rcvRequest
Called by the container when a new request has been received. Provides handling for ACR requests sent by the server which are then optionally delivered to a session listener if configured for handling.- Overrides:
rcvRequestin classSession- Parameters:
req- the request being received- Throws:
DiameterException- if a protocol error has occurredIOException- if an I/O error has occurred
-
rcvAnswer
Receives a credit-control answer (CCA) message for this session. The session state will be updated according to the CCA request number and type. If the CCA request type is EVENT or TERMINATION, then the session will be automatically terminated.- Overrides:
rcvAnswerin classSession- Parameters:
ans- the CCA message- Throws:
DiameterException- if a protocol error has occurredIOException- if an I/O error has occurred
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Overrides:
writeExternalin classSession- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Overrides:
readExternalin classSession- Throws:
IOExceptionClassNotFoundException
-