Oracle Corp.

Oracle WebLogic Communications Server 10.1 API Reference


com.bea.wcp.diameter.accounting
Class ClientSession

java.lang.Object
  extended bycom.bea.wcp.diameter.Session
      extended bycom.bea.wcp.diameter.accounting.ClientSession
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
RfSession

public class ClientSession
extends Session

Client accounting session implementing the client accounting state machine described in RFC 3588 section 8.2. This session can be used to create and send new ACR accounting requests, and receive corresponding ACA answer messages. The current session state is based on the accounting record type of the previously created request. For an EVENT ACR, the session will be terminated (removed from the Diameter session map) as soon as the corresponding EVENT ACA message is received. Likewise, after STOP ACR is sent, the session will be terminated as soon as the corresponding STOP ACA message is received.

See Also:
Serialized Form
Copyright © 2008 Oracle Corp. All Rights Reserved.

Constructor Summary
ClientSession(Application app)
          Creates a new ClientSession for the specified application.
 
Method Summary
 ACR createACR(RecordType type)
          Creates a new accounting request (ACR) for the specified accounting record type.
protected  void rcvAnswer(Answer ans)
          Receives accounting answer (ACA) message for this session.
 void sndMessage(Message msg)
          Called by container just before a new ACR or ACA message has been sent out.
 
Methods inherited from class com.bea.wcp.diameter.Session
createRequest, getApplication, getAttribute, getId, getListener, isTerminated, notifyListener, rcvMessage, rcvRequest, removeAttribute, setAttribute, setListener, terminate, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClientSession

public ClientSession(Application app)
Creates a new ClientSession for the specified application.

Method Detail

createACR

public ACR createACR(RecordType type)
Creates a new accounting request (ACR) for the specified accounting record type. For a newly created ClientSession, the first ACR request must be either an EVENT request for event-based accounting, or a START request for session-based accounting. If an EVENT request, then this must be the only request created for the session, and the session will be terminated automatically upon receipt of the corresponding EVENT ACA message. If a START request, then this must be followed by zero or more INTERIM requests, and finally a terminating STOP request. Upon receiving the STOP ACA message, the session will be automatically terminated.

Parameters:
type - the accounting RecordType for the request
Returns:
the resulting ACR request for this session
Throws:
java.lang.IllegalStateException - if the session is terminated, a request is currently pending, or the specified RequestType is not valid for the current session state

rcvAnswer

protected void rcvAnswer(Answer ans)
                  throws DiameterException,
                         java.io.IOException
Receives accounting answer (ACA) message for this session. Session state machine will be updated according to ACA record number and type. If ACA record type is EVENT or STOP then the session will be automatically terminated.

Overrides:
rcvAnswer in class Session
Parameters:
ans - the ACA message
Throws:
DiameterException - if a Diameter protocol error occurred
java.io.IOException - if an I/O error occurred while processing the message

sndMessage

public void sndMessage(Message msg)
                throws java.io.IOException
Called by container just before a new ACR or ACA message has been sent out. The current session state is updated accordingly.

Overrides:
sndMessage in class Session
Parameters:
msg - the ACR/ACA message being sent out
Throws:
java.io.IOException - if the message could not be sent
java.lang.IllegalStateException - if the session has been terminated, a request is already pending, or a request is out of sequence (invalid record number)

Documentation is available at
http://e-docs.bea.com/wlcp/wlss40/
Copyright 2008 Oracle Corp.