org.mobicents.slee.training.example7
Class BounceSbb

java.lang.Object
  extended by org.mobicents.slee.training.example7.CommonSbb
      extended by org.mobicents.slee.training.example7.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. Event of type ANY is masked after every 15 seconds alternatively

Author:
amit bhayani

Constructor Summary
BounceSbb()
          Creates a new instance of BounceSbb
 
Method Summary
abstract  boolean getEventMasked()
           
abstract  javax.slee.facilities.TimerID getTimerID()
           
 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 onTimerEvent(javax.slee.facilities.TimerEvent event, javax.slee.ActivityContextInterface aci)
           
abstract  void setEventMasked(boolean eventMasked)
           
 void setSbbContext(javax.slee.SbbContext context)
          implements javax.slee.Sbb Please refer to JSLEE v1.1 Specification, Early Draft Review Page 54 for further information.
abstract  void setTimerID(javax.slee.facilities.TimerID value)
           
 
Methods inherited from class org.mobicents.slee.training.example7.CommonSbb
getMessageResourceAdaptorSbbInterface, getSbbContext, sbbActivate, sbbCreate, sbbExceptionThrown, sbbLoad, sbbPassivate, sbbPostCreate, sbbRemove, sbbRolledBack, sbbStore, 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

setSbbContext

public void setSbbContext(javax.slee.SbbContext context)
Description copied from class: CommonSbb
implements javax.slee.Sbb Please refer to JSLEE v1.1 Specification, Early Draft Review Page 54 for further information.
The SLEE invokes this method after a new instance of the SBB abstract class is created. During this method, an SBB entity has not been assigned to the SBB object. The SBB object can take advantage of this method to allocate and initialize state or connect to resources that are to be held by the SBB object during its lifetime. Such state and resources cannot be specific to an SBB entity because the SBB object might be reused during its lifetime to serve multiple SBB entities.
This method indicates a transition from state "DOES NOT EXIST" to "POOLED" (see page 52)

Specified by:
setSbbContext in interface javax.slee.Sbb
Overrides:
setSbbContext in class CommonSbb

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.


onTimerEvent

public void onTimerEvent(javax.slee.facilities.TimerEvent event,
                         javax.slee.ActivityContextInterface aci)

setTimerID

public abstract void setTimerID(javax.slee.facilities.TimerID value)

getTimerID

public abstract javax.slee.facilities.TimerID getTimerID()

setEventMasked

public abstract void setEventMasked(boolean eventMasked)

getEventMasked

public abstract boolean getEventMasked()


Copyright © 2009. All Rights Reserved.