org.jdiameter.server.impl.app.acc
Class ServerAccSessionImpl

java.lang.Object
  extended by org.jdiameter.common.impl.app.AppSessionImpl
      extended by org.jdiameter.common.impl.app.acc.AppAccSessionImpl
          extended by org.jdiameter.server.impl.app.acc.ServerAccSessionImpl
All Implemented Interfaces:
java.io.Serializable, org.jdiameter.api.acc.ServerAccSession, org.jdiameter.api.app.AppSession, org.jdiameter.api.app.StateMachine, org.jdiameter.api.NetworkReqListener

public class ServerAccSessionImpl
extends AppAccSessionImpl
implements org.jdiameter.api.acc.ServerAccSession, org.jdiameter.api.NetworkReqListener

See Also:
Serialized Form

Field Summary
protected  IServerAccActionContext context
           
protected  org.jdiameter.api.acc.ServerAccSessionListener listener
           
protected  ServerAccSessionState state
           
protected  boolean stateless
           
protected  java.util.concurrent.ScheduledFuture tsTask
           
protected  long tsTimeout
           
 
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
ServerAccSessionImpl(org.jdiameter.api.Session session, org.jdiameter.api.Request initialRequest, org.jdiameter.api.acc.ServerAccSessionListener listener, long tsTimeout, boolean stateless, org.jdiameter.api.app.StateChangeListener... scListeners)
           
 
Method Summary
protected  org.jdiameter.api.Answer createEventAnswer(org.jdiameter.api.Request request)
           
protected  org.jdiameter.api.Answer createInterimAnswer(org.jdiameter.api.Request request)
           
protected  org.jdiameter.api.Answer createStartAnswer(org.jdiameter.api.Request request)
           
protected  org.jdiameter.api.Answer createStopAnswer(org.jdiameter.api.Request request)
           
<E> E
getState(java.lang.Class<E> eClass)
           
 boolean handleEvent(org.jdiameter.api.app.StateEvent event)
           
 boolean handleEventForStatefullMode(org.jdiameter.api.app.StateEvent event)
           
 boolean handleEventForStatelesMode(org.jdiameter.api.app.StateEvent event)
           
 boolean isStateless()
           
 org.jdiameter.api.Answer processRequest(org.jdiameter.api.Request request)
           
 void sendAccountAnswer(org.jdiameter.api.acc.events.AccountAnswer accountAnswer)
           
protected  void setState(IAppSessionState newState)
           
 
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

state

protected ServerAccSessionState state

context

protected IServerAccActionContext context

tsTimeout

protected long tsTimeout

tsTask

protected java.util.concurrent.ScheduledFuture tsTask

listener

protected org.jdiameter.api.acc.ServerAccSessionListener listener

stateless

protected boolean stateless
Constructor Detail

ServerAccSessionImpl

public ServerAccSessionImpl(org.jdiameter.api.Session session,
                            org.jdiameter.api.Request initialRequest,
                            org.jdiameter.api.acc.ServerAccSessionListener listener,
                            long tsTimeout,
                            boolean stateless,
                            org.jdiameter.api.app.StateChangeListener... scListeners)
Method Detail

sendAccountAnswer

public void sendAccountAnswer(org.jdiameter.api.acc.events.AccountAnswer accountAnswer)
                       throws org.jdiameter.api.InternalException,
                              java.lang.IllegalStateException,
                              org.jdiameter.api.RouteException,
                              org.jdiameter.api.OverloadException
Specified by:
sendAccountAnswer in interface org.jdiameter.api.acc.ServerAccSession
Throws:
org.jdiameter.api.InternalException
java.lang.IllegalStateException
org.jdiameter.api.RouteException
org.jdiameter.api.OverloadException

isStateless

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

setState

protected void setState(IAppSessionState newState)

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

handleEventForStatelesMode

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

handleEventForStatefullMode

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

createStopAnswer

protected org.jdiameter.api.Answer createStopAnswer(org.jdiameter.api.Request request)

createInterimAnswer

protected org.jdiameter.api.Answer createInterimAnswer(org.jdiameter.api.Request request)

createEventAnswer

protected org.jdiameter.api.Answer createEventAnswer(org.jdiameter.api.Request request)

createStartAnswer

protected org.jdiameter.api.Answer createStartAnswer(org.jdiameter.api.Request request)

getState

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

processRequest

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


Copyright © 2008. All Rights Reserved.