org.jdiameter.client.impl.app.cca
Class ClientCCASessionImpl

java.lang.Object
  extended by org.jdiameter.common.impl.app.AppSessionImpl
      extended by org.jdiameter.common.impl.app.cca.AppCCASessionImpl
          extended by org.jdiameter.client.impl.app.cca.ClientCCASessionImpl
All Implemented Interfaces:
java.io.Serializable, org.jdiameter.api.app.AppSession, org.jdiameter.api.app.StateMachine, org.jdiameter.api.cca.ClientCCASession, org.jdiameter.api.EventListener<org.jdiameter.api.Request,org.jdiameter.api.Answer>, org.jdiameter.api.NetworkReqListener

public class ClientCCASessionImpl
extends AppCCASessionImpl
implements org.jdiameter.api.cca.ClientCCASession, org.jdiameter.api.NetworkReqListener, org.jdiameter.api.EventListener<org.jdiameter.api.Request,org.jdiameter.api.Answer>

See Also:
Serialized Form

Field Summary
protected  long[] authAppIds
           
protected static int CCFH_CONTINUE
           
protected static int CCFH_RETRY_AND_TERMINATE
           
protected static int CCFH_TERMINATE
           
protected  IClientCCASessionContext context
           
protected static int DIAMETER_END_USER_SERVICE_DENIED
           
protected  java.util.ArrayList<Event> eventQueue
           
protected  ICCAMessageFactory factory
           
protected  int gatheredCCFH
           
protected  int gatheredDDFH
           
protected  int gatheredRequestedAction
           
protected  org.jdiameter.api.cca.ClientCCASessionListener listener
           
protected  java.lang.String originHost
           
protected  java.lang.String originRealm
           
protected  java.util.concurrent.locks.Lock sendAndStateLock
           
protected  ClientCCASessionState state
           
protected  boolean stateless
           
protected  boolean statelessModeSet
           
protected static java.util.Set<java.lang.Integer> temporaryErrorCodes
           
protected  java.util.concurrent.ScheduledFuture txFuture
           
 
Fields inherited from class org.jdiameter.common.impl.app.cca.AppCCASessionImpl
logger, scheduler, sf, stateListeners
 
Fields inherited from class org.jdiameter.common.impl.app.AppSessionImpl
appId, session
 
Constructor Summary
ClientCCASessionImpl(ICCAMessageFactory fct, org.jdiameter.api.SessionFactory sf, org.jdiameter.api.cca.ClientCCASessionListener lst)
           
ClientCCASessionImpl(java.lang.String sessionId, ICCAMessageFactory fct, org.jdiameter.api.SessionFactory sf, org.jdiameter.api.cca.ClientCCASessionListener lst)
           
 
Method Summary
protected  void deliverCCAnswer(org.jdiameter.api.cca.events.JCreditControlRequest request, org.jdiameter.api.cca.events.JCreditControlAnswer answer)
           
protected  void deliverRAR(org.jdiameter.api.auth.events.ReAuthRequest request)
           
protected  void dispatchEvent(org.jdiameter.api.app.AppEvent event)
           
protected  void doEndChecks()
          This makes checks on queue, moves it to proper state if event there is present on Open state ;]
protected  void extractFHAVPs(org.jdiameter.api.cca.events.JCreditControlRequest request, org.jdiameter.api.cca.events.JCreditControlAnswer answer)
           
protected  int getLocalCCFH()
           
protected  int getLocalDDFH()
           
<E> E
getState(java.lang.Class<E> stateType)
           
 boolean handleEvent(org.jdiameter.api.app.StateEvent event)
           
protected  boolean handleEventForEventBased(org.jdiameter.api.app.StateEvent event)
           
protected  boolean handleEventForSessionBased(org.jdiameter.api.app.StateEvent event)
           
protected  void handleFailureMessage(org.jdiameter.api.cca.events.JCreditControlAnswer event, org.jdiameter.api.cca.events.JCreditControlRequest request, Event.Type eventType)
           
protected  void handleSendFailure(java.lang.Exception e, Event.Type eventType, org.jdiameter.api.Message request)
           
protected  void handleTxExpires(org.jdiameter.api.Message m)
           
protected  boolean isFailure(long code)
           
protected  boolean isProvisional(long resultCode)
           
 boolean isStateless()
           
protected  boolean isSuccess(long resultCode)
           
 org.jdiameter.api.Answer processRequest(org.jdiameter.api.Request request)
           
 void receivedSuccessMessage(org.jdiameter.api.Request request, org.jdiameter.api.Answer answer)
           
 void release()
           
 void sendCreditControlRequest(org.jdiameter.api.cca.events.JCreditControlRequest request)
           
 void sendReAuthAnswer(org.jdiameter.api.auth.events.ReAuthAnswer answer)
           
protected  void setState(ClientCCASessionState newState)
           
protected  void setState(ClientCCASessionState newState, boolean release)
           
protected  void startTx(org.jdiameter.api.cca.events.JCreditControlRequest request)
           
protected  void stopTx()
           
 void timeoutExpired(org.jdiameter.api.Request request)
           
 
Methods inherited from class org.jdiameter.common.impl.app.cca.AppCCASessionImpl
addStateChangeNotification, 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
 
Methods inherited from interface org.jdiameter.api.app.StateMachine
addStateChangeNotification, removeStateChangeNotification
 

Field Detail

stateless

protected boolean stateless

statelessModeSet

protected boolean statelessModeSet

state

protected ClientCCASessionState state

factory

protected ICCAMessageFactory factory

originHost

protected java.lang.String originHost

originRealm

protected java.lang.String originRealm

sendAndStateLock

protected java.util.concurrent.locks.Lock sendAndStateLock

authAppIds

protected long[] authAppIds

listener

protected org.jdiameter.api.cca.ClientCCASessionListener listener

context

protected IClientCCASessionContext context

txFuture

protected java.util.concurrent.ScheduledFuture txFuture

temporaryErrorCodes

protected static final java.util.Set<java.lang.Integer> temporaryErrorCodes

gatheredCCFH

protected int gatheredCCFH

gatheredDDFH

protected int gatheredDDFH

gatheredRequestedAction

protected int gatheredRequestedAction

CCFH_TERMINATE

protected static final int CCFH_TERMINATE
See Also:
Constant Field Values

CCFH_CONTINUE

protected static final int CCFH_CONTINUE
See Also:
Constant Field Values

CCFH_RETRY_AND_TERMINATE

protected static final int CCFH_RETRY_AND_TERMINATE
See Also:
Constant Field Values

DIAMETER_END_USER_SERVICE_DENIED

protected static final int DIAMETER_END_USER_SERVICE_DENIED
See Also:
Constant Field Values

eventQueue

protected java.util.ArrayList<Event> eventQueue
Constructor Detail

ClientCCASessionImpl

public ClientCCASessionImpl(ICCAMessageFactory fct,
                            org.jdiameter.api.SessionFactory sf,
                            org.jdiameter.api.cca.ClientCCASessionListener lst)

ClientCCASessionImpl

public ClientCCASessionImpl(java.lang.String sessionId,
                            ICCAMessageFactory fct,
                            org.jdiameter.api.SessionFactory sf,
                            org.jdiameter.api.cca.ClientCCASessionListener lst)
Method Detail

getLocalCCFH

protected int getLocalCCFH()

getLocalDDFH

protected int getLocalDDFH()

sendCreditControlRequest

public void sendCreditControlRequest(org.jdiameter.api.cca.events.JCreditControlRequest request)
                              throws org.jdiameter.api.InternalException,
                                     org.jdiameter.api.IllegalDiameterStateException,
                                     org.jdiameter.api.RouteException,
                                     org.jdiameter.api.OverloadException
Specified by:
sendCreditControlRequest in interface org.jdiameter.api.cca.ClientCCASession
Throws:
org.jdiameter.api.InternalException
org.jdiameter.api.IllegalDiameterStateException
org.jdiameter.api.RouteException
org.jdiameter.api.OverloadException

sendReAuthAnswer

public void sendReAuthAnswer(org.jdiameter.api.auth.events.ReAuthAnswer answer)
                      throws org.jdiameter.api.InternalException,
                             org.jdiameter.api.IllegalDiameterStateException,
                             org.jdiameter.api.RouteException,
                             org.jdiameter.api.OverloadException
Specified by:
sendReAuthAnswer in interface org.jdiameter.api.cca.ClientCCASession
Throws:
org.jdiameter.api.InternalException
org.jdiameter.api.IllegalDiameterStateException
org.jdiameter.api.RouteException
org.jdiameter.api.OverloadException

isStateless

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

getState

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

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

handleEventForEventBased

protected boolean handleEventForEventBased(org.jdiameter.api.app.StateEvent event)
                                    throws org.jdiameter.api.InternalException,
                                           org.jdiameter.api.OverloadException
Throws:
org.jdiameter.api.InternalException
org.jdiameter.api.OverloadException

handleEventForSessionBased

protected boolean handleEventForSessionBased(org.jdiameter.api.app.StateEvent event)
                                      throws org.jdiameter.api.InternalException,
                                             org.jdiameter.api.OverloadException
Throws:
org.jdiameter.api.InternalException
org.jdiameter.api.OverloadException

processRequest

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

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>

startTx

protected void startTx(org.jdiameter.api.cca.events.JCreditControlRequest request)

stopTx

protected void stopTx()

setState

protected void setState(ClientCCASessionState newState)

setState

protected void setState(ClientCCASessionState newState,
                        boolean release)

release

public void release()
Specified by:
release in interface org.jdiameter.api.app.AppSession
Overrides:
release in class AppCCASessionImpl

handleSendFailure

protected void handleSendFailure(java.lang.Exception e,
                                 Event.Type eventType,
                                 org.jdiameter.api.Message request)
                          throws java.lang.Exception
Throws:
java.lang.Exception

handleFailureMessage

protected void handleFailureMessage(org.jdiameter.api.cca.events.JCreditControlAnswer event,
                                    org.jdiameter.api.cca.events.JCreditControlRequest request,
                                    Event.Type eventType)

handleTxExpires

protected void handleTxExpires(org.jdiameter.api.Message m)

doEndChecks

protected void doEndChecks()
This makes checks on queue, moves it to proper state if event there is present on Open state ;]


deliverCCAnswer

protected void deliverCCAnswer(org.jdiameter.api.cca.events.JCreditControlRequest request,
                               org.jdiameter.api.cca.events.JCreditControlAnswer answer)

extractFHAVPs

protected void extractFHAVPs(org.jdiameter.api.cca.events.JCreditControlRequest request,
                             org.jdiameter.api.cca.events.JCreditControlAnswer answer)

deliverRAR

protected void deliverRAR(org.jdiameter.api.auth.events.ReAuthRequest request)

dispatchEvent

protected void dispatchEvent(org.jdiameter.api.app.AppEvent event)
                      throws org.jdiameter.api.InternalException,
                             org.jdiameter.api.IllegalDiameterStateException,
                             org.jdiameter.api.RouteException,
                             org.jdiameter.api.OverloadException
Throws:
org.jdiameter.api.InternalException
org.jdiameter.api.IllegalDiameterStateException
org.jdiameter.api.RouteException
org.jdiameter.api.OverloadException

isProvisional

protected boolean isProvisional(long resultCode)

isSuccess

protected boolean isSuccess(long resultCode)

isFailure

protected boolean isFailure(long code)


Copyright © 2010. All Rights Reserved.