org.mobicents.slee.resource.diameter.ro
Class RoServerSessionActivityImpl

java.lang.Object
  extended by org.mobicents.slee.resource.diameter.base.DiameterActivityImpl
      extended by org.mobicents.slee.resource.diameter.ro.RoSessionActivityImpl
          extended by org.mobicents.slee.resource.diameter.ro.RoServerSessionActivityImpl
All Implemented Interfaces:
java.io.Serializable, net.java.slee.resource.diameter.base.DiameterActivity, RoServerSessionActivity, RoSessionActivity, org.jdiameter.api.app.StateChangeListener<org.jdiameter.api.app.AppSession>

public class RoServerSessionActivityImpl
extends RoSessionActivityImpl
implements RoServerSessionActivity, org.jdiameter.api.app.StateChangeListener<org.jdiameter.api.app.AppSession>

Implementation of RoServerSessionActivity.

Author:
Alexandre Mendonca
See Also:
Serialized Form

Field Summary
protected  RoCreditControlRequest lastRequest
           
protected  org.jdiameter.api.ro.ServerRoSession session
           
 
Fields inherited from class org.mobicents.slee.resource.diameter.ro.RoSessionActivityImpl
roMessageFactory
 
Fields inherited from class org.mobicents.slee.resource.diameter.base.DiameterActivityImpl
avpFactory, baseListener, destinationHost, destinationRealm, eventListener, handle, messageFactory, sessionId, terminateAfterProcessing
 
Constructor Summary
RoServerSessionActivityImpl(net.java.slee.resource.diameter.base.DiameterMessageFactory messageFactory, net.java.slee.resource.diameter.base.DiameterAvpFactory avpFactory, org.jdiameter.api.ro.ServerRoSession session, net.java.slee.resource.diameter.base.events.avp.DiameterIdentity destinationHost, net.java.slee.resource.diameter.base.events.avp.DiameterIdentity destinationRealm, org.jdiameter.api.Stack stack)
           
 
Method Summary
 RoCreditControlAnswer createRoCreditControlAnswer()
          Create a Ro-specific Credit-Control-Answer message pre-populated with the AVPs appropriate for this session.
 void endActivity()
           
 void fetchCurrentState(RoCreditControlAnswer cca)
           
 void fetchCurrentState(RoCreditControlRequest ccr)
           
 org.jdiameter.api.ro.ServerRoSession getSession()
           
 RoSessionState getState()
          Provides session state information.
 void sendReAuthRequest(net.java.slee.resource.diameter.base.events.ReAuthRequest rar)
           
 void sendRoCreditControlAnswer(RoCreditControlAnswer cca)
          Sends a Credit-Control-Answer message to the peer.
 void setSession(org.jdiameter.api.ro.ServerRoSession session2)
           
 void stateChanged(org.jdiameter.api.app.AppSession source, java.lang.Enum oldState, java.lang.Enum newState)
           
 void stateChanged(java.lang.Enum oldState, java.lang.Enum newState)
           
 java.lang.String toString()
           
 
Methods inherited from class org.mobicents.slee.resource.diameter.ro.RoSessionActivityImpl
getRoMessageFactory, sendSyncMessage, setDestinationHost, setDestinationRealm, setRoMessageFactory
 
Methods inherited from class org.mobicents.slee.resource.diameter.base.DiameterActivityImpl
doSendMessage, equals, getActivityHandle, getDiameterAvpFactory, getDiameterMessageFactory, getSessionId, getSessionListener, hashCode, isTerminateAfterProcessing, isValid, sendMessage, setAvpFactory, setCurrentWorkingSession, setEventListener, setMessageFactory, setSessionListener, setTerminateAfterProcessing
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.java.slee.resource.diameter.ro.RoSessionActivity
getRoMessageFactory, getSessionId
 
Methods inherited from interface net.java.slee.resource.diameter.base.DiameterActivity
getDiameterAvpFactory, getDiameterMessageFactory, sendMessage
 

Field Detail

session

protected transient org.jdiameter.api.ro.ServerRoSession session

lastRequest

protected transient RoCreditControlRequest lastRequest
Constructor Detail

RoServerSessionActivityImpl

public RoServerSessionActivityImpl(net.java.slee.resource.diameter.base.DiameterMessageFactory messageFactory,
                                   net.java.slee.resource.diameter.base.DiameterAvpFactory avpFactory,
                                   org.jdiameter.api.ro.ServerRoSession session,
                                   net.java.slee.resource.diameter.base.events.avp.DiameterIdentity destinationHost,
                                   net.java.slee.resource.diameter.base.events.avp.DiameterIdentity destinationRealm,
                                   org.jdiameter.api.Stack stack)
Method Detail

createRoCreditControlAnswer

public RoCreditControlAnswer createRoCreditControlAnswer()
Description copied from interface: RoServerSessionActivity
Create a Ro-specific Credit-Control-Answer message pre-populated with the AVPs appropriate for this session.

Specified by:
createRoCreditControlAnswer in interface RoServerSessionActivity
Returns:
a new CreditControlAnswer

sendRoCreditControlAnswer

public void sendRoCreditControlAnswer(RoCreditControlAnswer cca)
                               throws java.io.IOException
Description copied from interface: RoServerSessionActivity
Sends a Credit-Control-Answer message to the peer.

Specified by:
sendRoCreditControlAnswer in interface RoServerSessionActivity
Parameters:
cca - the CreditControlAnswer to send
Throws:
java.io.IOException - if an error occured sending the request to the peer

sendReAuthRequest

public void sendReAuthRequest(net.java.slee.resource.diameter.base.events.ReAuthRequest rar)
                       throws java.io.IOException
Specified by:
sendReAuthRequest in interface RoServerSessionActivity
Throws:
java.io.IOException

stateChanged

public void stateChanged(org.jdiameter.api.app.AppSession source,
                         java.lang.Enum oldState,
                         java.lang.Enum newState)
Specified by:
stateChanged in interface org.jdiameter.api.app.StateChangeListener<org.jdiameter.api.app.AppSession>

stateChanged

public void stateChanged(java.lang.Enum oldState,
                         java.lang.Enum newState)
Specified by:
stateChanged in interface org.jdiameter.api.app.StateChangeListener<org.jdiameter.api.app.AppSession>

fetchCurrentState

public void fetchCurrentState(RoCreditControlRequest ccr)

fetchCurrentState

public void fetchCurrentState(RoCreditControlAnswer cca)

getSession

public org.jdiameter.api.ro.ServerRoSession getSession()

setSession

public void setSession(org.jdiameter.api.ro.ServerRoSession session2)

getState

public RoSessionState getState()
Description copied from interface: RoSessionActivity
Provides session state information. CC session must conform to CC FSM as described in section 7 of rfc4006

Specified by:
getState in interface RoSessionActivity
Returns:
instance of CreditControlSessionState

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

endActivity

public void endActivity()
Specified by:
endActivity in interface net.java.slee.resource.diameter.base.DiameterActivity
Overrides:
endActivity in class org.mobicents.slee.resource.diameter.base.DiameterActivityImpl


Copyright © 2011. All Rights Reserved.