org.mobicents.slee.training.example6
Class BounceSbb

java.lang.Object
  extended by org.mobicents.slee.training.example6.CommonSbb
      extended by org.mobicents.slee.training.example6.BounceSbb
All Implemented Interfaces:
javax.slee.Sbb

public abstract class BounceSbb
extends CommonSbb

BounceSbb is a Sbb representing a message bounce service. BounceSbb receives incoming MessageEvents from the underlying resource adaptor. According to the messages, it increases counter in the related activity. If the command "ANY" is received by the Sbb, BounceSbb sends a message back to the originator.

Author:
amit bhayani

Constructor Summary
BounceSbb()
          Creates a new instance of BounceSbb
 
Method Summary
abstract  BounceSbbUsage getDefaultSbbUsageParameterSet()
           
abstract  long getLastTimeAnyMessageReceived()
           
 void onAnyEvent(org.mobicents.slee.resource.lab.message.MessageEvent event, javax.slee.ActivityContextInterface ac)
          EventHandler method for incoming events of type "AnyEvent".
 void onEndEvent(org.mobicents.slee.resource.lab.message.MessageEvent event, javax.slee.ActivityContextInterface ac)
          EventHandler method for incoming events of type "EndEvent".
 void onInitEvent(org.mobicents.slee.resource.lab.message.MessageEvent event, javax.slee.ActivityContextInterface ac)
          EventHandler method for incoming events of type "InitEvent".
 void sbbPostCreate()
          implements javax.slee.Sbb Please refer to JSLEE v1.1 Specification, Early Draft Review Page 55 for further information.
abstract  void setLastTimeAnyMessageReceived(long time)
           
 
Methods inherited from class org.mobicents.slee.training.example6.CommonSbb
getMessageResourceAdaptorSbbInterface, getSbbContext, sbbActivate, sbbCreate, sbbExceptionThrown, sbbLoad, sbbPassivate, sbbRemove, sbbRolledBack, sbbStore, setSbbContext, unsetSbbContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BounceSbb

public BounceSbb()
Creates a new instance of BounceSbb

Method Detail

sbbPostCreate

public void sbbPostCreate()
                   throws javax.slee.CreateException
Description copied from class: CommonSbb
implements javax.slee.Sbb Please refer to JSLEE v1.1 Specification, Early Draft Review Page 55 for further information.
The SLEE invokes this method on an SBB object after the SLEE creates a new SBB entity. The SLEE invokes this method after the persistent representation of the SBB entity has been created and the SBB object is assigned to the created SBB entity. This method gives the SBB object a chance to initialize additional transient state and acquire additional resources that it needs while it is in the Ready state.
This method is the second part of a transition from state "POOLED" to "READY" (see page 52)

Specified by:
sbbPostCreate in interface javax.slee.Sbb
Overrides:
sbbPostCreate in class CommonSbb
Throws:
javax.slee.CreateException

onAnyEvent

public void onAnyEvent(org.mobicents.slee.resource.lab.message.MessageEvent event,
                       javax.slee.ActivityContextInterface ac)
EventHandler method for incoming events of type "AnyEvent". AnyEvent is defined in the deployment descriptor "sbb-jar.xml". This method is invoked by the SLEE if an event of type ANY is received and fired by the resource adaptor.


onEndEvent

public void onEndEvent(org.mobicents.slee.resource.lab.message.MessageEvent event,
                       javax.slee.ActivityContextInterface ac)
EventHandler method for incoming events of type "EndEvent". EndEvent is defined in the deployment descriptor "sbb-jar.xml". This method is invoked by the SLEE if an event of type END is received and fired by the resource adaptor.


onInitEvent

public void onInitEvent(org.mobicents.slee.resource.lab.message.MessageEvent event,
                        javax.slee.ActivityContextInterface ac)
EventHandler method for incoming events of type "InitEvent". InitEvent is defined in the deployment descriptor "sbb-jar.xml". This method is invoked by the SLEE if an event of type INIT is received and fired by the resource adaptor.


getDefaultSbbUsageParameterSet

public abstract BounceSbbUsage getDefaultSbbUsageParameterSet()

getLastTimeAnyMessageReceived

public abstract long getLastTimeAnyMessageReceived()

setLastTimeAnyMessageReceived

public abstract void setLastTimeAnyMessageReceived(long time)


Copyright © 2008. All Rights Reserved.