org.jdiameter.client.impl.app.acc
Class ClientAccSessionImpl

java.lang.Object
  extended by org.jdiameter.common.impl.app.AppSessionImpl
      extended by org.jdiameter.common.impl.app.acc.AppAccSessionImpl
          extended by org.jdiameter.client.impl.app.acc.ClientAccSessionImpl
All Implemented Interfaces:
java.io.Serializable, org.jdiameter.api.acc.ClientAccSession, org.jdiameter.api.app.AppSession, org.jdiameter.api.app.StateMachine, org.jdiameter.api.EventListener<org.jdiameter.api.Request,org.jdiameter.api.Answer>, org.jdiameter.api.NetworkReqListener

public class ClientAccSessionImpl
extends AppAccSessionImpl
implements org.jdiameter.api.EventListener<org.jdiameter.api.Request,org.jdiameter.api.Answer>, org.jdiameter.api.acc.ClientAccSession

Client Accounting session implementation

See Also:
Serialized Form

Field Summary
protected  org.jdiameter.api.app.AppEvent buffer
           
protected  IClientAccActionContext context
           
static int DELIVER_AND_GRANT
           
protected  java.lang.String destHost
           
protected  java.lang.String destRealm
           
static int GRANT_AND_LOSE
           
protected  org.jdiameter.api.acc.ClientAccSessionListener listener
           
protected  ClientAccSessionState state
           
 
Fields inherited from class org.jdiameter.common.impl.app.acc.AppAccSessionImpl
scheduler, sendAndStateLock, stateListeners
 
Fields inherited from class org.jdiameter.common.impl.app.AppSessionImpl
appId, logger, session
 
Constructor Summary
ClientAccSessionImpl(org.jdiameter.api.SessionFactory sf, org.jdiameter.api.acc.ClientAccSessionListener lst, org.jdiameter.api.ApplicationId app)
           
ClientAccSessionImpl(org.jdiameter.api.SessionFactory sf, java.lang.String sessionId, org.jdiameter.api.acc.ClientAccSessionListener lst, org.jdiameter.api.ApplicationId app)
           
 
Method Summary
protected  boolean checkBufferSpace()
           
protected  org.jdiameter.api.Request createInterimRecord()
           
protected  org.jdiameter.api.Request createSessionTermRequest()
           
<E> E
getState(java.lang.Class<E> eClass)
           
 boolean handleEvent(org.jdiameter.api.app.StateEvent event)
           
 boolean isStateless()
           
protected  void processInterimIntervalAvp(org.jdiameter.api.app.StateEvent event)
           
 org.jdiameter.api.Answer processRequest(org.jdiameter.api.Request request)
           
 void receivedSuccessMessage(org.jdiameter.api.Request request, org.jdiameter.api.Answer answer)
           
 void sendAccountRequest(org.jdiameter.api.acc.events.AccountRequest accountRequest)
           
protected  void setState(IAppSessionState newState)
           
protected  void storeToBuffer(org.jdiameter.api.acc.events.AccountRequest accountRequest)
           
 void timeoutExpired(org.jdiameter.api.Request request)
           
 
Methods inherited from class org.jdiameter.common.impl.app.acc.AppAccSessionImpl
addStateChangeNotification, createAccountAnswer, createAccountRequest, release, removeStateChangeNotification
 
Methods inherited from class org.jdiameter.common.impl.app.AppSessionImpl
getCreationTime, getLastAccessedTime, getSessionAppId, getSessions, isValid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jdiameter.api.app.AppSession
getCreationTime, getLastAccessedTime, getSessionAppId, getSessions, isValid, release
 
Methods inherited from interface org.jdiameter.api.app.StateMachine
addStateChangeNotification, removeStateChangeNotification
 

Field Detail

DELIVER_AND_GRANT

public static final int DELIVER_AND_GRANT
See Also:
Constant Field Values

GRANT_AND_LOSE

public static final int GRANT_AND_LOSE
See Also:
Constant Field Values

state

protected ClientAccSessionState state

destHost

protected java.lang.String destHost

destRealm

protected java.lang.String destRealm

context

protected IClientAccActionContext context

buffer

protected org.jdiameter.api.app.AppEvent buffer

listener

protected org.jdiameter.api.acc.ClientAccSessionListener listener
Constructor Detail

ClientAccSessionImpl

public ClientAccSessionImpl(org.jdiameter.api.SessionFactory sf,
                            org.jdiameter.api.acc.ClientAccSessionListener lst,
                            org.jdiameter.api.ApplicationId app)

ClientAccSessionImpl

public ClientAccSessionImpl(org.jdiameter.api.SessionFactory sf,
                            java.lang.String sessionId,
                            org.jdiameter.api.acc.ClientAccSessionListener lst,
                            org.jdiameter.api.ApplicationId app)
Method Detail

sendAccountRequest

public void sendAccountRequest(org.jdiameter.api.acc.events.AccountRequest accountRequest)
                        throws org.jdiameter.api.InternalException,
                               java.lang.IllegalStateException,
                               org.jdiameter.api.RouteException,
                               org.jdiameter.api.OverloadException
Specified by:
sendAccountRequest in interface org.jdiameter.api.acc.ClientAccSession
Throws:
org.jdiameter.api.InternalException
java.lang.IllegalStateException
org.jdiameter.api.RouteException
org.jdiameter.api.OverloadException

storeToBuffer

protected void storeToBuffer(org.jdiameter.api.acc.events.AccountRequest accountRequest)

checkBufferSpace

protected boolean checkBufferSpace()

setState

protected void setState(IAppSessionState newState)

isStateless

public boolean isStateless()
Specified by:
isStateless in interface org.jdiameter.api.app.AppSession

handleEvent

public boolean handleEvent(org.jdiameter.api.app.StateEvent event)
                    throws org.jdiameter.api.InternalException,
                           org.jdiameter.api.OverloadException
Specified by:
handleEvent in interface org.jdiameter.api.app.StateMachine
Throws:
org.jdiameter.api.InternalException
org.jdiameter.api.OverloadException

processInterimIntervalAvp

protected void processInterimIntervalAvp(org.jdiameter.api.app.StateEvent event)
                                  throws org.jdiameter.api.InternalException
Throws:
org.jdiameter.api.InternalException

getState

public <E> E getState(java.lang.Class<E> eClass)
Specified by:
getState in interface org.jdiameter.api.app.StateMachine

receivedSuccessMessage

public void receivedSuccessMessage(org.jdiameter.api.Request request,
                                   org.jdiameter.api.Answer answer)
Specified by:
receivedSuccessMessage in interface org.jdiameter.api.EventListener<org.jdiameter.api.Request,org.jdiameter.api.Answer>

timeoutExpired

public void timeoutExpired(org.jdiameter.api.Request request)
Specified by:
timeoutExpired in interface org.jdiameter.api.EventListener<org.jdiameter.api.Request,org.jdiameter.api.Answer>

processRequest

public org.jdiameter.api.Answer processRequest(org.jdiameter.api.Request request)
Specified by:
processRequest in interface org.jdiameter.api.NetworkReqListener

createInterimRecord

protected org.jdiameter.api.Request createInterimRecord()

createSessionTermRequest

protected org.jdiameter.api.Request createSessionTermRequest()


Copyright © 2008. All Rights Reserved.