org.jdiameter.server.impl.app.cca
Class ServerCCASessionImpl

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

public class ServerCCASessionImpl
extends AppCCASessionImpl
implements org.jdiameter.api.cca.ServerCCASession, 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  IServerCCASessionContext context
           
protected  ICCAMessageFactory factory
           
protected  org.jdiameter.api.cca.ServerCCASessionListener listener
           
protected  java.lang.String originHost
           
protected  java.lang.String originRealm
           
protected  java.util.concurrent.locks.Lock sendAndStateLock
           
protected  ServerCCASessionState state
           
protected  boolean stateless
           
protected  java.util.concurrent.ScheduledFuture tccFuture
           
 
Fields inherited from class org.jdiameter.common.impl.app.cca.AppCCASessionImpl
logger, scheduler, stateListeners
 
Fields inherited from class org.jdiameter.common.impl.app.AppSessionImpl
appId, session
 
Constructor Summary
ServerCCASessionImpl(ICCAMessageFactory fct, org.jdiameter.api.SessionFactory sf, org.jdiameter.api.cca.ServerCCASessionListener lst)
           
ServerCCASessionImpl(java.lang.String sessionId, ICCAMessageFactory fct, org.jdiameter.api.SessionFactory sf, org.jdiameter.api.cca.ServerCCASessionListener lst)
           
 
Method Summary
protected  void dispatchEvent(org.jdiameter.api.app.AppEvent event)
           
<E> E
getState(java.lang.Class<E> stateType)
           
 boolean handleEvent(org.jdiameter.api.app.StateEvent event)
           
protected  boolean isProvisional(long unsigned32)
           
 boolean isStateless()
           
protected  boolean isSuccess(long code)
           
 org.jdiameter.api.Answer processRequest(org.jdiameter.api.Request request)
           
 void receivedSuccessMessage(org.jdiameter.api.Request request, org.jdiameter.api.Answer answer)
           
 void release()
           
protected  void send(Event.Type type, org.jdiameter.api.app.AppRequestEvent request, org.jdiameter.api.app.AppAnswerEvent answer)
           
 void sendCreditControlAnswer(org.jdiameter.api.cca.events.JCreditControlAnswer answer)
           
 void sendReAuthRequest(org.jdiameter.api.auth.events.ReAuthRequest request)
           
protected  void setState(ServerCCASessionState newState)
           
protected  void setState(ServerCCASessionState newState, boolean release)
           
 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

state

protected ServerCCASessionState 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.ServerCCASessionListener listener

context

protected IServerCCASessionContext context

tccFuture

protected java.util.concurrent.ScheduledFuture tccFuture
Constructor Detail

ServerCCASessionImpl

public ServerCCASessionImpl(ICCAMessageFactory fct,
                            org.jdiameter.api.SessionFactory sf,
                            org.jdiameter.api.cca.ServerCCASessionListener lst)

ServerCCASessionImpl

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

sendCreditControlAnswer

public void sendCreditControlAnswer(org.jdiameter.api.cca.events.JCreditControlAnswer answer)
                             throws org.jdiameter.api.InternalException,
                                    org.jdiameter.api.IllegalDiameterStateException,
                                    org.jdiameter.api.RouteException,
                                    org.jdiameter.api.OverloadException
Specified by:
sendCreditControlAnswer in interface org.jdiameter.api.cca.ServerCCASession
Throws:
org.jdiameter.api.InternalException
org.jdiameter.api.IllegalDiameterStateException
org.jdiameter.api.RouteException
org.jdiameter.api.OverloadException

sendReAuthRequest

public void sendReAuthRequest(org.jdiameter.api.auth.events.ReAuthRequest request)
                       throws org.jdiameter.api.InternalException,
                              org.jdiameter.api.IllegalDiameterStateException,
                              org.jdiameter.api.RouteException,
                              org.jdiameter.api.OverloadException
Specified by:
sendReAuthRequest in interface org.jdiameter.api.cca.ServerCCASession
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

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>

isProvisional

protected boolean isProvisional(long unsigned32)

isSuccess

protected boolean isSuccess(long code)

setState

protected void setState(ServerCCASessionState newState)

setState

protected void setState(ServerCCASessionState newState,
                        boolean release)

release

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

send

protected void send(Event.Type type,
                    org.jdiameter.api.app.AppRequestEvent request,
                    org.jdiameter.api.app.AppAnswerEvent answer)
             throws org.jdiameter.api.InternalException
Throws:
org.jdiameter.api.InternalException

dispatchEvent

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


Copyright © 2009. All Rights Reserved.