org.mobicents.slee.training.example1
Class CommonSbb

java.lang.Object
  extended by org.mobicents.slee.training.example1.CommonSbb
All Implemented Interfaces:
javax.slee.Sbb
Direct Known Subclasses:
BounceSbb

public abstract class CommonSbb
extends java.lang.Object
implements javax.slee.Sbb

CommonSbb is the base SBB for all the BounceSbb

Author:
amit bhayani

Constructor Summary
CommonSbb()
          Creates a new instance of BounceSbb
 
Method Summary
protected  org.mobicents.slee.resource.lab.ratype.MessageResourceAdaptorSbbInterface getMessageResourceAdaptorSbbInterface()
           
 void sbbActivate()
          implements javax.slee.Sbb Please refer to JSLEE v1.1 Specification, Early Draft Review Page 55 for further information.
 void sbbCreate()
          implements javax.slee.Sbb Please refer to JSLEE v1.1 Specification, Early Draft Review Page 55 for further information.
 void sbbExceptionThrown(java.lang.Exception exception, java.lang.Object obj, javax.slee.ActivityContextInterface activityContextInterface)
          implements javax.slee.Sbb Please refer to JSLEE v1.1 Specification, Early Draft Review Page 65 for further information.
 void sbbLoad()
          implements javax.slee.Sbb Please refer to JSLEE v1.1 Specification, Early Draft Review Page 56 for further information.
 void sbbPassivate()
          implements javax.slee.Sbb Please refer to JSLEE v1.1 Specification, Early Draft Review Page 56 for further information.
 void sbbPostCreate()
          implements javax.slee.Sbb Please refer to JSLEE v1.1 Specification, Early Draft Review Page 55 for further information.
 void sbbRemove()
          implements javax.slee.Sbb Please refer to JSLEE v1.1 Specification, Early Draft Review Page 56 for further information.
 void sbbRolledBack(javax.slee.RolledBackContext rolledBackContext)
          implements javax.slee.Sbb Please refer to JSLEE v1.1 Specification, Early Draft Review Page 67 for further information.
 void sbbStore()
          implements javax.slee.Sbb Please refer to JSLEE v1.1 Specification, Early Draft Review Page 57 for further information.
 void setSbbContext(javax.slee.SbbContext sbbContext)
          implements javax.slee.Sbb Please refer to JSLEE v1.1 Specification, Early Draft Review Page 54 for further information.
protected  void trace(javax.slee.facilities.Level level, java.lang.String message)
           
protected  void trace(javax.slee.facilities.Level level, java.lang.String message, java.lang.Throwable t)
           
 void unsetSbbContext()
          implements javax.slee.Sbb Please refer to JSLEE v1.1 Specification, Early Draft Review Page 54 for further information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommonSbb

public CommonSbb()
Creates a new instance of BounceSbb

Method Detail

setSbbContext

public void setSbbContext(javax.slee.SbbContext sbbContext)
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

unsetSbbContext

public void unsetSbbContext()
implements javax.slee.Sbb Please refer to JSLEE v1.1 Specification, Early Draft Review Page 54 for further information.
The SLEE invokes this method before terminating the life of the SBB object. The SBB object can take advantage of this method to free state or resources that are held by the SBB object. These state and resources typically had been allocated by the setSbbContext method.
This method indicates a transition from state "POOLED" to "DOES NOT EXIST" (see page 52)

Specified by:
unsetSbbContext in interface javax.slee.Sbb

sbbCreate

public void sbbCreate()
               throws javax.slee.CreateException
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 before the SLEE creates a new SBB entity in response to an initial event or an invocation of the create method on a ChildRelation object. This method should initialize the SBB object using the CMP field get and set accessor methods, such that when this method returns, the persistent representation of the SBB entity can be created.
This method is the first part of a transition from state "POOLED" to "READY" (see page 52)

Specified by:
sbbCreate in interface javax.slee.Sbb
Throws:
javax.slee.CreateException

sbbPostCreate

public void sbbPostCreate()
                   throws javax.slee.CreateException
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
Throws:
javax.slee.CreateException

sbbActivate

public void sbbActivate()
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 when the SLEE picks the SBB object in the pooled state and assigns it to a specific 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 indicates a transition from state "POOLED" to "READY" (see page 52)

Specified by:
sbbActivate in interface javax.slee.Sbb

sbbPassivate

public void sbbPassivate()
implements javax.slee.Sbb Please refer to JSLEE v1.1 Specification, Early Draft Review Page 56 for further information.
The SLEE invokes this method on an SBB object when the SLEE decides to disassociate the SBB object from the SBB entity, and to put the SBB object back into the pool of available SBB objects. This method gives the SBB object the chance to release any state or resources that should not be held while the SBB object is in the pool. These state and resources typically had been allocated during the sbbActivate method.
This method indicates a transition from state "READY" to "POOLED" (see page 52)

Specified by:
sbbPassivate in interface javax.slee.Sbb

sbbRemove

public void sbbRemove()
implements javax.slee.Sbb Please refer to JSLEE v1.1 Specification, Early Draft Review Page 56 for further information.
The SLEE invokes the sbbRemove method on an SBB object before the SLEE removes the SBB entity assigned to the SBB object.
This method indicates a transition from state "READY" to "POOLED" (see page 52)

Specified by:
sbbRemove in interface javax.slee.Sbb

sbbLoad

public void sbbLoad()
implements javax.slee.Sbb Please refer to JSLEE v1.1 Specification, Early Draft Review Page 56 for further information.
The SLEE calls this method to synchronize the state of an SBB object with its assigned SBB entity�s persistent state. The SBB Developer can assume that the SBB object�s persistent state has been loaded just before this method is invoked.
This method indicates a transition from state "READY" to "READY" (see page 52)

Specified by:
sbbLoad in interface javax.slee.Sbb

sbbStore

public void sbbStore()
implements javax.slee.Sbb Please refer to JSLEE v1.1 Specification, Early Draft Review Page 57 for further information.
The SLEE calls this method to synchronize the state of the SBB entity�s persistent state with the state of the SBB object. The SBB Developer should use this method to update the SBB object using the CMP field accessor methods before its persistent state is synchronized.
This method indicates a transition from state "READY" to "READY" (see page 52)

Specified by:
sbbStore in interface javax.slee.Sbb

sbbRolledBack

public void sbbRolledBack(javax.slee.RolledBackContext rolledBackContext)
implements javax.slee.Sbb Please refer to JSLEE v1.1 Specification, Early Draft Review Page 67 for further information.
The SLEE invokes the sbbRolledBack callback method after a transaction used in a SLEE originated invocation has rolled back.

Specified by:
sbbRolledBack in interface javax.slee.Sbb

sbbExceptionThrown

public void sbbExceptionThrown(java.lang.Exception exception,
                               java.lang.Object obj,
                               javax.slee.ActivityContextInterface activityContextInterface)
implements javax.slee.Sbb Please refer to JSLEE v1.1 Specification, Early Draft Review Page 65 for further information.
The SLEE invokes this method after a SLEE originated invocation of a transactional method of the SBB object returns by throwing a RuntimeException.

Specified by:
sbbExceptionThrown in interface javax.slee.Sbb

trace

protected final void trace(javax.slee.facilities.Level level,
                           java.lang.String message)

trace

protected final void trace(javax.slee.facilities.Level level,
                           java.lang.String message,
                           java.lang.Throwable t)

getMessageResourceAdaptorSbbInterface

protected org.mobicents.slee.resource.lab.ratype.MessageResourceAdaptorSbbInterface getMessageResourceAdaptorSbbInterface()


Copyright © 2009. All Rights Reserved.