org.mobicents.slee.resource.diameter.sh.client
Class ShClientSubscriptionActivityImpl

java.lang.Object
  extended by org.mobicents.slee.resource.diameter.base.DiameterActivityImpl
      extended by org.mobicents.slee.resource.diameter.sh.client.ShClientSubscriptionActivityImpl
All Implemented Interfaces:
java.io.Serializable, net.java.slee.resource.diameter.base.DiameterActivity, ShClientSubscriptionActivity, org.jdiameter.api.app.StateChangeListener<org.jdiameter.api.app.AppSession>

public class ShClientSubscriptionActivityImpl
extends org.mobicents.slee.resource.diameter.base.DiameterActivityImpl
implements ShClientSubscriptionActivity, org.jdiameter.api.app.StateChangeListener<org.jdiameter.api.app.AppSession>

Sh Client activity created for subscription cases

Author:
Bartosz Baranowski , Alexandre Mendonca
See Also:
ShClientSubscriptionActivity, Serialized Form

Field Summary
protected  net.java.slee.resource.diameter.base.events.avp.AuthSessionStateType authSessionState
           
protected  org.jdiameter.api.sh.ClientShSession clientSession
           
protected  DataReferenceType[] dataReferenceType
           
protected  ShClientMessageFactory messageFactory
           
protected  net.java.slee.resource.diameter.base.events.avp.DiameterIdentity remoteRealm
           
protected  DiameterShAvpFactory shAvpFactory
           
protected  java.util.ArrayList<org.mobicents.slee.resource.diameter.base.events.DiameterMessageImpl> stateMessages
           
protected  UserIdentityAvp userIdentity
           
 
Fields inherited from class org.mobicents.slee.resource.diameter.base.DiameterActivityImpl
avpFactory, baseListener, destinationHost, destinationRealm, eventListener, handle, logger, session, sessionId, terminateAfterProcessing
 
Constructor Summary
ShClientSubscriptionActivityImpl(ShClientMessageFactory shClientMessageFactory, DiameterShAvpFactory shAvpFactory, org.jdiameter.api.sh.ClientShSession session, net.java.slee.resource.diameter.base.events.avp.DiameterIdentity destinationHost, net.java.slee.resource.diameter.base.events.avp.DiameterIdentity destinationRealm)
           
 
Method Summary
 PushNotificationAnswer createPushNotificationAnswer()
           
 PushNotificationAnswer createPushNotificationAnswer(long resultCode, boolean isExperimental)
           
 void endActivity()
           
 void fetchSessionData(net.java.slee.resource.diameter.base.events.DiameterMessage msg, boolean incoming)
           
 DiameterShAvpFactory getClientAvpFactory()
           
 ShClientMessageFactory getClientMessageFactory()
           
 UserIdentityAvp getSubscribedUserIdentity()
           
 void sendPushNotificationAnswer(long resultCode, boolean isExperimentalResultCode)
           
 void sendPushNotificationAnswer(PushNotificationAnswer answer)
           
 void sendSubscribeNotificationsRequest(SubscribeNotificationsRequest request)
           
 void sendUnsubscribeRequest()
           
 void setClientAvpFactory(DiameterShAvpFactory shAvpFactory)
           
 void setClientMessageFactory(ShClientMessageFactory messageFactory)
           
 void setSession(org.jdiameter.api.sh.ClientShSession session)
           
 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)
           
 
Methods inherited from class org.mobicents.slee.resource.diameter.base.DiameterActivityImpl
doSendMessage, equals, getActivityHandle, getDiameterAvpFactory, getDiameterMessageFactory, getSessionId, getSessionListener, hashCode, isTerminateAfterProcessing, isValid, sendMessage, sendSyncMessage, setAvpFactory, setCurrentWorkingSession, setEventListener, setMessageFactory, setSessionListener, setTerminateAfterProcessing
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.java.slee.resource.diameter.base.DiameterActivity
getDiameterAvpFactory, getDiameterMessageFactory, getSessionId, sendMessage
 

Field Detail

clientSession

protected transient org.jdiameter.api.sh.ClientShSession clientSession

shAvpFactory

protected transient DiameterShAvpFactory shAvpFactory

messageFactory

protected transient ShClientMessageFactory messageFactory

userIdentity

protected UserIdentityAvp userIdentity

dataReferenceType

protected DataReferenceType[] dataReferenceType

authSessionState

protected net.java.slee.resource.diameter.base.events.avp.AuthSessionStateType authSessionState

remoteRealm

protected net.java.slee.resource.diameter.base.events.avp.DiameterIdentity remoteRealm

stateMessages

protected transient java.util.ArrayList<org.mobicents.slee.resource.diameter.base.events.DiameterMessageImpl> stateMessages
Constructor Detail

ShClientSubscriptionActivityImpl

public ShClientSubscriptionActivityImpl(ShClientMessageFactory shClientMessageFactory,
                                        DiameterShAvpFactory shAvpFactory,
                                        org.jdiameter.api.sh.ClientShSession session,
                                        net.java.slee.resource.diameter.base.events.avp.DiameterIdentity destinationHost,
                                        net.java.slee.resource.diameter.base.events.avp.DiameterIdentity destinationRealm)
Method Detail

setSession

public void setSession(org.jdiameter.api.sh.ClientShSession session)

getClientMessageFactory

public ShClientMessageFactory getClientMessageFactory()
Specified by:
getClientMessageFactory in interface ShClientSubscriptionActivity

getClientAvpFactory

public DiameterShAvpFactory getClientAvpFactory()
Specified by:
getClientAvpFactory in interface ShClientSubscriptionActivity

setClientMessageFactory

public void setClientMessageFactory(ShClientMessageFactory messageFactory)

setClientAvpFactory

public void setClientAvpFactory(DiameterShAvpFactory shAvpFactory)

getSubscribedUserIdentity

public UserIdentityAvp getSubscribedUserIdentity()
Specified by:
getSubscribedUserIdentity in interface ShClientSubscriptionActivity

createPushNotificationAnswer

public PushNotificationAnswer createPushNotificationAnswer()
Specified by:
createPushNotificationAnswer in interface ShClientSubscriptionActivity

createPushNotificationAnswer

public PushNotificationAnswer createPushNotificationAnswer(long resultCode,
                                                           boolean isExperimental)
Specified by:
createPushNotificationAnswer in interface ShClientSubscriptionActivity

sendPushNotificationAnswer

public void sendPushNotificationAnswer(PushNotificationAnswer answer)
                                throws java.io.IOException
Specified by:
sendPushNotificationAnswer in interface ShClientSubscriptionActivity
Throws:
java.io.IOException

sendPushNotificationAnswer

public void sendPushNotificationAnswer(long resultCode,
                                       boolean isExperimentalResultCode)
                                throws java.io.IOException
Specified by:
sendPushNotificationAnswer in interface ShClientSubscriptionActivity
Throws:
java.io.IOException

sendSubscribeNotificationsRequest

public void sendSubscribeNotificationsRequest(SubscribeNotificationsRequest request)
                                       throws java.io.IOException
Specified by:
sendSubscribeNotificationsRequest in interface ShClientSubscriptionActivity
Throws:
java.io.IOException

sendUnsubscribeRequest

public void sendUnsubscribeRequest()
                            throws java.io.IOException
Specified by:
sendUnsubscribeRequest in interface ShClientSubscriptionActivity
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>

fetchSessionData

public void fetchSessionData(net.java.slee.resource.diameter.base.events.DiameterMessage msg,
                             boolean incoming)
Parameters:
request -

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 © 2012. All Rights Reserved.