signature:
public class SbbComponentImpl { /** * Retrieves the JAIN SLEE specs descriptor
 * @ return */
public javax . slee . management . SbbDescriptor getSpecsDescriptor ( ) { } }

implementation: if ( specsDescriptor == null ) { final LibraryID [ ] libraryIDs = descriptor . getLibraryRefs ( ) . toArray ( new LibraryID [ descriptor . getLibraryRefs ( ) . size ( ) ] ) ; Set < SbbID > sbbIDSet = new HashSet < SbbID > ( ) ; for ( SbbRefDescriptor mSbbRef : descriptor . getSbbRefs ( ) ) { sbbIDSet . add ( mSbbRef . getComponentID ( ) ) ; } SbbID [ ] sbbIDs = sbbIDSet . toArray ( new SbbID [ sbbIDSet . size ( ) ] ) ; Set < ProfileSpecificationID > profileSpecSet = new HashSet < ProfileSpecificationID > ( ) ; for ( ProfileSpecRefDescriptor mProfileSpecRef : descriptor . getProfileSpecRefs ( ) ) { profileSpecSet . add ( mProfileSpecRef . getComponentID ( ) ) ; } ProfileSpecificationID [ ] profileSpecs = profileSpecSet . toArray ( new ProfileSpecificationID [ profileSpecSet . size ( ) ] ) ; Set < EventTypeID > eventTypeSet = new HashSet < EventTypeID > ( ) ; for ( EventEntryDescriptor mEventEntry : descriptor . getEventEntries ( ) . values ( ) ) { eventTypeSet . add ( mEventEntry . getEventReference ( ) ) ; } EventTypeID [ ] eventTypes = eventTypeSet . toArray ( new EventTypeID [ eventTypeSet . size ( ) ] ) ; Set < ResourceAdaptorTypeID > raTypeIDSet = new HashSet < ResourceAdaptorTypeID > ( ) ; Set < String > raLinksSet = new HashSet < String > ( ) ; for ( ResourceAdaptorTypeBindingDescriptor mResourceAdaptorTypeBinding : descriptor . getResourceAdaptorTypeBindings ( ) ) { raTypeIDSet . add ( mResourceAdaptorTypeBinding . getResourceAdaptorTypeRef ( ) ) ; for ( ResourceAdaptorEntityBindingDescriptor mResourceAdaptorEntityBinding : mResourceAdaptorTypeBinding . getResourceAdaptorEntityBinding ( ) ) { raLinksSet . add ( mResourceAdaptorEntityBinding . getResourceAdaptorEntityLink ( ) ) ; } } ResourceAdaptorTypeID [ ] raTypeIDs = raTypeIDSet . toArray ( new ResourceAdaptorTypeID [ raTypeIDSet . size ( ) ] ) ; String [ ] raLinks = raLinksSet . toArray ( new String [ raLinksSet . size ( ) ] ) ; specsDescriptor = new javax . slee . management . SbbDescriptor ( getSbbID ( ) , getDeployableUnit ( ) . getDeployableUnitID ( ) , getDeploymentUnitSource ( ) , libraryIDs , sbbIDs , eventTypes , profileSpecs , descriptor . getAddressProfileSpecRef ( ) , raTypeIDs , raLinks ) ; } return specsDescriptor ;


signature:
public class ActivityContextInterfaceImpl { /** * ( non - Javadoc )
 * @ see javax . slee . ActivityContextInterface # getActivity ( ) */
public Object getActivity ( ) throws TransactionRequiredLocalException , SLEEException { } }

implementation: sleeContainer . getTransactionManager ( ) . mandateTransaction ( ) ; return activityContext . getActivityContextHandle ( ) . getActivityObject ( ) ;


signature:
public class ActivityContextInterfaceImpl { /** * ( non - Javadoc )
 * @ see javax . slee . ActivityContextInterface # attach ( javax . slee . SbbLocalObject ) */
public void attach ( SbbLocalObject sbbLocalObject ) throws NullPointerException , TransactionRequiredLocalException , TransactionRolledbackLocalException , SLEEException { } }

implementation:
if ( doTraceLogs ) { logger . trace ( "attach( ac = " + activityContext + " , sbbLocalObject = " + sbbLocalObject + " )" ) ; } if ( sbbLocalObject == null ) throw new NullPointerException ( "null SbbLocalObject !" ) ; sleeContainer . getTransactionManager ( ) . mandateTransaction ( ) ; org . mobicents . slee . container . sbb . SbbLocalObject sbbLocalObjectImpl = ( org . mobicents . slee . container . sbb . SbbLocalObject ) sbbLocalObject ; SbbEntity sbbEntity = sbbLocalObjectImpl . getSbbEntity ( ) ; boolean attached = getActivityContext ( ) . attachSbbEntity ( sbbEntity . getSbbEntityId ( ) ) ; boolean setRollbackAndThrowException = false ; if ( attached ) { try { if ( sbbEntity . isRemoved ( ) ) { setRollbackAndThrowException = true ; } else { // attach entity from ac
sbbEntity . afterACAttach ( getActivityContext ( ) . getActivityContextHandle ( ) ) ; } } catch ( Exception e ) { setRollbackAndThrowException = true ; } } if ( setRollbackAndThrowException ) { try { sleeContainer . getTransactionManager ( ) . setRollbackOnly ( ) ; } catch ( SystemException e ) { logger . warn ( "failed to set rollback flag while asserting valid sbb entity" , e ) ; } throw new TransactionRolledbackLocalException ( "Failed to attach invalid sbb entity. SbbID " + sbbEntity . getSbbEntityId ( ) ) ; } if ( attached ) { // JSLEE 1.0 Spec , Section 8.5.8 excerpt :
// The SLEE delivers the event to an SBB entity that stays attached once . The SLEE may deliver the
// event to the same SBB entity more than once if it has been detached and then re - attached .
final EventRoutingTask routingTask = activityContext . getLocalActivityContext ( ) . getCurrentEventRoutingTask ( ) ; EventContext eventContextImpl = routingTask != null ? routingTask . getEventContext ( ) : null ; if ( eventContextImpl != null && eventContextImpl . getSbbEntitiesThatHandledEvent ( ) . remove ( sbbEntity . getSbbEntityId ( ) ) ) { if ( doTraceLogs ) { logger . trace ( "Removed the SBB Entity [" + sbbEntity . getSbbEntityId ( ) + "] from the delivered set of activity context [" + getActivityContext ( ) . getActivityContextHandle ( ) + "]. Seems to be a reattachment after detachment in the same event delivery transaction. See JSLEE 1.0 Spec, Section 8.5.8." ) ; } } }


signature:
public class ActivityContextInterfaceImpl { /** * ( non - Javadoc )
 * @ see javax . slee . ActivityContextInterface # detach ( javax . slee . SbbLocalObject ) */
public void detach ( SbbLocalObject sbbLocalObject ) throws NullPointerException , TransactionRequiredLocalException , TransactionRolledbackLocalException , SLEEException { } }

implementation:
if ( doTraceLogs ) { logger . trace ( "detach( ac = " + activityContext + " , sbbLocalObject = " + sbbLocalObject + " )" ) ; } if ( sbbLocalObject == null ) throw new NullPointerException ( "null SbbLocalObject !" ) ; sleeContainer . getTransactionManager ( ) . mandateTransaction ( ) ; org . mobicents . slee . container . sbb . SbbLocalObject sbbLocalObjectImpl = ( org . mobicents . slee . container . sbb . SbbLocalObject ) sbbLocalObject ; SbbEntity sbbEntity = sbbLocalObjectImpl . getSbbEntity ( ) ; // detach ac from entity
final ActivityContext ac = getActivityContext ( ) ; ac . detachSbbEntity ( sbbEntity . getSbbEntityId ( ) ) ; boolean setRollbackAndThrowException = false ; try { if ( sbbEntity . isRemoved ( ) ) { setRollbackAndThrowException = true ; } else { // detach entity from ac
sbbEntity . afterACDetach ( getActivityContext ( ) . getActivityContextHandle ( ) ) ; } } catch ( Exception e ) { setRollbackAndThrowException = true ; } if ( setRollbackAndThrowException ) { try { sleeContainer . getTransactionManager ( ) . setRollbackOnly ( ) ; } catch ( SystemException e ) { logger . warn ( "failed to set rollback flag while asserting valid sbb entity" , e ) ; } throw new TransactionRolledbackLocalException ( "Failed to detach invalid sbb entity. SbbID " + sbbEntity . getSbbEntityId ( ) ) ; }


signature:
public class ActivityContextInterfaceImpl { /** * ( non - Javadoc )
 * @ see javax . slee . ActivityContextInterface # isAttached ( javax . slee . SbbLocalObject ) */
public boolean isAttached ( SbbLocalObject sbbLocalObject ) throws NullPointerException , TransactionRequiredLocalException , TransactionRolledbackLocalException , SLEEException { } }

implementation: if ( sbbLocalObject == null ) { throw new NullPointerException ( "null sbbLocalObject" ) ; } sleeContainer . getTransactionManager ( ) . mandateTransaction ( ) ; if ( sbbLocalObject instanceof org . mobicents . slee . container . sbb . SbbLocalObject ) { org . mobicents . slee . container . sbb . SbbLocalObject sbbLocalObjectImpl = ( org . mobicents . slee . container . sbb . SbbLocalObject ) sbbLocalObject ; SbbEntity sbbEntity = sbbLocalObjectImpl . getSbbEntity ( ) ; if ( sbbEntity != null && ! sbbEntity . isRemoved ( ) ) { return sbbEntity . isAttached ( activityContext . getActivityContextHandle ( ) ) ; } } try { sleeContainer . getTransactionManager ( ) . setRollbackOnly ( ) ; } catch ( Exception e ) { throw new SLEEException ( e . getMessage ( ) , e ) ; } throw new TransactionRolledbackLocalException ( "the sbbLocalObject argument must represent a valid SBB entity" ) ;


signature:
public class DeployableUnitManagementImpl { /** * ( non - Javadoc )
 * @ seeorg . mobicents . slee . core . component . du . DeployableUnitManagement #
 * addDeployableUnit ( org . mobicents . slee . core . component . du . DeployableUnit ) */
public void addDeployableUnit ( final DeployableUnit deployableUnit ) { } }

implementation: if ( deployableUnit == null ) throw new NullPointerException ( "null deployableUnit" ) ; if ( logger . isTraceEnabled ( ) ) { logger . trace ( "Adding DU :  " + deployableUnit . getDeployableUnitID ( ) ) ; } deployableUnits . put ( deployableUnit . getDeployableUnitID ( ) , ( DeployableUnitImpl ) deployableUnit ) ;


signature:
public class DeployableUnitManagementImpl { /** * ( non - Javadoc )
 * @ seeorg . mobicents . slee . core . component . du . DeployableUnitManagement #
 * getDeployableUnits ( ) */
public DeployableUnitID [ ] getDeployableUnits ( ) { } }

implementation: Set < DeployableUnitID > deployableUnitIDs = deployableUnits . keySet ( ) ; return deployableUnitIDs . toArray ( new DeployableUnitID [ deployableUnitIDs . size ( ) ] ) ;


signature:
public class DeployableUnitManagementImpl { /** * ( non - Javadoc )
 * @ seeorg . mobicents . slee . core . component . du . DeployableUnitManagement #
 * removeDeployableUnit ( javax . slee . management . DeployableUnitID ) */
public void removeDeployableUnit ( DeployableUnitID deployableUnitID ) { } }

implementation: if ( logger . isTraceEnabled ( ) ) { logger . trace ( "Removing DU with id:  " + deployableUnitID ) ; } if ( deployableUnitID == null ) throw new NullPointerException ( "null id" ) ; deployableUnits . remove ( deployableUnitID ) ;


signature:
public class ResourceAdaptorEntityImpl { /** * Updates the ra entity config properties */
public void updateConfigurationProperties ( ConfigProperties properties ) throws InvalidConfigurationException , InvalidStateException { } }

implementation: if ( ! component . getDescriptor ( ) . getSupportsActiveReconfiguration ( ) && ( sleeContainer . getSleeState ( ) != SleeState . STOPPED ) && ( state == ResourceAdaptorEntityState . ACTIVE || state == ResourceAdaptorEntityState . STOPPING ) ) { throw new InvalidStateException ( "the value of the supports-active-reconfiguration attribute of the resource-adaptor-class element in the deployment descriptor of the Resource Adaptor of the resource adaptor entity is False and the resource adaptor entity is in the Active or Stopping state and the SLEE is in the Starting, Running, or Stopping state" ) ; } else { object . raConfigurationUpdate ( properties ) ; }


signature:
public class ResourceAdaptorEntityImpl { /** * Signals that the container is in RUNNING state */
@ SuppressWarnings ( { } }

implementation:
"unchecked" , "rawtypes" } ) public void sleeRunning ( ) throws InvalidStateException { // if entity is active then activate the ra object
if ( this . state . isActive ( ) ) { if ( setFTContext ) { setFTContext = false ; if ( object . isFaultTolerant ( ) ) { // set fault tolerant context , it is a ft ra
try { this . ftResourceAdaptorContext = new FaultTolerantResourceAdaptorContextImpl ( name , sleeContainer , ( FaultTolerantResourceAdaptor ) object . getResourceAdaptorObject ( ) ) ; object . setFaultTolerantResourceAdaptorContext ( ftResourceAdaptorContext ) ; } catch ( Throwable t ) { logger . error ( "Got exception invoking setFaultTolerantResourceAdaptorContext(...) for entity " + name , t ) ; } } } try { object . raActive ( ) ; } catch ( Throwable t ) { logger . error ( "Got exception invoking raActive() for entity " + name , t ) ; } }


signature:
public class ResourceAdaptorEntityImpl { /** * Signals that the container is in STOPPING state
 * @ throws TransactionRequiredLocalException */
public void sleeStopping ( ) throws InvalidStateException , TransactionRequiredLocalException { } }

implementation: if ( state != null && state . isActive ( ) ) { try { object . raStopping ( ) ; } catch ( Throwable t ) { logger . error ( "Got exception from RA object" , t ) ; } scheduleAllActivitiesEnd ( ) ; }


signature:
public class ResourceAdaptorEntityImpl { /** * Activates the ra entity
 * @ throws InvalidStateException
 * if the entity is not in INACTIVE state */
@ SuppressWarnings ( { } }

implementation:
"unchecked" , "rawtypes" } ) public void activate ( ) throws InvalidStateException { if ( ! this . state . isInactive ( ) ) { throw new InvalidStateException ( "entity " + name + " is in state: " + this . state ) ; } this . state = ResourceAdaptorEntityState . ACTIVE ; // if slee is running then activate ra object
if ( sleeContainer . getSleeState ( ) == SleeState . RUNNING ) { if ( setFTContext ) { setFTContext = false ; if ( object . isFaultTolerant ( ) ) { // set fault tolerant context , it is a ft ra
try { this . ftResourceAdaptorContext = new FaultTolerantResourceAdaptorContextImpl ( name , sleeContainer , ( FaultTolerantResourceAdaptor ) object . getResourceAdaptorObject ( ) ) ; object . setFaultTolerantResourceAdaptorContext ( ftResourceAdaptorContext ) ; } catch ( Throwable t ) { logger . error ( "Got exception invoking setFaultTolerantResourceAdaptorContext(...) for entity " + name , t ) ; } } } try { object . raActive ( ) ; } catch ( Throwable t ) { logger . error ( "Got exception invoking raActive() for entity " + name , t ) ; } }


signature:
public class ResourceAdaptorEntityImpl { /** * Deactivates the ra entity
 * @ throws InvalidStateException
 * if the entity is not in ACTIVE state
 * @ throws TransactionRequiredLocalException */
public void deactivate ( ) throws InvalidStateException , TransactionRequiredLocalException { } }

implementation:
if ( ! this . state . isActive ( ) ) { throw new InvalidStateException ( "entity " + name + " is in state: " + this . state ) ; } this . state = ResourceAdaptorEntityState . STOPPING ; if ( object . getState ( ) == ResourceAdaptorObjectState . ACTIVE ) { object . raStopping ( ) ; } // tck requires that the method returns with stopping state so do
// all deactivation logic half a sec later
TimerTask t = new TimerTask ( ) { @ Override public void run ( ) { try { cancel ( ) ; if ( state == ResourceAdaptorEntityState . STOPPING ) { if ( object . getState ( ) == ResourceAdaptorObjectState . STOPPING ) { scheduleAllActivitiesEnd ( ) ; } else { allActivitiesEnded ( ) ; } } } catch ( Throwable e ) { logger . error ( e . getMessage ( ) , e ) ; } } } ; resourceAdaptorContext . getTimer ( ) . schedule ( t , 500 ) ;


signature:
public class ResourceAdaptorEntityImpl { /** * schedules the ending of all the entity activities , this is needed on ra
 * entity deactivation or slee container stop , once the process ends it will
 * invoke allActivitiesEnded to complete those processes
 * @ throws TransactionRequiredLocalException */
private void scheduleAllActivitiesEnd ( ) throws TransactionRequiredLocalException { } }

implementation:
// schedule the end of all activities if the node is the single member of the cluster
boolean skipActivityEnding = ! sleeContainer . getCluster ( ) . isSingleMember ( ) ; if ( ! skipActivityEnding && hasActivities ( ) ) { logger . info ( "RA entity " + name + " activities end scheduled." ) ; timerTask = new EndAllActivitiesRAEntityTimerTask ( this , sleeContainer ) ; } else { allActivitiesEnded ( ) ; }


signature:
public class ResourceAdaptorEntityImpl { /** * Checks if the entity has activities besides the one passed as parameter ( if not null ) .
 * @ param exceptHandle
 * @ return */
private boolean hasActivities ( ) { } }

implementation:
try { for ( ActivityContextHandle handle : sleeContainer . getActivityContextFactory ( ) . getAllActivityContextsHandles ( ) ) { if ( handle . getActivityType ( ) == ActivityType . RA ) { ResourceAdaptorActivityContextHandle raHandle = ( ResourceAdaptorActivityContextHandle ) handle ; if ( raHandle . getResourceAdaptorEntity ( ) . equals ( this ) ) { logger . debug ( "**** AllActivityContextsHandles: " + sleeContainer . getActivityContextFactory ( ) . getAllActivityContextsHandles ( ) ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "RA entity " + name + " has (at least) activity " + handle . getActivityHandle ( ) ) ; } // return true ;
logger . warn ( "WORKAROUND USAGE: ENDING RESOURCE ADAPTOR ACTIVITIES" ) ; sleeContainer . getActivityContextFactory ( ) . WAremove ( "RA" ) ; return false ; } } } } catch ( Throwable e ) { logger . error ( e . getMessage ( ) , e ) ; } return false ;


signature:
public class ResourceAdaptorEntityImpl { /** * Removes the entity , it will unconfigure and unset the ra context , the
 * entity object can not be reused
 * @ throws InvalidStateException */
public void remove ( ) throws InvalidStateException { } }

implementation: if ( ! this . state . isInactive ( ) ) { throw new InvalidStateException ( "entity " + name + " is in state: " + this . state ) ; } object . raUnconfigure ( ) ; if ( object . isFaultTolerant ( ) ) { object . unsetFaultTolerantResourceAdaptorContext ( ) ; ftResourceAdaptorContext . shutdown ( ) ; } object . unsetResourceAdaptorContext ( ) ; this . sleeContainer . getTraceManagement ( ) . deregisterNotificationSource ( this . getNotificationSource ( ) ) ; state = null ;


signature:
public class ResourceAdaptorEntityImpl { /** * Retrieves the ra interface for this entity and the specified ra type
 * @ param raType
 * @ return */
public Object getResourceAdaptorInterface ( ResourceAdaptorTypeID raType ) { } }

implementation: return object . getResourceAdaptorInterface ( sleeContainer . getComponentRepository ( ) . getComponentByID ( raType ) . getDescriptor ( ) . getResourceAdaptorInterface ( ) ) ;


signature:
public class ResourceAdaptorEntityImpl { /** * Indicates a service was activated , the entity will forward this
 * notification to the ra object .
 * @ param serviceInfo */
public void serviceActive ( ServiceID serviceID ) { } }

implementation: try { ReceivableService receivableService = resourceAdaptorContext . getServiceLookupFacility ( ) . getReceivableService ( serviceID ) ; if ( receivableService . getReceivableEvents ( ) . length > 0 ) { object . serviceActive ( receivableService ) ; } } catch ( Throwable e ) { logger . warn ( "invocation resulted in unchecked exception" , e ) ; }


signature:
public class ResourceAdaptorEntityImpl { /** * if it is a handle reference it gets the referred handle
 * @ param handle
 * @ return */
ActivityHandle derreferActivityHandle ( ActivityHandle handle ) { } }

implementation: ActivityHandle ah = null ; if ( resourceManagement . getHandleReferenceFactory ( ) != null && handle . getClass ( ) == ActivityHandleReference . class ) { ActivityHandleReference ahReference = ( ActivityHandleReference ) handle ; ah = resourceManagement . getHandleReferenceFactory ( ) . getActivityHandle ( ahReference ) ; } else { ah = handle ; } return ah ;


signature:
public class ResourceAdaptorEntityImpl { /** * Callback to notify the entity and possibly the ra object , informing activity handled ended .
 * @ param handle
 * @ param activityFlags */
public void activityEnded ( final ActivityHandle handle , int activityFlags ) { } }

implementation:
logger . trace ( "activityEnded( handle = " + handle + " )" ) ; ActivityHandle ah = null ; if ( handle instanceof ActivityHandleReference ) { // handle is a ref , derrefer and remove the ref
ah = resourceManagement . getHandleReferenceFactory ( ) . removeActivityHandleReference ( ( ActivityHandleReference ) handle ) ; } else { // handle is not a reference
ah = handle ; } if ( ah != null && ActivityFlags . hasRequestEndedCallback ( activityFlags ) ) { object . activityEnded ( ah ) ; } if ( object . getState ( ) == ResourceAdaptorObjectState . STOPPING ) { synchronized ( this ) { // the ra object is stopping , check if the timer task is still
// needed
if ( ! hasActivities ( ) ) { if ( timerTask != null ) { timerTask . cancel ( ) ; } allActivitiesEnded ( ) ; } } }


signature:
public class ServiceManagementMBeanImpl { /** * / * ( non - Javadoc )
 * @ see javax . slee . management . ServiceManagementMBean # activate ( javax . slee . ServiceID ) */
public void activate ( ServiceID serviceID ) throws NullPointerException , UnrecognizedServiceException , InvalidStateException , InvalidLinkNameBindingStateException , ManagementException { } }

implementation: try { serviceManagement . activate ( serviceID ) ; } catch ( NullPointerException e ) { throw e ; } catch ( UnrecognizedServiceException e ) { throw e ; } catch ( InvalidLinkNameBindingStateException e ) { throw e ; } catch ( InvalidStateException e ) { throw e ; } catch ( Throwable e ) { throw new ManagementException ( e . getMessage ( ) , e ) ; }


signature:
public class ServiceManagementMBeanImpl { /** * / * ( non - Javadoc )
 * @ see javax . slee . management . ServiceManagementMBean # activate ( javax . slee . ServiceID [ ] ) */
public void activate ( ServiceID [ ] serviceIDs ) throws NullPointerException , InvalidArgumentException , UnrecognizedServiceException , InvalidStateException , InvalidLinkNameBindingStateException , ManagementException { } }

implementation: try { serviceManagement . activate ( serviceIDs ) ; } catch ( NullPointerException e ) { throw e ; } catch ( InvalidArgumentException e ) { throw e ; } catch ( UnrecognizedServiceException e ) { throw e ; } catch ( InvalidLinkNameBindingStateException e ) { throw e ; } catch ( InvalidStateException e ) { throw e ; } catch ( Throwable e ) { throw new ManagementException ( e . getMessage ( ) , e ) ; }


signature:
public class ResourceAdaptorObjectImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . container . resource . ResourceAdaptorObject #
 * setResourceAdaptorContext ( javax . slee . resource . ResourceAdaptorContext ) */
public void setResourceAdaptorContext ( ResourceAdaptorContext context ) throws InvalidStateException { } }

implementation: if ( doTraceLogs ) { logger . trace ( "setResourceAdaptorContext( context = " + context + " )" ) ; } if ( state == null ) { state = ResourceAdaptorObjectState . UNCONFIGURED ; object . setResourceAdaptorContext ( context ) ; } else { throw new InvalidStateException ( "ra object is in state " + state ) ; }


signature:
public class ResourceAdaptorObjectImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . container . resource . ResourceAdaptorObject #
 * setFaultTolerantResourceAdaptorContext
 * ( org . mobicents . slee . resource . cluster . FaultTolerantResourceAdaptorContext ) */
@ SuppressWarnings ( "unchecked" ) public void setFaultTolerantResourceAdaptorContext ( FaultTolerantResourceAdaptorContext < Serializable , Serializable > context ) throws IllegalArgumentException { } }

implementation: if ( doTraceLogs ) { logger . trace ( "setFaultTolerantResourceAdaptorContext( context = " + context + " )" ) ; } if ( isFaultTolerant ( ) ) { ( ( FaultTolerantResourceAdaptor < Serializable , Serializable > ) this . object ) . setFaultTolerantResourceAdaptorContext ( context ) ; } else { throw new IllegalArgumentException ( "RA Object is not fault tolerant!" ) ; }


signature:
public class ResourceAdaptorObjectImpl { /** * ( non - Javadoc )
 * @ see
 * org . mobicents . slee . container . resource . ResourceAdaptorObject # raConfigure
 * ( javax . slee . resource . ConfigProperties ) */
public void raConfigure ( ConfigProperties properties ) throws InvalidConfigurationException { } }

implementation: if ( doTraceLogs ) { logger . trace ( "raConfigure( properties = " + properties + " )" ) ; } verifyConfigProperties ( properties ) ; object . raConfigure ( configProperties ) ; if ( state == ResourceAdaptorObjectState . UNCONFIGURED ) { state = ResourceAdaptorObjectState . INACTIVE ; }


signature:
public class ResourceAdaptorObjectImpl { /** * Updates the ra configuration .
 * @ param properties
 * @ throws InvalidConfigurationException
 * if the configuration , after merging the specified properties
 * with the current properties values , results in an invalid
 * configuration */
public void raConfigurationUpdate ( ConfigProperties properties ) throws InvalidConfigurationException { } }

implementation: if ( doTraceLogs ) { logger . trace ( "raConfigurationUpdate( properties = " + properties + " )" ) ; } verifyConfigProperties ( properties ) ; object . raConfigurationUpdate ( configProperties ) ;


signature:
public class ResourceAdaptorObjectImpl { /** * Merges the current properties values with the new ones and uses the ra to
 * verify the configuration
 * @ param newProperties
 * @ throws InvalidConfigurationException
 * if the configuration , after merging the specified properties
 * with the current properties values , results in an invalid
 * configuration */
private void verifyConfigProperties ( ConfigProperties newProperties ) throws InvalidConfigurationException { } }

implementation:
if ( doTraceLogs ) { logger . trace ( "verifyConfigProperties( newProperties = " + newProperties + " )" ) ; } // merge properties
for ( ConfigProperties . Property configProperty : configProperties . getProperties ( ) ) { if ( newProperties . getProperty ( configProperty . getName ( ) ) == null ) { newProperties . addProperty ( configProperty ) ; } } // validate result
for ( ConfigProperties . Property entityProperty : newProperties . getProperties ( ) ) { if ( entityProperty . getValue ( ) == null ) { throw new InvalidConfigurationException ( "the property " + entityProperty . getName ( ) + " has null value" ) ; } } // validate in ra object
object . raVerifyConfiguration ( newProperties ) ; // ok , switch config
configProperties = newProperties ;


signature:
public class ResourceAdaptorObjectImpl { /** * ( non - Javadoc )
 * @ see
 * org . mobicents . slee . container . resource . ResourceAdaptorObject # raActive ( ) */
public void raActive ( ) throws InvalidStateException { } }

implementation: if ( doTraceLogs ) { logger . trace ( "raActive()" ) ; } if ( state == ResourceAdaptorObjectState . INACTIVE ) { state = ResourceAdaptorObjectState . ACTIVE ; object . raActive ( ) ; } else { throw new InvalidStateException ( "ra object is in state " + state ) ; }


signature:
public class ResourceAdaptorObjectImpl { /** * Requests the stopping of the ra object . If the operation succeeds the ra
 * will transition to STOPPING state .
 * @ throws InvalidStateException
 * if the ra object is not in ACTIVE state */
public void raStopping ( ) throws InvalidStateException { } }

implementation: if ( doTraceLogs ) { logger . trace ( "raStopping()" ) ; } if ( state == ResourceAdaptorObjectState . ACTIVE ) { state = ResourceAdaptorObjectState . STOPPING ; object . raStopping ( ) ; } else { throw new InvalidStateException ( "ra object is in state " + state ) ; }


signature:
public class ResourceAdaptorObjectImpl { /** * Requests the deactivation of the ra object . If the operation succeeds the
 * ra will transition to INACTIVE state .
 * @ throws InvalidStateException
 * if the ra object is not in STOPPING state */
public void raInactive ( ) throws InvalidStateException { } }

implementation: if ( doTraceLogs ) { logger . trace ( "raInactive()" ) ; } if ( state == ResourceAdaptorObjectState . STOPPING ) { state = ResourceAdaptorObjectState . INACTIVE ; object . raInactive ( ) ; } else { throw new InvalidStateException ( "ra object is in state " + state ) ; }


signature:
public class ResourceAdaptorObjectImpl { /** * Unconfigures the ra object
 * @ throws InvalidStateException
 * if the ra object is not in INACTIVE state */
public void raUnconfigure ( ) throws InvalidStateException { } }

implementation: if ( doTraceLogs ) { logger . trace ( "raUnconfigure()" ) ; } if ( state == ResourceAdaptorObjectState . INACTIVE ) { state = ResourceAdaptorObjectState . UNCONFIGURED ; object . raUnconfigure ( ) ; } else { throw new InvalidStateException ( "ra object is in state " + state ) ; }


signature:
public class ResourceAdaptorObjectImpl { /** * Unsets the context of the ra object .
 * @ throws InvalidStateException
 * if the ra object is not in UNCONFIGURED state */
public void unsetResourceAdaptorContext ( ) throws InvalidStateException { } }

implementation: if ( doTraceLogs ) { logger . trace ( "unsetResourceAdaptorContext()" ) ; } if ( state == ResourceAdaptorObjectState . UNCONFIGURED ) { object . unsetResourceAdaptorContext ( ) ; state = null ; } else { throw new InvalidStateException ( "ra object is in state " + state ) ; }


signature:
public class ResourceAdaptorObjectImpl { /** * Unsets the ft context of the ra object .
 * @ throws IllegalArgumentException
 * if the ra object is not in fault tolerant */
@ SuppressWarnings ( "unchecked" ) public void unsetFaultTolerantResourceAdaptorContext ( ) throws IllegalArgumentException { } }

implementation: if ( doTraceLogs ) { logger . trace ( "unsetFaultTolerantResourceAdaptorContext()" ) ; } if ( isFaultTolerant ( ) ) { ( ( FaultTolerantResourceAdaptor < Serializable , Serializable > ) this . object ) . unsetFaultTolerantResourceAdaptorContext ( ) ; } else { throw new IllegalArgumentException ( "RA Object is not fault tolerant!" ) ; }


signature:
public class ProfileSpecificationComponentImpl { /** * Builds the profile attribute map using the cmp interface class
 * @ throws DeploymentException */
private void buildProfileAttributeMap ( ) throws DeploymentException { } }

implementation:
HashMap < String , ProfileAttribute > map = new HashMap < String , ProfileAttribute > ( ) ; Class < ? > cmpInterface = getProfileCmpInterfaceClass ( ) ; String attributeGetterMethodPrefix = "get" ; for ( Method method : cmpInterface . getMethods ( ) ) { if ( ! method . getDeclaringClass ( ) . equals ( Object . class ) && method . getName ( ) . startsWith ( attributeGetterMethodPrefix ) ) { String attributeName = method . getName ( ) . substring ( attributeGetterMethodPrefix . length ( ) ) ; switch ( attributeName . length ( ) ) { case 0 : throw new DeploymentException ( "the profile cmp interface class has an invalid attribute getter method name > " + method . getName ( ) ) ; case 1 : attributeName = attributeName . toLowerCase ( ) ; break ; default : attributeName = attributeName . substring ( 0 , 1 ) . toLowerCase ( ) + attributeName . substring ( 1 ) ; break ; } ProfileAttributeImpl profileAttribute = null ; try { profileAttribute = new ProfileAttributeImpl ( attributeName , method . getReturnType ( ) ) ; } catch ( Throwable e ) { throw new DeploymentException ( "Invalid profile cmp interface attribute getter method definition ( name = " + attributeName + " , type = " + method . getReturnType ( ) + " )" , e ) ; } if ( isSlee11 ( ) ) { for ( ProfileCMPFieldDescriptor cmpField : getDescriptor ( ) . getProfileCMPInterface ( ) . getCmpFields ( ) ) { if ( cmpField . getCmpFieldName ( ) . equals ( attributeName ) ) { // TODO add index hints ?
profileAttribute . setUnique ( cmpField . isUnique ( ) ) ; } } } else { for ( ProfileIndexDescriptor profileIndex : getDescriptor ( ) . getIndexedAttributes ( ) ) { if ( profileIndex . getName ( ) . equals ( attributeName ) ) { profileAttribute . setIndex ( true ) ; profileAttribute . setUnique ( profileIndex . getUnique ( ) ) ; } } } map . put ( attributeName , profileAttribute ) ; } } profileAttributeMap = Collections . unmodifiableMap ( map ) ;


signature:
public class ProfileSpecificationComponentImpl { /** * Retrieves the JAIN SLEE specs descriptor
 * @ return */
public javax . slee . profile . ProfileSpecificationDescriptor getSpecsDescriptor ( ) { } }

implementation: if ( specsDescriptor == null ) { final LibraryID [ ] libraryIDs = descriptor . getLibraryRefs ( ) . toArray ( new LibraryID [ descriptor . getLibraryRefs ( ) . size ( ) ] ) ; final ProfileSpecificationID [ ] profileSpecs = new ProfileSpecificationID [ descriptor . getProfileSpecRefs ( ) . size ( ) ] ; for ( int i = 0 ; i < profileSpecs . length ; i ++ ) { profileSpecs [ i ] = descriptor . getProfileSpecRefs ( ) . get ( i ) . getComponentID ( ) ; } specsDescriptor = new javax . slee . profile . ProfileSpecificationDescriptor ( getProfileSpecificationID ( ) , getDeployableUnit ( ) . getDeployableUnitID ( ) , getDeploymentUnitSource ( ) , libraryIDs , profileSpecs , getDescriptor ( ) . getProfileCMPInterface ( ) . getProfileCmpInterfaceName ( ) ) ; } return specsDescriptor ;


signature:
public class EventContextSuspensionHandler { /** * the real logic to resume the event context */
private void resume ( ) { } }

implementation:
// create runnable to resume the event context
Runnable runnable = new Runnable ( ) { public void run ( ) { if ( scheduledFuture == null ) { // already resumed
return ; } // cancel timer task
scheduledFuture . cancel ( false ) ; scheduledFuture = null ; // send events frozen to event router again , will be processed only after this one ends ( this one is already being executed )
for ( EventContext ec : barriedEvents ) { ec . getLocalActivityContext ( ) . getExecutorService ( ) . routeEvent ( ec ) ; } barriedEvents = null ; // remove barrier on activity event queue
event . getLocalActivityContext ( ) . getEventQueueManager ( ) . removeBarrier ( transaction ) ; // remove suspension
suspended = false ; // continue routing the event related with this context
event . getLocalActivityContext ( ) . getCurrentEventRoutingTask ( ) . run ( ) ; } } ; // run it using the activity executor service to avoid thread concurrency
event . getLocalActivityContext ( ) . getExecutorService ( ) . execute ( runnable ) ;


signature:
public class FailOverListener { /** * ( non - Javadoc )
 * @ see
 * org . restcomm . cluster . ClientLocalListener # wonOwnership ( org . mobicents .
 * cluster . cache . ClusteredCacheData ) */
@ SuppressWarnings ( "unchecked" ) public void wonOwnership ( ClusteredCacheData clusteredCacheData ) { } }

implementation: ra . failOver ( ( K ) clusteredCacheData . getNodeFqn ( ) . getLastElement ( ) ) ;


signature:
public class ActivityContextFactoryCacheData { /** * Retrieves a set containing all activity context handles in the factory ' s
 * cache data
 * @ return */
@ SuppressWarnings ( "unchecked" ) public Set < ActivityContextHandle > getActivityContextHandles ( ) { } }

implementation: final Node node = getNode ( ) ; return node != null ? node . getChildrenNames ( ) : Collections . emptySet ( ) ;


signature:
public class FaultTolerantTimerTaskFactoryWrapper { /** * ( non - Javadoc )
 * @ see
 * org . restcomm . timers . TimerTaskFactory # newTimerTask ( org . restcomm . timers
 * . TimerTaskData ) */
@ Override public TimerTask newTimerTask ( TimerTaskData data ) { } }

implementation: FaultTolerantTimerTaskDataWrapper dataWrapper = ( FaultTolerantTimerTaskDataWrapper ) data ; FaultTolerantTimerTask task = taskFactory . getTask ( dataWrapper . getWrappedData ( ) ) ; return new FaultTolerantTimerTaskWrapper ( task , dataWrapper ) ;


signature:
public class ProfileTableNotification { /** * Compare this notification source with the specified object for order .
 * Returns a negative integer , zero , or a positive integer if this object
 * is less than , equal to , or greater than the specified object .
 * If < code > obj < / code > is a < code > ProfileTableNotification < / code > , order is
 * determined by comparing the encapsulated profile table name . Otherwise , if
 * < code > obj < / code > is a < code > NotificationSource < / code > , ordering is determined
 * by comparing the class name of this class with the class name of < code > obj < / code > .
 * @ param obj the object to compare this with .
 * @ return a negative integer , zero , or a positive integer if this notification
 * source is considered less than , equal to , or greater than the
 * specified object .
 * @ throws ClassCastException if < code > obj < / code > does not implement the
 * { @ link NotificationSource } interface .
 * @ see Comparable # compareTo ( Object ) */
public int compareTo ( Object obj ) { } }

implementation:
// can ' t compare with null
if ( obj == null ) throw new NullPointerException ( "obj is null" ) ; if ( obj == this ) return 0 ; if ( obj instanceof ProfileTableNotification ) { // compare the profile table name
ProfileTableNotification that = ( ProfileTableNotification ) obj ; return this . profileTableName . compareTo ( that . profileTableName ) ; } else { return super . compareTo ( TYPE , obj ) ; }


signature:
public class ProfileObjectPoolFactory { /** * Create a new instance of this object and set the SbbContext This places
 * it into the object pool . */
public Object makeObject ( ) { } }

implementation: if ( logger . isTraceEnabled ( ) ) { logger . trace ( "makeObject()" ) ; } ProfileObjectImpl profileObject = new ProfileObjectImpl ( profileTable ) ; profileObject . setProfileContext ( new ProfileContextImpl ( profileTable ) ) ; return profileObject ;


signature:
public class LibraryDescriptorFactoryImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . core . component . library . LibraryDescriptorFactory # parse ( java . io . InputStream ) */
public List < LibraryDescriptorImpl > parse ( InputStream inputStream ) throws DeploymentException { } }

implementation:
Object jaxbPojo = buildJAXBPojo ( inputStream ) ; List < LibraryDescriptorImpl > result = new ArrayList < LibraryDescriptorImpl > ( ) ; // Only exists in JAIN SLEE 1.1
boolean isSlee11 = true ; MLibraryJar mLibraryJar = null ; if ( jaxbPojo instanceof org . mobicents . slee . container . component . deployment . jaxb . slee11 . library . LibraryJar ) { mLibraryJar = new MLibraryJar ( ( org . mobicents . slee . container . component . deployment . jaxb . slee11 . library . LibraryJar ) jaxbPojo ) ; } else { throw new SLEEException ( "unexpected class of jaxb pojo built: " + ( jaxbPojo != null ? jaxbPojo . getClass ( ) : null ) ) ; } MSecurityPermissions securityPermissions = mLibraryJar . getSecurityPermissions ( ) ; for ( MLibrary mLibrary : mLibraryJar . getLibrary ( ) ) { result . add ( new LibraryDescriptorImpl ( mLibrary , securityPermissions , isSlee11 ) ) ; } return result ;


signature:
public class UsageParametersManagementImpl { /** * ( non - Javadoc )
 * @ seeorg . mobicents . slee . container . management . UsageParametersManagement #
 * newProfileTableUsageMBean ( java . lang . String ,
 * org . mobicents . slee . core . component . profile . ProfileSpecificationComponent ) */
public ProfileTableUsageMBean newProfileTableUsageMBean ( String profileTableName , ProfileSpecificationComponent component ) throws NotCompliantMBeanException , MalformedObjectNameException , NullPointerException { } }

implementation: return new ProfileTableUsageMBeanImpl ( profileTableName , component , sleeContainer ) ;


signature:
public class UsageParametersManagementImpl { /** * ( non - Javadoc )
 * @ seeorg . mobicents . slee . container . management . UsageParametersManagement #
 * newResourceUsageMBean ( java . lang . String ,
 * org . mobicents . slee . core . component . ra . ResourceAdaptorComponent ) */
public ResourceUsageMBean newResourceUsageMBean ( String entityName , ResourceAdaptorComponent component ) throws NotCompliantMBeanException , MalformedObjectNameException , NullPointerException { } }

implementation: return new ResourceUsageMBeanImpl ( entityName , component , sleeContainer ) ;


signature:
public class UsageParametersManagementImpl { /** * ( non - Javadoc )
 * @ seeorg . mobicents . slee . container . management . UsageParametersManagement #
 * newServiceUsageMBean
 * ( org . mobicents . slee . core . component . service . ServiceComponent ) */
public ServiceUsageMBean newServiceUsageMBean ( ServiceComponent component ) throws NotCompliantMBeanException , MalformedObjectNameException , NullPointerException { } }

implementation: return new ServiceUsageMBeanImpl ( component , sleeContainer ) ;


signature:
public class AbstractUsageMBeanImplParent { /** * Removes the mbean */
public void remove ( ) { } }

implementation:
Logger logger = getLogger ( ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Closing " + toString ( ) ) ; } final MBeanServer mbeanServer = sleeContainer . getMBeanServer ( ) ; try { mbeanServer . unregisterMBean ( getObjectName ( ) ) ; } catch ( Exception e ) { logger . error ( "failed to remove " + toString ( ) , e ) ; } // remove all usage param
if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Removing all named usage parameters of " + toString ( ) ) ; } for ( String name : usageMBeans . keySet ( ) ) { try { _removeUsageParameterSet ( name , false ) ; } catch ( Throwable e ) { logger . error ( e . getMessage ( ) , e ) ; } } // also remove the default
try { removeUsageParameterSet ( ) ; } catch ( Throwable e ) { logger . error ( e . getMessage ( ) , e ) ; }


signature:
public class AbstractUsageMBeanImplParent { /** * Creates the usage param ( and its mbean ) for the specified name
 * @ param paramSetName
 * @ throws NullPointerException
 * @ throws InvalidArgumentException
 * @ throws UsageParameterSetNameAlreadyExistsException
 * @ throws ManagementException */
public void createUsageParameterSet ( String paramSetName ) throws NullPointerException , InvalidArgumentException , UsageParameterSetNameAlreadyExistsException , ManagementException { } }

implementation: if ( paramSetName == null ) throw new NullPointerException ( "usage param set is null" ) ; if ( paramSetName . length ( ) == 0 ) throw new InvalidArgumentException ( "The lenght of the Usage Parameter Set Name is zero!" ) ; if ( ! isValidUsageParameterName ( paramSetName ) ) throw new InvalidArgumentException ( "The lenght of the Usage Parameter Set Name is zero!" ) ; _createUsageParameterSet ( paramSetName ) ;


signature:
public class AbstractUsageMBeanImplParent { /** * Retrieves the object name for the usage param mbean with the specified
 * name
 * @ param paramSetName
 * @ return
 * @ throws NullPointerException
 * @ throws UnrecognizedUsageParameterSetNameException
 * @ throws ManagementException */
public ObjectName getUsageMBean ( String paramSetName ) throws NullPointerException , UnrecognizedUsageParameterSetNameException , ManagementException { } }

implementation: if ( paramSetName == null ) throw new NullPointerException ( "Sbb usage param set is null" ) ; return _getUsageMBean ( paramSetName ) ;


signature:
public class AbstractUsageMBeanImplParent { /** * Removes the usage param ( and its mbean ) for the specified name
 * @ param paramSetName
 * @ throws NullPointerException
 * @ throws UnrecognizedUsageParameterSetNameException
 * @ throws ManagementException */
public void removeUsageParameterSet ( String paramSetName ) throws NullPointerException , UnrecognizedUsageParameterSetNameException , ManagementException { } }

implementation:
if ( paramSetName == null ) throw new NullPointerException ( "usage param set is null" ) ; // FIXME : should we recreate beans here as well ?
_removeUsageParameterSet ( paramSetName , true ) ;


signature:
public class AbstractUsageMBeanImplParent { /** * Convenience method to retrieve the { @ link AbstractUsageParameterSet } for
 * the specified param set name .
 * @ param name
 * @ return */
public AbstractUsageParameterSet getInstalledUsageParameterSet ( String name ) { } }

implementation: if ( name == null ) { return getDefaultInstalledUsageParameterSet ( ) ; } else { UsageMBeanImpl usageMBean = usageMBeans . get ( name ) ; if ( usageMBean == null ) { return null ; } else { return usageMBean . getUsageParameter ( ) ; } }


signature:
public class ResourceAdaptorDescriptorFactoryImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . core . component . ra . ResourceAdaptorDescriptorFactory # parse ( java . io . InputStream ) */
public List < ResourceAdaptorDescriptorImpl > parse ( InputStream inputStream ) throws DeploymentException { } }

implementation: Object jaxbPojo = buildJAXBPojo ( inputStream ) ; List < ResourceAdaptorDescriptorImpl > result = new ArrayList < ResourceAdaptorDescriptorImpl > ( ) ; boolean isSlee11 = false ; MResourceAdaptorJar mResourceAdaptorJar = null ; if ( jaxbPojo instanceof org . mobicents . slee . container . component . deployment . jaxb . slee . ra . ResourceAdaptorJar ) { mResourceAdaptorJar = new MResourceAdaptorJar ( ( org . mobicents . slee . container . component . deployment . jaxb . slee . ra . ResourceAdaptorJar ) jaxbPojo ) ; } else if ( jaxbPojo instanceof org . mobicents . slee . container . component . deployment . jaxb . slee11 . ra . ResourceAdaptorJar ) { mResourceAdaptorJar = new MResourceAdaptorJar ( ( org . mobicents . slee . container . component . deployment . jaxb . slee11 . ra . ResourceAdaptorJar ) jaxbPojo ) ; isSlee11 = true ; } else { throw new SLEEException ( "unexpected class of jaxb pojo built: " + ( jaxbPojo != null ? jaxbPojo . getClass ( ) : null ) ) ; } MSecurityPermissions securityPermissions = mResourceAdaptorJar . getSecurityPermissions ( ) ; for ( MResourceAdaptor mResourceAdaptor : mResourceAdaptorJar . getResourceAdaptor ( ) ) { result . add ( new ResourceAdaptorDescriptorImpl ( mResourceAdaptor , securityPermissions , isSlee11 ) ) ; } return result ;


signature:
public class ProfileAbstractClassDecorator { /** * Decorate the abstract Class
 * @ return true is the class was decorated */
public boolean decorateAbstractClass ( ) throws DeploymentException { } }

implementation:
ClassPool pool = component . getClassPool ( ) ; ProfileAbstractClassDescriptor abstractClass = component . getDescriptor ( ) . getProfileAbstractClass ( ) ; if ( abstractClass == null ) { return false ; } String abstractClassName = abstractClass . getProfileAbstractClassName ( ) ; try { ctClass = pool . get ( abstractClassName ) ; } catch ( NotFoundException nfe ) { throw new DeploymentException ( "Could not find Abstract Class: " + abstractClassName , nfe ) ; } decorateClassJNDIAddToEnvironmentCalls ( ) ; if ( isAbstractClassDecorated ) { try { String deployDir = component . getDeploymentDir ( ) . getAbsolutePath ( ) ; ctClass . writeFile ( deployDir ) ; ctClass . detach ( ) ; // the file on disk is now in sync with the latest in - memory version
if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Modified Abstract Class " + ctClass . getName ( ) + " generated in the following path " + deployDir ) ; } } catch ( Throwable e ) { throw new SLEEException ( e . getMessage ( ) , e ) ; } finally { ctClass . defrost ( ) ; } return true ; } else { return false ; }


signature:
public class UsageMBeanLocalData { /** * / * ( non - Javadoc )
 * @ see org . mobicents . slee . runtime . usage . UsageMBeanData # create ( ) */
public boolean create ( ) { } }

implementation: ConcurrentHashMap < String , UsageParamSetLocalData > notificationSourceUsageParamSets = notificationSourceUsageParamSetsMap . get ( notificationSource ) ; if ( notificationSourceUsageParamSets == null ) { ConcurrentHashMap < String , UsageParamSetLocalData > newNotificationSourceUsageParamSets = new ConcurrentHashMap < String , UsageParamSetLocalData > ( ) ; notificationSourceUsageParamSets = notificationSourceUsageParamSetsMap . putIfAbsent ( notificationSource , newNotificationSourceUsageParamSets ) ; if ( notificationSourceUsageParamSets == null ) { notificationSourceUsageParamSets = newNotificationSourceUsageParamSets ; } } if ( ! notificationSourceUsageParamSets . containsKey ( usageParameterSetName ) ) { return notificationSourceUsageParamSets . putIfAbsent ( usageParameterSetName , new UsageParamSetLocalData ( usageParameterSetName ) ) == null ; } else { return false ; }


signature:
public class UsageMBeanLocalData { /** * / * ( non - Javadoc )
 * @ see org . mobicents . slee . runtime . usage . UsageMBeanData # getParameter ( java . lang . String ) */
public UsageParameter getParameter ( String parameterName ) { } }

implementation: Map < String , UsageParamSetLocalData > notificationSourceUsageParamSets = notificationSourceUsageParamSetsMap . get ( notificationSource ) ; if ( notificationSourceUsageParamSets != null ) { UsageParamSetLocalData data = notificationSourceUsageParamSets . get ( usageParameterSetName ) ; if ( data != null ) { return data . getUsageParam ( parameterName ) ; } else { return null ; } } else { return null ; }


signature:
public class UsageMBeanLocalData { /** * / * ( non - Javadoc )
 * @ see org . mobicents . slee . runtime . usage . UsageMBeanData # getParameterNames ( ) */
public Collection < String > getParameterNames ( ) { } }

implementation: Map < String , UsageParamSetLocalData > notificationSourceUsageParamSets = notificationSourceUsageParamSetsMap . get ( notificationSource ) ; if ( notificationSourceUsageParamSets != null ) { UsageParamSetLocalData data = notificationSourceUsageParamSets . get ( usageParameterSetName ) ; if ( data != null ) { return data . getParameterNames ( ) ; } else { throw new IllegalStateException ( "Usage param set not found ( notification source = " + notificationSource + " , usage param set name = " + usageParameterSetName + " ) " ) ; } } else { throw new IllegalStateException ( "Notification source usage param sets not found ( notification source = " + notificationSource + " ) " ) ; }


signature:
public class UsageMBeanLocalData { /** * / * ( non - Javadoc )
 * @ see org . mobicents . slee . runtime . usage . UsageMBeanData # remove ( ) */
public boolean remove ( ) { } }

implementation: final Map < String , UsageParamSetLocalData > notificationSourceUsageParamSets = notificationSourceUsageParamSetsMap . get ( notificationSource ) ; if ( notificationSourceUsageParamSets != null ) { return notificationSourceUsageParamSets . remove ( usageParameterSetName ) != null ; } else { return false ; }


signature:
public class UsageMBeanLocalData { /** * / * ( non - Javadoc )
 * @ see org . mobicents . slee . runtime . usage . UsageMBeanData # setParameter ( java . lang . String , org . mobicents . slee . runtime . usage . UsageParameter ) */
public void setParameter ( String parameterName , UsageParameter usageParameter ) { } }

implementation: final Map < String , UsageParamSetLocalData > notificationSourceUsageParamSets = notificationSourceUsageParamSetsMap . get ( notificationSource ) ; if ( notificationSourceUsageParamSets != null ) { UsageParamSetLocalData data = notificationSourceUsageParamSets . get ( usageParameterSetName ) ; if ( data != null ) { data . setUsageParam ( parameterName , usageParameter ) ; } else { throw new IllegalStateException ( "Usage param set not found ( notification source = " + notificationSource + " , usage param set name = " + usageParameterSetName + " ) " ) ; } } else { throw new IllegalStateException ( "Notification source usage param sets not found ( notification source = " + notificationSource + " ) " ) ; }


signature:
public class SbbAbstractMethodHandler { /** * Retrieves the { @ link ChildRelation } for the specified sbb entity and get
 * child relation method name */
public static ChildRelation getChildRelation ( SbbEntity sbbEntity , String childRelationMethodName ) { } }

implementation: if ( sbbEntity . getSbbObject ( ) . getState ( ) != SbbObjectState . READY ) throw new IllegalStateException ( "Could not invoke getChildRelation Method, Sbb Object is not in the READY state!" ) ; if ( logger . isTraceEnabled ( ) ) { logger . trace ( "ChildRelation Interceptor:" + childRelationMethodName ) ; } return sbbEntity . getChildRelation ( childRelationMethodName ) ;


signature:
public class SbbAbstractMethodHandler { /** * The logic to fire an event from an SLEE 1.0 Sbb
 * @ param sbbEntity
 * an sbb entity with an object assigned
 * @ param eventTypeID
 * the id of the event to fire
 * @ param eventObject
 * the event object , can ' t be null
 * @ param aci
 * the activity context where the event will be fired , can ' t be
 * null
 * @ param address
 * the optional address to fire the event */
public static void fireEvent ( SbbEntity sbbEntity , EventTypeID eventTypeID , Object eventObject , ActivityContextInterface aci , Address address ) { } }

implementation: fireEvent ( sbbEntity , eventTypeID , eventObject , aci , address , null ) ;


signature:
public class SbbAbstractMethodHandler { /** * The logic to fire an event from an SLEE 1.1 Sbb
 * @ param sbbEntity
 * an sbb entity with an object assigned
 * @ param eventTypeID
 * the id of the event to fire
 * @ param eventObject
 * the event object , can ' t be null
 * @ param aci
 * the activity context where the event will be fired , can ' t be
 * null
 * @ param address
 * the optional address to fire the event
 * @ param serviceID
 * the optional service id to fire the event */
public static void fireEvent ( SbbEntity sbbEntity , EventTypeID eventTypeID , Object eventObject , ActivityContextInterface aci , Address address , ServiceID serviceID ) { } }

implementation:
if ( sleeContainer . getCongestionControl ( ) . refuseFireEvent ( ) ) { throw new SLEEException ( "congestion control refused event" ) ; } // JAIN SLEE ( TM ) specs - Section 8.4.1
// The SBB object must have an assigned SBB entity when it invokes this
// method .
// Otherwise , this method throws a java . lang . IllegalStateException .
if ( sbbEntity == null || sbbEntity . getSbbObject ( ) == null || sbbEntity . getSbbObject ( ) . getState ( ) != SbbObjectState . READY ) throw new IllegalStateException ( "SbbObject not assigned!" ) ; // JAIN SLEE ( TM ) specs - Section 8.4.1
// The event . . . cannot be null . If . . . argument is null , the fire
// event method throws a java . lang . NullPointerException .
if ( eventObject == null ) throw new NullPointerException ( "JAIN SLEE (TM) specs - Section 8.4.1: The event ... cannot be null. If ... argument is null, the fire event method throws a java.lang.NullPointerException." ) ; // JAIN SLEE ( TM ) specs - Section 8.4.1
// The activity . . . cannot be null . If . . . argument is null , the fire
// event method throws a java . lang . NullPointerException .
if ( aci == null ) throw new NullPointerException ( "JAIN SLEE (TM) specs - Section 8.4.1: The activity ... cannot be null. If ... argument is null, the fire event method throws a java.lang.NullPointerException." ) ; // JAIN SLEE ( TM ) specs - Section 8.4.1
// It is a mandatory transactional method ( see Section 9.6.1 ) .
final SleeTransactionManager txManager = sleeContainer . getTransactionManager ( ) ; txManager . mandateTransaction ( ) ; // rebuild the ac from the aci in the 2nd argument of the invoked
// method , check it ' s state
ActivityContext ac = ( ( org . mobicents . slee . container . activity . ActivityContextInterface ) aci ) . getActivityContext ( ) ; if ( logger . isTraceEnabled ( ) ) { logger . trace ( "invoke(): firing event on " + ac ) ; } // exception not in specs by mandated by
// tests / activities / activitycontext / Test560Test . xml , it ' s preferable to
// do double check on here than have the aci fire method throwing it and
// the ra slee endpoint having to translate it to activity ending
// exception , it is not common to have custom event firing in sbbs
if ( ac . isEnding ( ) ) { throw new IllegalStateException ( "activity context " + ac . getActivityContextHandle ( ) + " is ending" ) ; } final EventRoutingTransactionData transactionData = txManager . getTransactionContext ( ) . getEventRoutingTransactionData ( ) ; if ( transactionData != null ) { final EventContext eventBeingDelivered = transactionData . getEventBeingDelivered ( ) ; if ( eventBeingDelivered != null && eventBeingDelivered . getEvent ( ) == eventObject ) { // there is an event being delivered by this tx and it matches the event being fired , lets copy the ref handler
// fire the event
ac . fireEvent ( eventTypeID , eventObject , ( Address ) address , serviceID , eventBeingDelivered ) ; return ; } } // seems it is not a refire
ac . fireEvent ( eventTypeID , eventObject , ( Address ) address , serviceID , null , null , null ) ;


signature:
public class SbbAbstractMethodHandler { /** * Retrieves a profile given the cmp method name and profile id */
public static Object getProfileCMPMethod ( SbbEntity sbbEntity , String getProfileCMPMethodName , ProfileID profileID ) throws UnrecognizedProfileTableNameException , UnrecognizedProfileNameException { } }

implementation: GetProfileCMPMethodDescriptor mGetProfileCMPMethod = sbbEntity . getSbbComponent ( ) . getDescriptor ( ) . getGetProfileCMPMethods ( ) . get ( getProfileCMPMethodName ) ; if ( mGetProfileCMPMethod == null ) throw new AbstractMethodError ( "Profile CMP Method not found" ) ; if ( sbbEntity . getSbbObject ( ) . getState ( ) != SbbObjectState . READY ) { throw new IllegalStateException ( "Could not invoke getProfileCMP Method, Sbb Object is not in the READY state!" ) ; } ProfileManagement sleeProfileManager = sleeContainer . getSleeProfileTableManager ( ) ; ProfileTable profileTable = sleeProfileManager . getProfileTable ( profileID . getProfileTableName ( ) ) ; if ( ! profileTable . profileExists ( profileID . getProfileName ( ) ) ) { throw new UnrecognizedProfileNameException ( profileID . toString ( ) ) ; } return profileTable . getProfile ( profileID . getProfileName ( ) ) . getProfileCmpSlee10Wrapper ( ) ;


signature:
public class SbbAbstractMethodHandler { /** * SBB USAGE PARAMS */
public static Object getSbbUsageParameterSet ( SbbEntity sbbEntity , String name ) throws UnrecognizedUsageParameterSetNameException { } }

implementation: if ( logger . isTraceEnabled ( ) ) { logger . trace ( "getSbbUsageParameterSet(): serviceId = " + sbbEntity . getSbbEntityId ( ) . getServiceID ( ) + " , sbbID = " + sbbEntity . getSbbId ( ) + " , name = " + name ) ; } return getServiceUsageMBeanImpl ( sbbEntity . getSbbEntityId ( ) . getServiceID ( ) ) . getInstalledUsageParameterSet ( sbbEntity . getSbbId ( ) , name ) ;


signature:
public class NullActivityFactoryImpl { /** * ( non - Javadoc )
 * @ see
 * org . mobicents . slee . runtime . facilities . nullactivity . NullActivityFactory
 * # createNullActivityImpl
 * ( org . mobicents . slee . runtime . facilities . nullactivity . NullActivityHandle ,
 * boolean ) */
public NullActivityImpl createNullActivity ( NullActivityHandle nullActivityHandle , boolean mandateTransaction ) throws TransactionRequiredLocalException , FactoryException { } }

implementation:
// check mandated by SLEE TCK test CreateActivityWhileStoppingTest
if ( sleeContainer . getSleeState ( ) != SleeState . RUNNING ) { return null ; } if ( mandateTransaction ) { sleeContainer . getTransactionManager ( ) . mandateTransaction ( ) ; } // create activity
NullActivityImpl nullActivity = new NullActivityImpl ( nullActivityHandle ) ; // get an activity context for it
try { sleeContainer . getActivityContextFactory ( ) . createActivityContext ( new NullActivityContextHandle ( nullActivityHandle ) , ActivityFlags . REQUEST_ACTIVITY_UNREFERENCED_CALLBACK ) ; } catch ( ActivityAlreadyExistsException e ) { throw new FactoryException ( e . getMessage ( ) , e ) ; } if ( logger . isDebugEnabled ( ) ) { logger . debug ( "NullActivityFactory.createNullActivity() Created null activity " + nullActivity ) ; } return nullActivity ;


signature:
public class SleeTransactionSynchronization { /** * ( non - Javadoc )
 * @ see javax . transaction . Synchronization # afterCompletion ( int ) */
public void afterCompletion ( int status ) { } }

implementation: TransactionContextThreadLocal . setTransactionContext ( null ) ; switch ( status ) { case Status . STATUS_COMMITTED : if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Completed commit of tx " + tx ) ; } txContext . executeAfterCommitPriorityActions ( ) ; txContext . executeAfterCommitActions ( ) ; break ; case Status . STATUS_ROLLEDBACK : if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Completed rollback of tx " + tx ) ; } txContext . executeAfterRollbackActions ( ) ; break ; default : throw new IllegalStateException ( "Unexpected transaction state " + status ) ; } txContext . cleanup ( ) ;


signature:
public class InitialEventProcessor { /** * Compute a convergence name for the Sbb for the given Slee event .
 * Convergence names are used to instantiate the Sbb . I really ought to move
 * this to SleeContainer . java
 * @ param eventContext -
 * slee event for the convergence name computation
 * @ return the convergence name or null if this is not an initial event for
 * this service */
private String computeConvergenceName ( EventContext eventContext , ServiceComponent serviceComponent , SleeContainer sleeContainer ) throws Exception { } }

implementation:
final SbbComponent sbbComponent = serviceComponent . getRootSbbComponent ( ) ; final EventEntryDescriptor eventEntryDescriptor = sbbComponent . getDescriptor ( ) . getEventEntries ( ) . get ( eventContext . getEventTypeId ( ) ) ; StringBuilder buff = null ; /* * An initial - event - selector - method - name element . This element is
 * optional and is meaningful only if initial - event is true . It
 * identifies an in itial event selector method . The SLEE invokes this
 * optional method to d etermine if an event of the specified event type
 * is an initial event if the SBB is a root SBB of a Service ( see
 * Section 8.5.4 ) . Note that this method is not static . You can either
 * used a pooled instance of the object or create a new instance of the
 * object to run the specified method . */
if ( eventEntryDescriptor . getInitialEventSelectorMethod ( ) != null ) { // IES METHOD DEFINED
// invoke method
InitialEventSelectorImpl selector = new InitialEventSelectorImpl ( eventContext , eventEntryDescriptor ) ; SbbObjectPool pool = sleeContainer . getSbbManagement ( ) . getObjectPool ( serviceComponent . getServiceID ( ) , sbbComponent . getSbbID ( ) ) ; SbbObject sbbObject = pool . borrowObject ( ) ; Object [ ] args = new Object [ ] { selector } ; ClassLoader oldCl = Thread . currentThread ( ) . getContextClassLoader ( ) ; final JndiManagement jndiManagement = sleeContainer . getJndiManagement ( ) ; jndiManagement . pushJndiContext ( sbbComponent ) ; try { Thread . currentThread ( ) . setContextClassLoader ( sbbComponent . getClassLoader ( ) ) ; final Method m = sbbComponent . getInitialEventSelectorMethods ( ) . get ( eventEntryDescriptor . getInitialEventSelectorMethod ( ) ) ; selector = ( InitialEventSelectorImpl ) m . invoke ( sbbObject . getSbbConcrete ( ) , args ) ; if ( selector == null ) { return null ; } if ( ! selector . isInitialEvent ( ) ) { return null ; } } finally { jndiManagement . popJndiContext ( ) ; Thread . currentThread ( ) . setContextClassLoader ( oldCl ) ; pool . returnObject ( sbbObject ) ; } // build convergence name
// AC VARIABLE
if ( selector . isActivityContextSelected ( ) ) { buff = new StringBuilder ( eventContext . getLocalActivityContext ( ) . getStringId ( ) ) ; } else { buff = new StringBuilder ( NOT_SELECTED_STRING ) ; } // ADDRESS VARIABLE
if ( selector . isAddressSelected ( ) && selector . getAddress ( ) != null ) { buff . append ( selector . getAddress ( ) . toString ( ) ) ; } else { buff . append ( NOT_SELECTED ) ; } // EVENT TYPE
if ( selector . isEventTypeSelected ( ) ) { buff . append ( eventContext . getEventTypeId ( ) ) ; } else { buff . append ( NOT_SELECTED ) ; } // EVENT
if ( selector . isEventSelected ( ) ) { buff . append ( eventContext . getEventContextHandle ( ) . getId ( ) ) ; } else { buff . append ( NOT_SELECTED ) ; } // ADDRESS PROFILE
if ( selector . isAddressProfileSelected ( ) && selector . getAddress ( ) != null ) { final Collection < ProfileID > profileIDs = getAddressProfilesMatching ( selector . getAddress ( ) , serviceComponent , sbbComponent , sleeContainer ) ; if ( profileIDs . isEmpty ( ) ) // no profiles located
return null ; else { buff . append ( profileIDs . iterator ( ) . next ( ) ) ; } } else { buff . append ( NOT_SELECTED ) ; } // CUSTOM NAME
if ( selector . getCustomName ( ) != null ) { buff . append ( selector . getCustomName ( ) ) ; } } else { // NO IES METHOD DEFINED
// build convergence name considering the variabes selected in sbb ' s xml descriptor
// AC VARIABLE
final InitialEventSelectorVariables initialEventSelectorVariables = eventEntryDescriptor . getInitialEventSelectVariables ( ) ; if ( initialEventSelectorVariables . isActivityContextSelected ( ) ) { if ( initialEventSelectorVariables . isActivityContextOnlySelected ( ) ) { // special most used case where convergence name is only bound to activity context
return new StringBuilder ( eventContext . getLocalActivityContext ( ) . getStringId ( ) ) . append ( ALL_NOT_SELECTED_EXCEPT_AC ) . toString ( ) ; } else { buff = new StringBuilder ( eventContext . getLocalActivityContext ( ) . getStringId ( ) ) ; } } else { buff = new StringBuilder ( NOT_SELECTED_STRING ) ; } // ADDRESS VARIABLE
if ( initialEventSelectorVariables . isAddressSelected ( ) && eventContext . getAddress ( ) != null ) { buff . append ( eventContext . getAddress ( ) . toString ( ) ) ; } else { buff . append ( NOT_SELECTED ) ; } // EVENT TYPE
if ( initialEventSelectorVariables . isEventTypeSelected ( ) ) { buff . append ( eventContext . getEventTypeId ( ) ) ; } else { buff . append ( NOT_SELECTED ) ; } // EVENT
if ( initialEventSelectorVariables . isEventSelected ( ) ) { buff . append ( eventContext . getEventContextHandle ( ) . getId ( ) ) ; } else { buff . append ( NOT_SELECTED ) ; } // ADDRESS PROFILE
if ( initialEventSelectorVariables . isAddressProfileSelected ( ) && eventContext . getAddress ( ) != null ) { final Collection < ProfileID > profileIDs = getAddressProfilesMatching ( eventContext . getAddress ( ) , serviceComponent , sbbComponent , sleeContainer ) ; if ( profileIDs . isEmpty ( ) ) // no profiles located
return null ; else { buff . append ( profileIDs . iterator ( ) . next ( ) ) ; } } else { buff . append ( NOT_SELECTED ) ; } } return buff . toString ( ) ;


signature:
public class ClassUtils { /** * Returns the set of names representing valid , full access ( read & write ) JavaBean properties declared in the given class .
 * NOTE : the implementation is not as strict as in Introspector ( @ see java . beans . Introspector # getTargetPropertyInfo ( ) ) . It probably should be .
 * @ param CtClass the class metadata
 * @ return Set of names representing valid , full access ( read & write ) JavaBean properties declared in the given class
 * @ throws NotFoundException if a class type could not be found */
public static Set getCMPFields ( CtClass clazz ) { } }

implementation:
Set properties = new HashSet ( ) ; // Apply some reflection to the current class .
// First get an array of all the public methods at this level
Set methods = getPublicAbstractMethods ( clazz ) ; // remove non - public methods
Iterator iter = methods . iterator ( ) ; // the key in the getter / setter tables will be method name
HashMap getters = new HashMap ( ) ; HashMap setters = new HashMap ( ) ; // split out getters and setters ; ignore the rest
while ( iter . hasNext ( ) ) { CtMethod method = ( CtMethod ) iter . next ( ) ; String mname = method . getName ( ) ; // skip static methods
if ( Modifier . isStatic ( method . getModifiers ( ) ) ) continue ; String property = "" ; try { // skip methods , which throw exceptions
if ( method . getExceptionTypes ( ) . length > 0 ) continue ; if ( mname . startsWith ( GET_PREFIX ) ) { property = mname . substring ( GET_PREFIX . length ( ) ) ; getters . put ( property , method ) ; } else if ( mname . startsWith ( IS_PREFIX ) && method . getReturnType ( ) . equals ( CtClass . booleanType ) ) { property = mname . substring ( IS_PREFIX . length ( ) ) ; getters . put ( property , method ) ; } else if ( mname . startsWith ( SET_PREFIX ) ) { property = mname . substring ( SET_PREFIX . length ( ) ) ; setters . put ( property , method ) ; } } catch ( NotFoundException e ) { logger . warn ( e ) ; } if ( property . length ( ) == 0 || ! Character . isUpperCase ( property . charAt ( 0 ) ) || property . equals ( PUBLIC_IDENTIFIER ) ) { logger . warn ( "Method " + mname + " has a non-capitalized first character of the JavaBean property." ) ; getters . remove ( property ) ; setters . remove ( property ) ; } } // iterate over getters and find matching setters
iter = getters . entrySet ( ) . iterator ( ) ; while ( iter . hasNext ( ) ) { Map . Entry entry = ( Map . Entry ) iter . next ( ) ; String property = ( String ) entry . getKey ( ) ; CtMethod getter = ( CtMethod ) entry . getValue ( ) ; // find matching setter
CtMethod setter = ( CtMethod ) setters . get ( property ) ; // if setter is null , the property is not full access ( read & write ) , therefore ignored
try { if ( setter != null ) { CtClass [ ] sparams = setter . getParameterTypes ( ) ; if ( sparams . length == 1 && sparams [ 0 ] . equals ( getter . getReturnType ( ) ) ) { properties . add ( property ) ; } } } catch ( NotFoundException e ) { logger . warn ( e ) ; } } return properties ;


signature:
public class ClassUtils { /** * Return the String allowing one to create an Object ( Integer , Boolean ,
 * Byte , . . . ) from a primitive type given in parameter .
 * @ param argumentType -
 * the primitive type as a String ( int , boolean , byte , . . . )
 * @ param argument -
 * the argument to transform
 * @ return the String allowing one to create an Object from a primitive type */
public static String getObjectFromPrimitiveType ( String argumentType , String argument ) { } }

implementation: if ( argumentType . equals ( "int" ) ) return "new Integer(" + argument + ")" ; if ( argumentType . equals ( "boolean" ) ) return "new Boolean(" + argument + ")" ; if ( argumentType . equals ( "byte" ) ) return "new Byte(" + argument + ")" ; if ( argumentType . equals ( "char" ) ) return "new Character(" + argument + ")" ; if ( argumentType . equals ( "double" ) ) return "new Double(" + argument + ")" ; if ( argumentType . equals ( "float" ) ) return "new Float(" + argument + ")" ; if ( argumentType . equals ( "long" ) ) return "new Long(" + argument + ")" ; if ( argumentType . equals ( "short" ) ) return "new Short(" + argument + ")" ; return null ;


signature:
public class ClassUtils { /** * Return the String allowing one to create an Object ( Integer , Boolean ,
 * Byte , . . . ) from a primitive type given in parameter .
 * @ param argumentType -
 * the primitive type as a String ( int , boolean , byte , . . . )
 * @ param argument -
 * the argument to transform
 * @ return the String allowing one to create an Object from a primitive type */
public static String getClassFromPrimitiveType ( String argumentType ) { } }

implementation: if ( argumentType . equals ( "int" ) ) return "java.lang.Integer" ; if ( argumentType . equals ( "boolean" ) ) return "java.lang.Boolean" ; if ( argumentType . equals ( "byte" ) ) return "java.lang.Byte" ; if ( argumentType . equals ( "char" ) ) return "java.lang.Character" ; if ( argumentType . equals ( "double" ) ) return "java.lang.Double" ; if ( argumentType . equals ( "float" ) ) return "java.lang.Float" ; if ( argumentType . equals ( "long" ) ) return "java.lang.Long" ; if ( argumentType . equals ( "short" ) ) return "java.lang.Short" ; return null ;


signature:
public class ClassUtils { /** * Return the String allowing one to create a primitive type ( Integer ,
 * Boolean , Byte , . . . ) from a primitive type given in parameter .
 * @ param argumentType
 * @ param argument
 * @ return */
public static String getPrimitiveTypeFromObject ( String argumentType , String argument ) { } }

implementation: if ( argumentType . equals ( "int" ) ) return "((Integer)" + argument + ").intValue()" ; if ( argumentType . equals ( "boolean" ) ) return "((Boolean)" + argument + ").booleanValue()" ; if ( argumentType . equals ( "byte" ) ) return "((Byte)" + argument + ").byteValue()" ; if ( argumentType . equals ( "char" ) ) return "((Character)" + argument + ").charValue()" ; if ( argumentType . equals ( "double" ) ) return "((Double)" + argument + ").doubleValue()" ; if ( argumentType . equals ( "float" ) ) return "((Float)" + argument + ").floatValue()" ; if ( argumentType . equals ( "long" ) ) return "((Long)" + argument + ").longValue()" ; if ( argumentType . equals ( "short" ) ) return "((Short)" + argument + ").shortValue()" ; return null ;


signature:
public class ClassUtils { /** * Retrieve all abstract methods from a class
 * @ param sbbAbstractClass
 * the class to extract the abstract methods
 * @ return all abstract methods from a class */
public static Map getAbstractMethodsFromClass ( CtClass sbbAbstractClass ) { } }

implementation: HashMap abstractMethods = new HashMap ( ) ; CtMethod [ ] methods = sbbAbstractClass . getDeclaredMethods ( ) ; for ( int i = 0 ; i < methods . length ; i ++ ) { if ( Modifier . isAbstract ( methods [ i ] . getModifiers ( ) ) ) { abstractMethods . put ( methods [ i ] . getName ( ) , methods [ i ] ) ; } } return abstractMethods ;


signature:
public class ClassUtils { /** * Retrieve all concrete ( non - abstract and non - native ) methods from a class
 * Stored under key Name + signature
 * @ param sbbClass
 * the class to extract the concrete methods from
 * @ return all concrete methods from a class */
public static Map getConcreteMethodsFromClass ( CtClass sbbClass ) { } }

implementation: HashMap concreteMethods = new HashMap ( ) ; CtMethod [ ] methods = sbbClass . getDeclaredMethods ( ) ; for ( int i = 0 ; i < methods . length ; i ++ ) { int mods = methods [ i ] . getModifiers ( ) ; if ( ! Modifier . isAbstract ( mods ) && ! Modifier . isNative ( mods ) ) { concreteMethods . put ( getMethodKey ( methods [ i ] ) , methods [ i ] ) ; } } return concreteMethods ;


signature:
public class ClassUtils { /** * Retrieve all concrete ( non - abstract and non - native ) methods names from a class
 * @ param sbbClass
 * the class to extract the concrete methods from
 * @ return all concrete methods from a class */
public static Set getConcreteMethodsNamesFromClass ( CtClass sbbClass ) { } }

implementation: Set concreteMethods = new HashSet ( ) ; CtMethod [ ] methods = sbbClass . getDeclaredMethods ( ) ; for ( int i = 0 ; i < methods . length ; i ++ ) { int mods = methods [ i ] . getModifiers ( ) ; if ( ! Modifier . isAbstract ( mods ) && ! Modifier . isNative ( mods ) ) { concreteMethods . add ( methods [ i ] . getName ( ) ) ; } } return concreteMethods ;


signature:
public class ClassUtils { /** * Collects all methods of the interfaces implemented / extended by the specified { @ link CtClass }
 * @ param sbbAbstractClass
 * @ return */
public static Map getSuperClassesAbstractMethodsFromInterface ( CtClass sbbAbstractClass ) { } }

implementation:
HashMap abstractMethods = new HashMap ( ) ; CtMethod [ ] methods = null ; ArrayList < CtClass > superClasses = new ArrayList < CtClass > ( ) ; superClasses . add ( sbbAbstractClass ) ; ArrayList < CtClass > superClassesProcessed = new ArrayList < CtClass > ( ) ; try { while ( ! superClasses . isEmpty ( ) ) { // remove head
CtClass ctClass = superClasses . remove ( 0 ) ; superClassesProcessed . add ( ctClass ) ; // get its methods
methods = ctClass . getDeclaredMethods ( ) ; for ( CtMethod ctMethod : methods ) { abstractMethods . put ( getMethodKey ( ctMethod ) , ctMethod ) ; } // get super interfaces
for ( CtClass anotherCtClass : ctClass . getInterfaces ( ) ) { if ( ! superClassesProcessed . contains ( anotherCtClass ) ) { superClasses . add ( anotherCtClass ) ; } } try { ctClass . detach ( ) ; } catch ( Exception e ) { // ignore
} } } catch ( NotFoundException e ) { logger . error ( e ) ; } return abstractMethods ;


signature:
public class ClassUtils { /** * Retrieve all methods from an interface , including super interfaces , except the ones specified in the provided map
 * @ param interfaceClass
 * @ param exceptMethods
 * @ return */
public static Map getInterfaceMethodsFromInterface ( CtClass interfaceClass , Map exceptMethods ) { } }

implementation: HashMap interfaceMethods = new HashMap ( ) ; CtMethod [ ] methods = interfaceClass . getDeclaredMethods ( ) ; for ( int i = 0 ; i < methods . length ; i ++ ) { if ( exceptMethods . get ( methods [ i ] . getName ( ) ) == null ) { ConcreteClassGeneratorUtils . logger . trace ( methods [ i ] . getName ( ) ) ; interfaceMethods . put ( getMethodKey ( methods [ i ] ) , methods [ i ] ) ; } } Map temp = getSuperClassesAbstractMethodsFromInterface ( interfaceClass ) ; for ( Iterator i = temp . keySet ( ) . iterator ( ) ; i . hasNext ( ) ; ) { String key = ( String ) i . next ( ) ; if ( ! exceptMethods . containsKey ( key ) ) { interfaceMethods . put ( key , temp . get ( key ) ) ; } } return interfaceMethods ;


signature:
public class ProfileObjectPoolManagement { /** * Creates an object pool for the specified profile table . If a
 * transaction manager is used then , and if the tx rollbacks , the pool will
 * be removed .
 * @ param
 * @ param sleeTransactionManager */
public void createObjectPool ( final ProfileTableImpl profileTable , final SleeTransactionManager sleeTransactionManager ) { } }

implementation:
if ( logger . isTraceEnabled ( ) ) { logger . trace ( "Creating Pool for " + profileTable ) ; } createObjectPool ( profileTable ) ; if ( sleeTransactionManager != null ) { // add a rollback action to remove sbb object pool
TransactionalAction action = new TransactionalAction ( ) { public void execute ( ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Due to tx rollback, removing pool for " + profileTable ) ; } try { removeObjectPool ( profileTable ) ; } catch ( Throwable e ) { logger . error ( "Failed to remove table's " + profileTable + " object pool" , e ) ; } } } ; sleeTransactionManager . getTransactionContext ( ) . getAfterRollbackActions ( ) . add ( action ) ; }


signature:
public class ProfileObjectPoolManagement { /** * Removes the object pool for the specified profile table . If a
 * transaction manager is used then the removal is only after the tx commit .
 * @ param sleeTransactionManager
 * @ throws Exception */
public void removeObjectPool ( final ProfileTableImpl profileTable , final SleeTransactionManager sleeTransactionManager ) { } }

implementation: TransactionalAction action = new TransactionalAction ( ) { public void execute ( ) { if ( logger . isTraceEnabled ( ) ) { logger . trace ( "Removing Pool for " + profileTable ) ; } removeObjectPool ( profileTable ) ; } } ; if ( sleeTransactionManager != null ) { sleeTransactionManager . getTransactionContext ( ) . getAfterCommitActions ( ) . add ( action ) ; } else { action . execute ( ) ; }


signature:
public class ProfileObjectPoolManagement { /** * Removes the pool for the specified ids
 * @ param serviceID
 * @ param sbbID
 * @ throws Exception */
private void removeObjectPool ( final ProfileTableImpl profileTable ) { } }

implementation: final ProfileObjectPool objectPool = pools . remove ( profileTable . getProfileTableName ( ) ) ; if ( objectPool != null ) { try { objectPool . close ( ) ; } catch ( Exception e ) { logger . error ( "failed to close pool" , e ) ; } } if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Removed Pool for " + profileTable ) ; }


signature:
public class ProfileObjectPoolManagement { /** * - - - - MBEAN METHODS */
public void register ( ) { } }

implementation: MBeanServer mBeanServer = sleeContainer . getMBeanServer ( ) ; try { mBeanServer . registerMBean ( this , new ObjectName ( MBEAN_NAME ) ) ; } catch ( Exception e ) { logger . error ( "Failed to register" , e ) ; }


signature:
public class SbbEntityLockFacility { /** * private class DataRemovaClusterListener implements DataRemovalListener {
 * private final Fqn < ? > baseFqn = null ;
 * @ SuppressWarnings ( " unchecked " )
 * public void dataRemoved ( Fqn arg0 ) {
 * final SbbEntityID sbbEntityId = ( SbbEntityID ) arg0 . getLastElement ( ) ;
 * if ( locks . remove ( sbbEntityId ) ! = null ) {
 * if ( doTraceLogs ) {
 * logger . trace ( " Remotely removed lock for " + sbbEntityId ) ;
 * @ SuppressWarnings ( " unchecked " )
 * public Fqn getBaseFqn ( ) {
 * return baseFqn ; */
@ CacheEntryRemoved public void onNodeRemovedEvent ( CacheEntryRemovedEvent event ) { } }

implementation:
if ( ! event . isOriginLocal ( ) && ! event . isPre ( ) ) { // remote node removal
Fqn fqn = ( ( NodeKey ) event . getKey ( ) ) . getFqn ( ) ; if ( fqn != null ) { if ( doInfoLogs ) { logger . info ( "onNodeRemovedEvent( fqn = " + fqn + ", size = " + fqn . size ( ) + " )" ) ; } if ( fqn . get ( 0 ) . equals ( SbbEntityFactoryCacheData . SBB_ENTITY_FACTORY_FQN_NAME ) ) { // is child of sbb entity factory cache data , i . e . , / sbbe
int fqnSize = fqn . size ( ) ; if ( fqnSize < 3 ) { return ; } SbbEntityID sbbEntityID = null ; if ( fqnSize == 3 ) { // / sbbe / serviceid / convergenceName root sbb entity
ServiceID serviceID = ( ServiceID ) fqn . get ( 1 ) ; String convergenceName = ( String ) fqn . get ( 2 ) ; sbbEntityID = new RootSbbEntityID ( serviceID , convergenceName ) ; if ( doInfoLogs ) { logger . info ( "Root sbb entity " + sbbEntityID + " was remotely removed, ensuring there is no local lock" ) ; } } else { // must end as / chd / chdRelationName / childId
if ( ! fqn . get ( fqnSize - 3 ) . equals ( SbbEntityCacheData . CHILD_RELATIONs_CHILD_NODE_NAME ) ) { return ; } // let get the party started and rebuild the sbb entity id !
ServiceID serviceID = ( ServiceID ) fqn . get ( 1 ) ; String convergenceName = ( String ) fqn . get ( 2 ) ; sbbEntityID = new RootSbbEntityID ( serviceID , convergenceName ) ; int i = 3 ; while ( fqnSize >= i + 3 ) { // fqn get ( i ) is chd , skip
String childRelationName = ( String ) fqn . get ( i + 1 ) ; String childId = ( String ) fqn . get ( i + 2 ) ; sbbEntityID = new NonRootSbbEntityID ( sbbEntityID , childRelationName , childId ) ; i += 3 ; } if ( doInfoLogs ) { logger . info ( "Non root sbb entity " + sbbEntityID + " was remotely removed, ensuring there is no local lock" ) ; } } if ( locks . remove ( sbbEntityID ) != null ) { if ( doInfoLogs ) { logger . info ( "Remotely removed lock for " + sbbEntityID ) ; } } } } }


signature:
public class AbstractSleeComponentWithUsageParametersInterface { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . container . component . AbstractSleeComponent # undeployed ( ) */
@ Override public void undeployed ( ) { } }

implementation: super . undeployed ( ) ; usageNotificationManagerMBeanConcreteInterface = null ; usageNotificationManagerMBeanImplConcreteClass = null ; usageParametersConcreteClass = null ; usageParametersInterface = null ; usageParametersMBeanConcreteInterface = null ; usageParametersMBeanImplConcreteClass = null ;


signature:
public class SleeSubsystemAdd { /** * { @ inheritDoc } */
@ Override protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } }

implementation:
log . info ( "Populating the model" ) ; // model . setEmptyObject ( ) ;
for ( AttributeDefinition ad : SleeSubsystemDefinition . ATTRIBUTES ) { ad . validateAndSet ( operation , model ) ; }


signature:
public class SleeSubsystemAdd { /** * { @ inheritDoc } */
@ Override public void performBoottime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { } }

implementation:
// Add deployment processors here
// Remove this if you don ' t need to hook into the deployers , or you can add as many as you like
// see SubDeploymentProcessor for explanation of the phases
context . addStep ( new AbstractDeploymentChainStep ( ) { public void execute ( DeploymentProcessorTarget processorTarget ) { processorTarget . addDeploymentProcessor ( SleeExtension . SUBSYSTEM_NAME , SleeDeploymentParseProcessor . PHASE , SleeDeploymentParseProcessor . PRIORITY , new SleeDeploymentParseProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SleeExtension . SUBSYSTEM_NAME , SleeDeploymentInstallProcessor . PHASE , SleeDeploymentInstallProcessor . PRIORITY , new SleeDeploymentInstallProcessor ( ) ) ; } } , OperationContext . Stage . RUNTIME ) ; ModelNode fullModel = Resource . Tools . readModel ( context . readResource ( PathAddress . EMPTY_ADDRESS ) ) ; final ModelNode cacheConfigModel = SleeSubsystemDefinition . CACHE_CONFIG . resolveModelAttribute ( context , model ) ; final String cacheConfig = cacheConfigModel . isDefined ( ) ? cacheConfigModel . asString ( ) : null ; // Installs the msc service which builds the SleeContainer instance and its modules
final ServiceTarget target = context . getServiceTarget ( ) ; final SleeContainerService sleeContainerService = new SleeContainerService ( fullModel , cacheConfig ) ; String dbConfigMBean = getPropertyString ( fullModel , "ProfileManagement" , "dbConfigMBean" , "H2DBConfig" ) ; String datasourceServiceName = getPropertyString ( fullModel , dbConfigMBean , "datasourceServiceName" , "ExampleDS" ) ; final ServiceBuilder < ? > sleeContainerServiceBuilder = target . addService ( SleeServiceNames . SLEE_CONTAINER , sleeContainerService ) . addDependency ( PathManagerService . SERVICE_NAME , PathManager . class , sleeContainerService . getPathManagerInjector ( ) ) . addDependency ( MBeanServerService . SERVICE_NAME , MBeanServer . class , sleeContainerService . getMbeanServer ( ) ) . addDependency ( TransactionManagerService . SERVICE_NAME , TransactionManager . class , sleeContainerService . getTransactionManager ( ) ) . addDependency ( DataSourceReferenceFactoryService . SERVICE_NAME_BASE . append ( datasourceServiceName ) , ManagedReferenceFactory . class , sleeContainerService . getManagedReferenceFactory ( ) ) ; newControllers . add ( sleeContainerServiceBuilder . setInitialMode ( Mode . ACTIVE ) . install ( ) ) ;


signature:
public class UsageOutOfRangeFilter { /** * Determine whether the specified notification should be delivered to notification
 * listeners using this notification filter .
 * @ param notification the notification to be sent .
 * @ return < code > true < / code > if the notification should be delivered to notification
 * listeners , < code > false < / code > otherwise . This method always returns
 * < code > false < / code > if < code > notification < / code > is not an instance of
 * { @ link UsageNotification } . */
public boolean isNotificationEnabled ( Notification notification ) { } }

implementation:
if ( ! ( notification instanceof UsageNotification ) ) return false ; UsageNotification usageNotification = ( UsageNotification ) notification ; if ( service != null ) { // SLEE 1.0 comparison
return service . equals ( usageNotification . getService ( ) ) && sbb . equals ( usageNotification . getSbb ( ) ) && paramName . equals ( usageNotification . getUsageParameterName ( ) ) && ( usageNotification . getValue ( ) < lowValue || usageNotification . getValue ( ) > highValue ) ; } else { // SLEE 1.1 comparison
return notificationSource . equals ( usageNotification . getNotificationSource ( ) ) && paramName . equals ( usageNotification . getUsageParameterName ( ) ) && ( usageNotification . getValue ( ) < lowValue || usageNotification . getValue ( ) > highValue ) ; }


signature:
public class AddressPresentation { /** * Get an < code > AddressPresentation < / code > object from an integer value .
 * @ param value the address presentation value as an integer .
 * @ return an < code > AddressPresentation < / code > object corresponding to < code > value < / code > .
 * @ throws IllegalArgumentException if < code > value < / code > is not a valid
 * address presentation value . */
public static AddressPresentation fromInt ( int value ) throws IllegalArgumentException { } }

implementation: switch ( value ) { case ADDRESS_PRESENTATION_UNDEFINED : return UNDEFINED ; case ADDRESS_PRESENTATION_ALLOWED : return ALLOWED ; case ADDRESS_PRESENTATION_RESTRICTED : return RESTRICTED ; case ADDRESS_PRESENTATION_ADDRESS_NOT_AVAILABLE : return ADDRESS_NOT_AVAILABLE ; default : throw new IllegalArgumentException ( "Invalid value: " + value ) ; }


signature:
public class AddressPresentation { /** * Get an < code > AddressPresentation < / code > object from a string value .
 * @ param value the address presentation as a string , for example as returned by the
 * { @ link # toString ( ) } method ( case insensitive ) .
 * @ return an < code > AddressPresentation < / code > object corresponding to < code > value < / code > .
 * @ throws NullPointerException if < code > value < / code > is < code > null < / code > .
 * @ throws IllegalArgumentException if < code > value < / code > is not a valid
 * address presentation value .
 * @ since SLEE 1.1 */
public static AddressPresentation fromString ( String value ) throws NullPointerException , IllegalArgumentException { } }

implementation: if ( value == null ) throw new NullPointerException ( "value is null" ) ; if ( value . equalsIgnoreCase ( UNDEFINED_STRING ) ) return UNDEFINED ; if ( value . equalsIgnoreCase ( ALLOWED_STRING ) ) return ALLOWED ; if ( value . equalsIgnoreCase ( RESTRICTED_STRING ) ) return RESTRICTED ; if ( value . equalsIgnoreCase ( ADDRESS_NOT_AVAILABLE_STRING ) ) return ADDRESS_NOT_AVAILABLE ; throw new IllegalArgumentException ( "Invalid value: " + value ) ;


signature:
public class AlarmMBeanImpl { /** * ( non - Javadoc )
 * @ see javax . slee . management . AlarmMBean # clearAlarm ( java . lang . String ) */
public boolean clearAlarm ( String alarmID ) throws NullPointerException , ManagementException { } }

implementation:
if ( alarmID == null ) { throw new NullPointerException ( "AlarmID must not be null" ) ; } AlarmPlaceHolder aph = alarmIdToAlarm . remove ( alarmID ) ; placeHolderToNotificationSource . remove ( aph ) ; if ( aph == null ) { return false ; } else { // we clear ?
try { generateNotification ( aph , true ) ; } catch ( Exception e ) { throw new ManagementException ( "Failed to clear alarm due to: " + e ) ; } return true ; }


signature:
public class AlarmMBeanImpl { /** * ( non - Javadoc )
 * @ see javax . slee . management . AlarmMBean # clearAlarms ( javax . slee . management . NotificationSource ) */
public int clearAlarms ( NotificationSource notificationSource ) throws NullPointerException , UnrecognizedNotificationSourceException , ManagementException { } }

implementation: if ( notificationSource == null ) { throw new NullPointerException ( "NotificationSource must not be null" ) ; } mandateSource ( notificationSource ) ; int count = 0 ; try { for ( Map . Entry < AlarmPlaceHolder , NotificationSource > e : placeHolderToNotificationSource . entrySet ( ) ) { if ( e . getValue ( ) . equals ( notificationSource ) ) { if ( clearAlarm ( e . getKey ( ) . getAlarm ( ) . getAlarmID ( ) ) ) { count ++ ; } } } } catch ( Exception e ) { throw new ManagementException ( "Failed to get alarm id list due to: " , e ) ; } return count ;


signature:
public class AlarmMBeanImpl { /** * ( non - Javadoc )
 * @ see javax . slee . management . AlarmMBean # getAlarms ( ) */
public String [ ] getAlarms ( ) throws ManagementException { } }

implementation: try { Set < String > ids = new HashSet < String > ( ) ; ids . addAll ( alarmIdToAlarm . keySet ( ) ) ; return ids . toArray ( new String [ ids . size ( ) ] ) ; } catch ( Exception e ) { throw new ManagementException ( "Failed to get list of active alarms due to." , e ) ; }


signature:
public class AlarmMBeanImpl { /** * ( non - Javadoc )
 * @ see javax . slee . management . AlarmMBean # getAlarms ( javax . slee . management . NotificationSource ) */
public String [ ] getAlarms ( NotificationSource notificationSource ) throws NullPointerException , UnrecognizedNotificationSourceException , ManagementException { } }

implementation: if ( notificationSource == null ) { throw new NullPointerException ( "NotificationSource must not be null" ) ; } mandateSource ( notificationSource ) ; try { Set < String > ids = new HashSet < String > ( ) ; for ( Map . Entry < AlarmPlaceHolder , NotificationSource > e : placeHolderToNotificationSource . entrySet ( ) ) { if ( e . getValue ( ) . equals ( notificationSource ) ) { ids . add ( e . getKey ( ) . getAlarm ( ) . getAlarmID ( ) ) ; } } return ids . toArray ( new String [ ids . size ( ) ] ) ; } catch ( Exception e ) { throw new ManagementException ( "Failed to get alarm id list due to: " , e ) ; }


signature:
public class AlarmMBeanImpl { /** * ( non - Javadoc )
 * @ see javax . slee . management . AlarmMBean # getDescriptor ( java . lang . String ) */
public Alarm getDescriptor ( String alarmID ) throws NullPointerException , ManagementException { } }

implementation: if ( alarmID == null ) { throw new NullPointerException ( "AlarmID must not be null" ) ; } AlarmPlaceHolder aph = this . alarmIdToAlarm . get ( alarmID ) ; if ( aph == null ) return null ; return aph . getAlarm ( ) ;


signature:
public class AlarmMBeanImpl { /** * ( non - Javadoc )
 * @ see javax . slee . management . AlarmMBean # getDescriptors ( java . lang . String [ ] ) */
public Alarm [ ] getDescriptors ( String [ ] alarmIDs ) throws NullPointerException , ManagementException { } }

implementation: if ( alarmIDs == null ) { throw new NullPointerException ( "AlarmID[] must not be null" ) ; } Set < Alarm > alarms = new HashSet < Alarm > ( ) ; try { for ( String id : alarmIDs ) { Alarm a = getDescriptor ( id ) ; if ( a != null ) alarms . add ( a ) ; } return alarms . toArray ( new Alarm [ alarms . size ( ) ] ) ; } catch ( Exception e ) { throw new ManagementException ( "Failed to get desciptors." , e ) ; }


signature:
public class AlarmMBeanImpl { /** * NON MBEAN - used only internal , those methods are not exposed via jmx */
public boolean isSourceOwnerOfAlarm ( NotificationSourceWrapper notificationSource , String alarmID ) { } }

implementation: AlarmPlaceHolder aph = this . alarmIdToAlarm . get ( alarmID ) ; if ( aph == null ) return false ; return aph . getNotificationSource ( ) . getNotificationSource ( ) . equals ( notificationSource . getNotificationSource ( ) ) ;


signature:
public class AlarmMBeanImpl { /** * THis methods raises alarm . It MUST not receive AlarmLevel . CLEAR , it has
 * to be filtered .
 * @ param notificationSource
 * @ param alarmType
 * @ param instanceID
 * @ param level
 * @ param message
 * @ param cause
 * @ return - AlarmId */
public String raiseAlarm ( NotificationSourceWrapper notificationSource , String alarmType , String instanceID , AlarmLevel level , String message , Throwable cause ) { } }

implementation:
synchronized ( notificationSource ) { if ( isAlarmAlive ( notificationSource , alarmType , instanceID ) ) { // Alarm a = this . placeHolderToAlarm . get ( new
// AlarmPlaceHolder ( notificationSource , alarmType , instanceID ) ) ;
Alarm a = null ; // unconveniant . . . .
try { AlarmPlaceHolder localAPH = new AlarmPlaceHolder ( notificationSource , alarmType , instanceID ) ; for ( Map . Entry < String , AlarmPlaceHolder > e : this . alarmIdToAlarm . entrySet ( ) ) { if ( e . getValue ( ) . equals ( localAPH ) ) { a = e . getValue ( ) . getAlarm ( ) ; break ; } } } catch ( Exception e ) { // ignore
} if ( a != null ) { return a . getAlarmID ( ) ; } else { return this . raiseAlarm ( notificationSource , alarmType , instanceID , level , message , cause ) ; } } else { Alarm a = new Alarm ( UUID . randomUUID ( ) . toString ( ) , notificationSource . getNotificationSource ( ) , alarmType , instanceID , level , message , cause , System . currentTimeMillis ( ) ) ; AlarmPlaceHolder aph = new AlarmPlaceHolder ( notificationSource , alarmType , instanceID , a ) ; this . alarmIdToAlarm . put ( a . getAlarmID ( ) , aph ) ; // this . placeHolderToAlarm . put ( aph , a ) ;
this . placeHolderToNotificationSource . put ( aph , aph . getNotificationSource ( ) . getNotificationSource ( ) ) ; generateNotification ( aph , false ) ; return a . getAlarmID ( ) ; } }


signature:
public class ProfileManagementHandler { /** * Usage methods . Here we can be static for sure . Rest must be tested . */
public static Object getUsageParameterSet ( ProfileObjectImpl profileObject , String name ) throws UnrecognizedUsageParameterSetNameException { } }

implementation: if ( logger . isDebugEnabled ( ) ) { logger . info ( "[getUsageParameterSet(" + name + ")] @ " + profileObject ) ; } if ( name == null ) { throw new NullPointerException ( "UsageParameterSet name must not be null." ) ; } ProfileTableImpl profileTable = profileObject . getProfileTable ( ) ; Object result = profileTable . getProfileTableUsageMBean ( ) . getInstalledUsageParameterSet ( name ) ; if ( result == null ) { throw new UnrecognizedUsageParameterSetNameException ( ) ; } else { return result ; }


signature:
public class NullActivityContextHandle { /** * ( non - Javadoc )
 * @ see java . io . Externalizable # readExternal ( java . io . ObjectInput ) */
@ Override public void readExternal ( ObjectInput in ) throws IOException , ClassNotFoundException { } }

implementation: this . activityHandle = new NullActivityHandleImpl ( in . readUTF ( ) ) ;


signature:
public class NullActivityContextHandle { /** * ( non - Javadoc )
 * @ see java . io . Externalizable # writeExternal ( java . io . ObjectOutput ) */
@ Override public void writeExternal ( ObjectOutput out ) throws IOException { } }

implementation: out . writeUTF ( ( ( NullActivityHandleImpl ) activityHandle ) . getId ( ) ) ;


signature:
public class EventTypeComponentImpl { /** * Retrieves the JAIN SLEE specs event type descriptor
 * @ return */
public javax . slee . management . EventTypeDescriptor getSpecsDescriptor ( ) { } }

implementation: if ( specsDescriptor == null ) { specsDescriptor = new javax . slee . management . EventTypeDescriptor ( getEventTypeID ( ) , getDeployableUnit ( ) . getDeployableUnitID ( ) , getDeploymentUnitSource ( ) , descriptor . getLibraryRefs ( ) . toArray ( new LibraryID [ descriptor . getLibraryRefs ( ) . size ( ) ] ) , getDescriptor ( ) . getEventClassName ( ) ) ; } return specsDescriptor ;


signature:
public class EventTypeComponentImpl { /** * Signals that the specified { @ link ServiceComponentImpl } which define this event as initial was activated
 * @ param serviceComponent */
public void activatedServiceWhichDefineEventAsInitial ( ServiceComponent serviceComponent ) { } }

implementation:
// create new ordered set
SortedSet < ServiceComponent > activeServicesWhichDefineEventAsInitial = new TreeSet < ServiceComponent > ( new ActiveServicesWhichDefineEventAsInitialComparator ( ) ) ; // add all existent active services , except old version , this allows smooth service upgrade
ServiceID oldVersion = serviceComponent . getOldVersion ( ) ; if ( oldVersion == null ) { activeServicesWhichDefineEventAsInitial . addAll ( this . activeServicesWhichDefineEventAsInitial ) ; } else { for ( ServiceComponent existentServiceComponent : this . activeServicesWhichDefineEventAsInitial ) { if ( ! existentServiceComponent . getServiceID ( ) . equals ( oldVersion ) ) { activeServicesWhichDefineEventAsInitial . add ( existentServiceComponent ) ; } } } // add new service
activeServicesWhichDefineEventAsInitial . add ( serviceComponent ) ; // replace old set
this . activeServicesWhichDefineEventAsInitial = activeServicesWhichDefineEventAsInitial ;