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

implementation:
// create new ordered set
SortedSet < ServiceComponent > activeServicesWhichDefineEventAsInitial = new TreeSet < ServiceComponent > ( new ActiveServicesWhichDefineEventAsInitialComparator ( ) ) ; // add all existent active services , except one deactivated
for ( ServiceComponent existentServiceComponent : this . activeServicesWhichDefineEventAsInitial ) { if ( ! existentServiceComponent . equals ( serviceComponent ) ) { activeServicesWhichDefineEventAsInitial . add ( existentServiceComponent ) ; } } // replace old set
this . activeServicesWhichDefineEventAsInitial = activeServicesWhichDefineEventAsInitial ;


signature:
public class SLEESubDeployer { /** * Method for deciding whether or not to accept the file . */
public boolean accepts ( URL deployableUnitURL , String deployableUnitName ) { } }

implementation:
DeployableUnitWrapper du = new DeployableUnitWrapper ( deployableUnitURL , deployableUnitName ) ; URL url = du . getUrl ( ) ; if ( logger . isTraceEnabled ( ) ) { logger . trace ( "Method accepts called for " + url + " [DU: " + deployableUnitName + "]" ) ; } try { String fullPath = url . getFile ( ) ; String fileName = fullPath . substring ( fullPath . lastIndexOf ( '/' ) + 1 , fullPath . length ( ) ) ; // Is it in the toAccept list ? Direct accept .
if ( toAccept . containsKey ( fileName ) ) { if ( logger . isTraceEnabled ( ) ) { logger . trace ( "Accepting " + url . toString ( ) + "." ) ; } return true ; } // If not it the accept list but it ' s a jar might be a DU jar . . .
else if ( fileName . endsWith ( ".jar" ) ) { JarFile duJarFile = null ; try { // Try to obtain the DU descriptor , if we got it , we ' re
// accepting it !
if ( du . getEntry ( "META-INF/deployable-unit.xml" ) != null ) { if ( logger . isTraceEnabled ( ) ) { logger . trace ( "Accepting " + url . toString ( ) + "." ) ; } return true ; } } finally { // Clean up !
if ( duJarFile != null ) { try { duJarFile . close ( ) ; } catch ( IOException ignore ) { } finally { duJarFile = null ; } } } } } catch ( Exception ignore ) { // Ignore . . will reject .
} // Uh - oh . . looks like it will stay outside .
return false ;


signature:
public class SLEESubDeployer { /** * Initializer method for accepted files . Will parse descriptors at this
 * point . */
public void init ( URL deployableUnitURL , String deployableUnitName ) throws DeploymentException { } }

implementation:
URL url = deployableUnitURL ; DeployableUnitWrapper du = new DeployableUnitWrapper ( deployableUnitURL , deployableUnitName ) ; if ( logger . isTraceEnabled ( ) ) { logger . trace ( "Method init called for " + deployableUnitURL + " [DU: " + deployableUnitName + "]" ) ; } // Get the full path and filename for this du
String fullPath = du . getFullPath ( ) ; String fileName = du . getFileName ( ) ; try { DeployableUnitWrapper duWrapper = null ; // If we ' re able to remove it from toAccept was because it was
// there !
if ( ( duWrapper = toAccept . remove ( fileName ) ) != null ) { // Create a new Deployable Component from this DI .
DeployableComponent dc = new DeployableComponent ( du , url , fileName , sleeContainerDeployer ) ; // Also get the deployable unit for this ( it exists , we ' ve
// checked ! )
DeployableUnit deployerDU = deployableUnits . get ( duWrapper . getFileName ( ) ) ; for ( DeployableComponent subDC : dc . getSubComponents ( ) ) { // Add the sub - component to the DU object .
deployerDU . addComponent ( subDC ) ; } } // If the DU for this component doesn ' t exists . . it ' s a new DU !
else if ( fileName . endsWith ( ".jar" ) ) { JarFile duJarFile = null ; try { // Get a reference to the DU jar file
duJarFile = new JarFile ( fullPath ) ; // Try to get the Deployable Unit descriptor
JarEntry duXmlEntry = duJarFile . getJarEntry ( "META-INF/deployable-unit.xml" ) ; // Got descriptor ?
if ( duXmlEntry != null ) { // Create a new Deployable Unit object .
DeployableUnit deployerDU = new DeployableUnit ( du , sleeContainerDeployer ) ; // Let ' s parse the descriptor to see what we ' ve got . . .
DeployableUnitDescriptorFactory dudf = sleeContainerDeployer . getSleeContainer ( ) . getComponentManagement ( ) . getDeployableUnitManagement ( ) . getDeployableUnitDescriptorFactory ( ) ; DeployableUnitDescriptor duDesc = dudf . parse ( duJarFile . getInputStream ( duXmlEntry ) ) ; // If the filename is present , an undeploy in on the way . . . let ' s wait
while ( deployableUnits . containsKey ( fileName ) ) { Thread . sleep ( getWaitTimeBetweenOperations ( ) ) ; } // Add it to the deployable units map .
deployableUnits . put ( fileName , deployerDU ) ; // Go through each jar entry in the DU descriptor
for ( String componentJarName : duDesc . getJarEntries ( ) ) { // Might have path . . . strip it !
int beginIndex ; if ( ( beginIndex = componentJarName . lastIndexOf ( '/' ) ) == - 1 ) beginIndex = componentJarName . lastIndexOf ( '\\' ) ; beginIndex ++ ; // Got a clean jar name , no paths .
componentJarName = componentJarName . substring ( beginIndex , componentJarName . length ( ) ) ; // Put it in the accept list .
toAccept . put ( componentJarName , du ) ; } // Do the same as above . . . but for services
for ( String serviceXMLName : duDesc . getServiceEntries ( ) ) { // Might have path . . . strip it !
int beginIndex ; if ( ( beginIndex = serviceXMLName . lastIndexOf ( '/' ) ) == - 1 ) beginIndex = serviceXMLName . lastIndexOf ( '\\' ) ; beginIndex ++ ; // Got a clean XML filename
serviceXMLName = serviceXMLName . substring ( beginIndex , serviceXMLName . length ( ) ) ; // Add it to the accept list .
toAccept . put ( serviceXMLName , du ) ; } } } finally { // Clean up !
if ( duJarFile != null ) { try { duJarFile . close ( ) ; } catch ( IOException ignore ) { } finally { duJarFile = null ; } } } } } catch ( Exception e ) { // Something went wrong . . .
logger . error ( "Deployment of " + fileName + " failed. " , e ) ; return ; }


signature:
public class SLEESubDeployer { /** * This is where the fun begins . Time to deploy ! */
public void start ( URL deployableUnitURL , String deployableUnitName ) throws DeploymentException { } }

implementation:
DeployableUnitWrapper du = new DeployableUnitWrapper ( deployableUnitURL , deployableUnitName ) ; if ( logger . isTraceEnabled ( ) ) { logger . trace ( "Method start called for " + du . getUrl ( ) + " [DU: " + deployableUnitName + "]" ) ; } try { // Get the deployable unit object
DeployableUnit realDU = deployableUnits . get ( du . getFileName ( ) ) ; // If it exists , install it .
if ( realDU != null ) { while ( isInUndeployList ( du . getFileName ( ) ) ) { Thread . sleep ( getWaitTimeBetweenOperations ( ) ) ; } sleeContainerDeployer . getDeploymentManager ( ) . installDeployableUnit ( realDU ) ; } } catch ( Exception e ) { logger . error ( "" , e ) ; }


signature:
public class SLEESubDeployer { /** * Fun has ended . Time to undeploy . */
public void stop ( URL deployableUnitURL , String deployableUnitName ) throws DeploymentException { } }

implementation:
if ( logger . isTraceEnabled ( ) ) { logger . trace ( "stop( deployableUnitURL = : " + deployableUnitURL + " )" ) ; } DeployableUnitWrapper du = new DeployableUnitWrapper ( deployableUnitURL , deployableUnitName ) ; DeployableUnit realDU = null ; String fileName = du . getFileName ( ) ; if ( ( realDU = deployableUnits . get ( du . getFileName ( ) ) ) != null ) { if ( logger . isTraceEnabled ( ) ) { logger . trace ( "Got DU: " + realDU . getDeploymentInfoShortName ( ) ) ; } if ( ! isInUndeployList ( fileName ) ) { addToUndeployList ( fileName ) ; } try { // Uninstall it
sleeContainerDeployer . getDeploymentManager ( ) . uninstallDeployableUnit ( realDU ) ; // Remove it from list if successful
deployableUnits . remove ( fileName ) ; removeFromUndeployList ( fileName ) ; } catch ( DependencyException e ) { // ignore , will be tried again once there is another undeployment
} catch ( Exception e ) { Throwable cause = e . getCause ( ) ; if ( cause instanceof InvalidStateException ) { logger . warn ( cause . getLocalizedMessage ( ) + "... WAITING ..." ) ; } else if ( e instanceof DeploymentException ) { throw new IllegalStateException ( e . getLocalizedMessage ( ) , e ) ; } else { logger . error ( e . getMessage ( ) , e ) ; } } }


signature:
public class SLEESubDeployer { /** * MBean operation for getting Deployer status . */
public String showStatus ( ) throws DeploymentException { } }

implementation:
String output = "" ; output += "
Deployable Units List:
" ; for ( String key : deployableUnits . keySet ( ) ) { output += "<" + key + "> [" + deployableUnits . get ( key ) + "]
" ; for ( String duComponent : deployableUnits . get ( key ) . getComponents ( ) ) { output += "+-- " + duComponent + "
" ; } } output += "
To Accept List:
" ; for ( String key : toAccept . keySet ( ) ) { output += "<" + key + "> [" + toAccept . get ( key ) + "]
" ; } output += "
Undeployments running:
" ; for ( String undeploy : undeploys ) { output += "+-- " + undeploy + "
" ; } output += "
Deployment Manager Status
" ; output += sleeContainerDeployer . getDeploymentManager ( ) . showStatus ( ) ; return output ;


signature: public class SLEESubDeployer { private boolean addToUndeployList ( String du ) { } }

implementation: if ( logger . isTraceEnabled ( ) ) { logger . trace ( "Adding " + du + " to running undeployments list ..." ) ; logger . trace ( "Current Undeploy List: " + undeploys . toString ( ) ) ; } boolean added = undeploys . add ( du ) ; if ( logger . isTraceEnabled ( ) ) { logger . trace ( "Added  " + du + " to running undeployments list = " + added ) ; logger . trace ( "Current Undeploy List: " + undeploys . toString ( ) ) ; } return added ;


signature:
public class SleeTransactionManagerImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . runtime . transaction . SleeTransactionManager # mandateTransaction ( ) */
public void mandateTransaction ( ) throws TransactionRequiredLocalException { } }

implementation: try { final Transaction tx = getTransaction ( ) ; if ( tx == null ) throw new TransactionRequiredLocalException ( "Transaction Mandatory" ) ; final int status = tx . getStatus ( ) ; if ( status != Status . STATUS_ACTIVE && status != Status . STATUS_MARKED_ROLLBACK ) { throw new IllegalStateException ( "There is no active tx, tx is in state: " + status ) ; } } catch ( SystemException e ) { throw new SLEEException ( e . getMessage ( ) , e ) ; }


signature:
public class SleeTransactionManagerImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . runtime . transaction . SleeTransactionManager # requireTransaction ( ) */
public boolean requireTransaction ( ) { } }

implementation: try { final Transaction tx = getTransaction ( ) ; if ( tx == null ) { begin ( ) ; return true ; } else { final int status = tx . getStatus ( ) ; if ( status != Status . STATUS_ACTIVE && status != Status . STATUS_MARKED_ROLLBACK ) { begin ( ) ; return true ; } } } catch ( NotSupportedException e ) { logger . error ( "Exception creating transaction" , e ) ; } catch ( SystemException e ) { logger . error ( "Caught SystemException in checking transaction" , e ) ; } return false ;


signature:
public class SleeTransactionManagerImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . runtime . transaction . SleeTransactionManager # requireTransactionEnd ( boolean , boolean ) */
public void requireTransactionEnd ( boolean terminateTx , boolean doRollback ) throws IllegalStateException , SecurityException , SystemException , RollbackException , HeuristicMixedException , HeuristicRollbackException { } }

implementation: if ( terminateTx ) { if ( doRollback ) { rollback ( ) ; } else { commit ( ) ; } } else { if ( doRollback ) { setRollbackOnly ( ) ; } }


signature:
public class SleeTransactionManagerImpl { /** * ( non - Javadoc )
 * @ see javax . slee . transaction . SleeTransactionManager # asyncCommit ( javax . slee . transaction . CommitListener ) */
public void asyncCommit ( CommitListener commitListener ) throws IllegalStateException , SecurityException { } }

implementation: if ( doTraceLogs ) { logger . trace ( "asyncCommit( commitListener = " + commitListener + " )" ) ; } try { final SleeTransaction sleeTransaction = getSleeTransaction ( ) ; if ( sleeTransaction == null ) { throw new IllegalStateException ( "no transaction" ) ; } else { sleeTransaction . asyncCommit ( commitListener ) ; } } catch ( SystemException e ) { if ( commitListener != null ) { commitListener . systemException ( e ) ; } }


signature:
public class SleeTransactionManagerImpl { /** * ( non - Javadoc )
 * @ see javax . slee . transaction . SleeTransactionManager # asyncRollback ( javax . slee . transaction . RollbackListener ) */
public void asyncRollback ( RollbackListener rollbackListener ) throws IllegalStateException , SecurityException { } }

implementation: if ( doTraceLogs ) { logger . trace ( "asyncRollback( rollbackListener = " + rollbackListener + " )" ) ; } try { final SleeTransaction sleeTransaction = getSleeTransaction ( ) ; if ( sleeTransaction == null ) { throw new IllegalStateException ( "no transaction" ) ; } else { sleeTransaction . asyncRollback ( rollbackListener ) ; } } catch ( SystemException e ) { if ( rollbackListener != null ) { rollbackListener . systemException ( e ) ; } }


signature:
public class SleeTransactionManagerImpl { /** * ( non - Javadoc )
 * @ see javax . slee . transaction . SleeTransactionManager # beginSleeTransaction ( ) */
public SleeTransaction beginSleeTransaction ( ) throws NotSupportedException , SystemException { } }

implementation:
// begin transaction
transactionManager . begin ( ) ; // get tx does the rest
return getAsSleeTransaction ( transactionManager . getTransaction ( ) , true ) ;


signature:
public class SleeTransactionManagerImpl { /** * ( non - Javadoc )
 * @ see javax . slee . transaction . SleeTransactionManager # asSleeTransaction ( javax . transaction . Transaction ) */
public SleeTransaction asSleeTransaction ( Transaction transaction ) throws NullPointerException , IllegalArgumentException , SystemException { } }

implementation: if ( transaction == null ) { throw new NullPointerException ( "null transaction" ) ; } if ( transaction . getClass ( ) == SleeTransactionImpl . class ) { return ( SleeTransaction ) transaction ; } if ( transaction instanceof TransactionImple ) { return new SleeTransactionImpl ( ( TransactionImple ) transaction , getTransactionContext ( ) , this ) ; } throw new IllegalArgumentException ( "unexpected transaction class type " + transaction . getClass ( ) ) ;


signature:
public class SleeTransactionManagerImpl { /** * ( non - Javadoc )
 * @ see javax . transaction . TransactionManager # commit ( ) */
public void commit ( ) throws RollbackException , HeuristicMixedException , HeuristicRollbackException , SecurityException , IllegalStateException , SystemException { } }

implementation: if ( doTraceLogs ) { logger . trace ( "Starting commit of tx " + transactionManager . getTransaction ( ) ) ; } transactionManager . commit ( ) ;


signature:
public class SleeTransactionManagerImpl { /** * ( non - Javadoc )
 * @ see javax . transaction . TransactionManager # resume ( javax . transaction . Transaction ) */
public void resume ( Transaction transaction ) throws InvalidTransactionException , IllegalStateException , SystemException { } }

implementation:
if ( transaction . getClass ( ) == SleeTransactionImpl . class ) { final SleeTransactionImpl sleeTransactionImpl = ( SleeTransactionImpl ) transaction ; if ( doTraceLogs ) { logger . trace ( "Resuming tx " + sleeTransactionImpl . getWrappedTransaction ( ) ) ; } // resume wrapped tx
transactionManager . resume ( sleeTransactionImpl . getWrappedTransaction ( ) ) ; // store tx context in thread
TransactionContextThreadLocal . setTransactionContext ( sleeTransactionImpl . getTransactionContext ( ) ) ; } else { throw new InvalidTransactionException ( ) ; }


signature:
public class SleeTransactionManagerImpl { /** * ( non - Javadoc )
 * @ see javax . transaction . TransactionManager # rollback ( ) */
public void rollback ( ) throws IllegalStateException , SecurityException , SystemException { } }

implementation: if ( doTraceLogs ) { logger . trace ( "Starting rollback of tx " + transactionManager . getTransaction ( ) ) ; } transactionManager . rollback ( ) ;


signature:
public class SleeTransactionManagerImpl { /** * ( non - Javadoc )
 * @ see javax . transaction . TransactionManager # setRollbackOnly ( ) */
public void setRollbackOnly ( ) throws IllegalStateException , SystemException { } }

implementation: if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Marking tx " + transactionManager . getTransaction ( ) + " for rollback." ) ; } transactionManager . setRollbackOnly ( ) ;


signature:
public class SleeTransactionManagerImpl { /** * ( non - Javadoc )
 * @ see javax . transaction . TransactionManager # suspend ( ) */
public Transaction suspend ( ) throws SystemException { } }

implementation:
if ( doTraceLogs ) { logger . trace ( "Suspending tx " + transactionManager . getTransaction ( ) ) ; } final Transaction tx = getAsSleeTransaction ( transactionManager . suspend ( ) , false ) ; if ( tx != null ) { // remove tx context from thread
TransactionContextThreadLocal . setTransactionContext ( null ) ; return tx ; } else { return null ; }


signature:
public class SleeTransactionManagerImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . runtime . transaction . SleeTransactionManager # getTransactionContext ( ) */
public TransactionContext getTransactionContext ( ) { } }

implementation:
TransactionContext txContext = TransactionContextThreadLocal . getTransactionContext ( ) ; if ( txContext == null ) { try { final Transaction tx = transactionManager . getTransaction ( ) ; if ( tx != null && tx . getStatus ( ) == Status . STATUS_ACTIVE ) { // a tx was started with the real tx manager , lets try to hook the sync handler and a new tx context
txContext = bindToTransaction ( tx ) ; } } catch ( Throwable e ) { throw new SLEEException ( e . getMessage ( ) , e ) ; } } return txContext ;


signature:
public class TransactionContextImpl { /** * Executes actions scheduled after commit succeeds */
protected void executeAfterCommitActions ( ) { } }

implementation: if ( afterCommitActions != null ) { if ( trace ) { logger . trace ( "Executing after commit actions" ) ; } executeActions ( afterCommitActions , trace ) ; afterCommitActions = null ; }


signature:
public class TransactionContextImpl { /** * Executes actions scheduled to run first after commit succeeds */
protected void executeAfterCommitPriorityActions ( ) { } }

implementation: if ( afterCommitPriorityActions != null ) { if ( trace ) { logger . trace ( "Executing after commit priority actions" ) ; } executeActions ( afterCommitPriorityActions , trace ) ; afterCommitPriorityActions = null ; }


signature:
public class TransactionContextImpl { /** * Executes actions scheduled for after a rollback */
protected void executeAfterRollbackActions ( ) { } }

implementation: if ( afterRollbackActions != null ) { if ( trace ) { logger . trace ( "Executing rollback actions" ) ; } executeActions ( afterRollbackActions , trace ) ; afterRollbackActions = null ; }


signature:
public class TransactionContextImpl { /** * Executes actions scheduled for before commit */
protected void executeBeforeCommitActions ( ) { } }

implementation: if ( beforeCommitActions != null ) { if ( trace ) { logger . trace ( "Executing before commit actions" ) ; } executeActions ( beforeCommitActions , trace ) ; beforeCommitActions = null ; }


signature:
public class TransactionContextImpl { /** * Executes actions scheduled for before commit at first */
protected void executeBeforeCommitPriorityActions ( ) { } }

implementation: if ( beforeCommitPriorityActions != null ) { if ( trace ) { logger . trace ( "Executing before commit priority actions" ) ; } executeActions ( beforeCommitPriorityActions , trace ) ; beforeCommitPriorityActions = null ; }


signature:
public class TracerStorage { /** * This method raturns tracer names of tracers that have been requested
 * directly from NotificationSource ( like through SbbContext , RAContext ,
 * etc )
 * @ return */
public String [ ] getRequestedTracerNames ( ) { } }

implementation: Set < String > names = new HashSet < String > ( ) ; for ( TracerImpl t : this . tracers . values ( ) ) { if ( t . isRequestedBySource ( ) ) names . add ( t . getTracerName ( ) ) ; } if ( names . isEmpty ( ) ) return new String [ 0 ] ; return names . toArray ( new String [ names . size ( ) ] ) ;


signature:
public class TracerStorage { /** * This method returns tracer names that have been defined explicitly via
 * setTraceLevel from TraceMBean
 * @ return */
public String [ ] getDefinedTracerNames ( ) { } }

implementation: Set < String > names = new HashSet < String > ( ) ; for ( TracerImpl t : this . tracers . values ( ) ) { if ( t . isExplicitlySetTracerLevel ( ) ) names . add ( t . getTracerName ( ) ) ; } if ( names . isEmpty ( ) ) return new String [ 0 ] ; return names . toArray ( new String [ names . size ( ) ] ) ;


signature:
public class TracerStorage { /** * This method can be called multiple times .
 * @ param tracerName
 * @ param requestedBySource
 * @ return */
public Tracer createTracer ( String tracerName , boolean requestedBySource ) { } }

implementation:
TracerImpl tparent = null ; TracerImpl t = tracers . get ( tracerName ) ; if ( t == null ) { String [ ] split = tracerName . split ( "\\." ) ; String currentName = "" ; for ( String s : split ) { if ( tparent == null ) { // first loop
tparent = rootTracer ; currentName = s ; } else { currentName = currentName + "." + s ; } t = tracers . get ( currentName ) ; if ( t == null ) { t = new TracerImpl ( currentName , tparent , this . notificationSource , this . traceFacility ) ; final TracerImpl u = tracers . putIfAbsent ( t . getTracerName ( ) , t ) ; if ( u != null ) { t = u ; } } tparent = t ; } } if ( requestedBySource ) t . setRequestedBySource ( requestedBySource ) ; return t ;


signature:
public class ActivityContextNamingFacilityImpl { /** * ( non - Javadoc )
 * @ see javax . slee . facilities . ActivityContextNamingFacility # bind ( javax . slee . ActivityContextInterface ,
 * java . lang . String ) */
public void bind ( ActivityContextInterface aci , String aciName ) throws NullPointerException , IllegalArgumentException , TransactionRequiredLocalException , NameAlreadyBoundException , FacilityException { } }

implementation:
// Check if we are in the context of a transaction .
sleeContainer . getTransactionManager ( ) . mandateTransaction ( ) ; if ( aciName == null ) throw new NullPointerException ( "null aci name" ) ; else if ( aciName . equals ( "" ) ) throw new IllegalArgumentException ( "empty name" ) ; else if ( aci == null ) throw new NullPointerException ( "Null ACI! " ) ; try { org . mobicents . slee . container . activity . ActivityContextInterface sleeAci = ( org . mobicents . slee . container . activity . ActivityContextInterface ) aci ; ActivityContext ac = sleeAci . getActivityContext ( ) ; ActivityContextHandle ach = ac . getActivityContextHandle ( ) ; cacheData . bindName ( ach , aciName ) ; ac . addNameBinding ( aciName ) ; if ( log . isDebugEnabled ( ) ) { log . debug ( "aci name " + aciName + " bound to " + ach + " . Tx is " + sleeContainer . getTransactionManager ( ) . getTransaction ( ) ) ; } } catch ( NameAlreadyBoundException ex ) { if ( log . isDebugEnabled ( ) ) { log . debug ( "name already bound " + aciName ) ; } throw ex ; } catch ( Exception e ) { throw new FacilityException ( "Failed to put ac name binding in cache" , e ) ; }


signature:
public class ActivityContextNamingFacilityImpl { /** * ( non - Javadoc )
 * @ see javax . slee . facilities . ActivityContextNamingFacility # unbind ( java . lang . String ) */
public void unbind ( String aciName ) throws NullPointerException , TransactionRequiredLocalException , NameNotBoundException , FacilityException { } }

implementation:
// Check if we are in the context of a transaction .
sleeContainer . getTransactionManager ( ) . mandateTransaction ( ) ; if ( aciName == null ) throw new NullPointerException ( "null activity context name!" ) ; try { ActivityContextHandle ach = ( ActivityContextHandle ) cacheData . unbindName ( aciName ) ; ActivityContext ac = sleeContainer . getActivityContextFactory ( ) . getActivityContext ( ach ) ; if ( ac != null ) ac . removeNameBinding ( aciName ) ; if ( log . isDebugEnabled ( ) ) { log . debug ( "aci name " + aciName + " unbound from " + ach + " . Tx is " + sleeContainer . getTransactionManager ( ) . getTransaction ( ) ) ; } } catch ( NameNotBoundException ex ) { if ( log . isDebugEnabled ( ) ) { log . debug ( "Name not bound " + aciName ) ; } throw ex ; } catch ( Exception e ) { throw new FacilityException ( "Failed to remove ac name binding from cache" , e ) ; }


signature:
public class ActivityContextNamingFacilityImpl { /** * ( non - Javadoc )
 * @ see javax . slee . facilities . ActivityContextNamingFacility # lookup ( java . lang . String ) */
public ActivityContextInterface lookup ( String acName ) throws NullPointerException , TransactionRequiredLocalException , FacilityException { } }

implementation: sleeContainer . getTransactionManager ( ) . mandateTransaction ( ) ; if ( acName == null ) throw new NullPointerException ( "null ac name" ) ; try { ActivityContextHandle ach = ( ActivityContextHandle ) cacheData . lookupName ( acName ) ; if ( log . isDebugEnabled ( ) ) { log . debug ( "lookup of aci name " + acName + " result is " + ach + " . Tx is " + sleeContainer . getTransactionManager ( ) . getTransaction ( ) ) ; } if ( ach == null ) { return null ; } ActivityContext ac = sleeContainer . getActivityContextFactory ( ) . getActivityContext ( ach ) ; if ( ac == null ) { cacheData . unbindName ( acName ) ; throw new FacilityException ( "name found but unable to retrieve activity context" ) ; } return ac . getActivityContextInterface ( ) ; } catch ( Exception e ) { throw new FacilityException ( "Failed to look-up ac name binding" , e ) ; }


signature:
public class ConcreteProfileMBeanGenerator { /** * Generates the Profile MBean interface
 * @ return the interface generated */
public void generateProfileMBeanInterface ( ) throws Exception { } }

implementation:
if ( SleeProfileClassCodeGenerator . checkCombination ( component ) == - 1 ) { throw new DeploymentException ( "Profile Specification doesn't match any combination " + "from the JSLEE spec 1.0 section 10.5.2" ) ; } String profileMBeanConcreteInterfaceName = cmpProfileInterfaceName + "MBean" ; profileMBeanConcreteInterface = pool . makeInterface ( profileMBeanConcreteInterfaceName ) ; try { cmpProfileInterface = pool . get ( cmpProfileInterfaceName ) ; profileManagementInterface = profileManagementInterfaceName != null ? pool . get ( profileManagementInterfaceName ) : null ; } catch ( NotFoundException nfe ) { throw new DeploymentException ( "Failed to locate CMP/Management Interface for " + component , nfe ) ; } // set interface
try { profileMBeanConcreteInterface . addInterface ( pool . get ( AbstractProfileMBean . class . getName ( ) ) ) ; } catch ( Throwable e ) { throw new SLEEException ( e . getMessage ( ) , e ) ; } // gather exceptions that the mbean methods may throw
CtClass [ ] managementMethodExceptions = new CtClass [ 3 ] ; try { managementMethodExceptions [ 0 ] = pool . get ( ManagementException . class . getName ( ) ) ; managementMethodExceptions [ 1 ] = pool . get ( InvalidStateException . class . getName ( ) ) ; managementMethodExceptions [ 2 ] = pool . get ( ProfileImplementationException . class . getName ( ) ) ; } catch ( NotFoundException e ) { throw new SLEEException ( e . getMessage ( ) , e ) ; } CtClass [ ] cmpGetAcessorMethodExceptions = new CtClass [ ] { managementMethodExceptions [ 0 ] } ; CtClass [ ] cmpSetAcessorMethodExceptions = new CtClass [ ] { managementMethodExceptions [ 0 ] , managementMethodExceptions [ 1 ] } ; // gather all Object class methods , we don ' t want those in the mbean
Set < CtMethod > objectMethods = new HashSet < CtMethod > ( ) ; try { CtClass objectClass = pool . get ( Object . class . getName ( ) ) ; for ( CtMethod ctMethod : objectClass . getMethods ( ) ) { objectMethods . add ( ctMethod ) ; } } catch ( NotFoundException e ) { throw new SLEEException ( e . getMessage ( ) , e ) ; } // gather methods to copy
Set < CtMethod > cmpAcessorMethods = new HashSet < CtMethod > ( ) ; Set < CtMethod > managementMethods = new HashSet < CtMethod > ( ) ; if ( profileManagementInterface != null ) { // If the Profile Specification defines a Profile Management Interface , the profileMBean interface has the same methods
// 1 . gather all methods from management interface
for ( CtMethod ctMethod : profileManagementInterface . getMethods ( ) ) { if ( ! objectMethods . contains ( ctMethod ) ) { managementMethods . add ( ctMethod ) ; } } // 2 . gather all methods present also in cmp interface , removing those from the ones gather from management interface
for ( CtMethod ctMethod : cmpProfileInterface . getMethods ( ) ) { if ( ! objectMethods . contains ( ctMethod ) ) { if ( managementMethods . remove ( ctMethod ) ) { cmpAcessorMethods . add ( ctMethod ) ; } } } } else { for ( CtMethod ctMethod : cmpProfileInterface . getMethods ( ) ) { if ( ! objectMethods . contains ( ctMethod ) ) { cmpAcessorMethods . add ( ctMethod ) ; } } } // copy cmp acessor & mngt methods
for ( CtMethod ctMethod : cmpAcessorMethods ) { // copy method
CtMethod methodCopy = new CtMethod ( ctMethod , profileMBeanConcreteInterface , null ) ; // set exceptions
CtClass [ ] exceptions = null ; if ( ctMethod . getName ( ) . startsWith ( "set" ) ) { exceptions = cmpSetAcessorMethodExceptions ; } else if ( ctMethod . getName ( ) . startsWith ( "get" ) ) { exceptions = cmpGetAcessorMethodExceptions ; } else { throw new DeploymentException ( "unexpected method in profile cmp interface " + ctMethod ) ; } methodCopy . setExceptionTypes ( exceptions ) ; // add to class
profileMBeanConcreteInterface . addMethod ( methodCopy ) ; // store in set to be used in mbean impl
mBeanCmpAcessorMethods . add ( methodCopy ) ; } for ( CtMethod ctMethod : managementMethods ) { // copy method
CtMethod methodCopy = new CtMethod ( ctMethod , profileMBeanConcreteInterface , null ) ; // set exceptions
methodCopy . setExceptionTypes ( managementMethodExceptions ) ; // add to class
profileMBeanConcreteInterface . addMethod ( methodCopy ) ; // store in set to be used in mbean impl
mBeanManagementMethods . add ( methodCopy ) ; } // write class file
try { profileMBeanConcreteInterface . writeFile ( this . component . getDeploymentDir ( ) . getAbsolutePath ( ) ) ; } catch ( Throwable e ) { throw new SLEEException ( e . getMessage ( ) , e ) ; } finally { profileMBeanConcreteInterface . defrost ( ) ; } // and load it to the component
try { this . component . setProfileMBeanConcreteInterfaceClass ( Thread . currentThread ( ) . getContextClassLoader ( ) . loadClass ( profileMBeanConcreteInterfaceName ) ) ; } catch ( Throwable e ) { throw new SLEEException ( e . getMessage ( ) , e ) ; }


signature:
public class ConcreteProfileMBeanGenerator { /** * This method generates concrete class of MBean impl */
public void generateProfileMBean ( ) throws Exception { } }

implementation:
if ( SleeProfileClassCodeGenerator . checkCombination ( component ) == - 1 ) { throw new DeploymentException ( "Profile Specification doesn't match any combination " + "from the JSLEE spec 1.0 section 10.5.2" ) ; } String profileMBeanConcreteClassName = profileMBeanConcreteInterface . getName ( ) + "Impl" ; profileMBeanConcreteClass = pool . makeClass ( profileMBeanConcreteClassName ) ; // set interface & super class
try { profileMBeanConcreteClass . setInterfaces ( new CtClass [ ] { profileMBeanConcreteInterface } ) ; profileMBeanConcreteClass . setSuperclass ( pool . get ( AbstractProfileMBeanImpl . class . getName ( ) ) ) ; } catch ( NotFoundException e ) { throw new SLEEException ( e . getMessage ( ) , e ) ; } // implement cmp acessor & management methods gather in the mbean interface building
for ( CtMethod method : mBeanCmpAcessorMethods ) { // copy method & remove abstract modifier
CtMethod newMethod = CtNewMethod . copy ( method , profileMBeanConcreteClass , null ) ; // generate body
String body = null ; if ( method . getName ( ) . startsWith ( "set" ) ) { body = "{ " + "	beforeSetCmpField();" + "	try { " + "		((" + component . getProfileCmpConcreteClass ( ) . getName ( ) + ")getProfileObject().getProfileConcrete())." + method . getName ( ) + "($1);" + "	} finally {" + "		afterSetCmpField();" + "	}" + "}" ; } else { body = "{ " + "	boolean activatedTransaction = beforeGetCmpField();" + "	try { " + "		return ($r) ((" + component . getProfileCmpConcreteClass ( ) . getName ( ) + ")getProfileObject().getProfileConcrete())." + method . getName ( ) + "();" + "	} finally {" + "		afterGetCmpField(activatedTransaction);" + "	}" + "}" ; } if ( logger . isTraceEnabled ( ) ) { logger . trace ( "Implemented profile mbean method named " + method . getName ( ) + ", with body:\n" + body ) ; } newMethod . setBody ( body ) ; profileMBeanConcreteClass . addMethod ( newMethod ) ; } for ( CtMethod method : mBeanManagementMethods ) { // copy method & remove abstract modifier
CtMethod newMethod = CtNewMethod . copy ( method , profileMBeanConcreteClass , null ) ; // generate body
boolean voidReturnType = newMethod . getReturnType ( ) . equals ( CtClass . voidType ) ; String body = "{ boolean activatedTransaction = beforeManagementMethodInvocation(); try { " ; if ( ! voidReturnType ) { body += "return ($r) " ; } body += "((" + component . getProfileCmpConcreteClass ( ) . getName ( ) + ")getProfileObject().getProfileConcrete())." + method . getName ( ) + "($$); } catch(Throwable t) { throwableOnManagementMethodInvocation(t); } finally { afterManagementMethodInvocation(activatedTransaction); }" ; if ( ! voidReturnType ) { body += "throw new " + SLEEException . class . getName ( ) + "(\"bad code generated\");" ; } body += " }" ; if ( logger . isTraceEnabled ( ) ) { logger . trace ( "Implemented profile mbean method named " + method . getName ( ) + ", with body:\n" + body ) ; } newMethod . setBody ( body ) ; profileMBeanConcreteClass . addMethod ( newMethod ) ; } try { profileMBeanConcreteClass . writeFile ( this . component . getDeploymentDir ( ) . getAbsolutePath ( ) ) ; } catch ( Throwable e ) { throw new SLEEException ( e . getMessage ( ) , e ) ; } finally { profileMBeanConcreteClass . defrost ( ) ; } try { component . setProfileMBeanConcreteImplClass ( Thread . currentThread ( ) . getContextClassLoader ( ) . loadClass ( profileMBeanConcreteClassName ) ) ; } catch ( Throwable e ) { throw new SLEEException ( e . getMessage ( ) , e ) ; }


signature:
public class FaultTolerantResourceAdaptorContextImpl { /** * ( non - Javadoc )
 * @ see
 * org . mobicents . slee . resource . cluster . FaultTolerantResourceAdaptorContext
 * # getReplicatedDataWithFailover ( boolean ) */
public ReplicatedDataWithFailover < K , V > getReplicatedDataWithFailover ( boolean activateDataRemovedCallback ) { } }

implementation: if ( replicatedDataWithFailover == null ) { replicatedDataWithFailover = new ReplicatedDataWithFailoverImpl < K , V > ( REPLICATED_DATA_WITH_FAILOVER_NAME , raEntity , sleeContainer . getCluster ( ) , ra , activateDataRemovedCallback ) ; } return replicatedDataWithFailover ;


signature:
public class FaultTolerantResourceAdaptorContextImpl { /** * ( non - Javadoc )
 * @ see
 * org . mobicents . slee . resource . cluster . FaultTolerantResourceAdaptorContext
 * # getReplicateData ( boolean ) */
public ReplicatedData < K , V > getReplicateData ( boolean activateDataRemovedCallback ) { } }

implementation: if ( replicatedData == null ) { replicatedData = new ReplicatedDataImpl < K , V > ( REPLICATED_DATA_NAME , raEntity , sleeContainer . getCluster ( ) , ra , activateDataRemovedCallback ) ; } return replicatedData ;


signature:
public class FaultTolerantResourceAdaptorContextImpl { /** * ( non - Javadoc )
 * @ see
 * org . mobicents . slee . resource . cluster . FaultTolerantResourceAdaptorContext
 * # getMembers ( ) */
public MemberAddress [ ] getMembers ( ) { } }

implementation: final Address [ ] addresses = sleeContainer . getCluster ( ) . getClusterMembers ( ) . toArray ( EMPTY_ADDRESS_ARRAY ) ; final MemberAddressImpl [ ] members = new MemberAddressImpl [ addresses . length ] ; for ( int i = 0 ; i < members . length ; i ++ ) { members [ i ] = new MemberAddressImpl ( addresses [ i ] ) ; } return members ;


signature:
public class FaultTolerantResourceAdaptorContextImpl { /** * ( non - Javadoc )
 * @ see
 * org . mobicents . slee . resource . cluster . FaultTolerantResourceAdaptorContext
 * # getLocalAddress ( ) */
public MemberAddress getLocalAddress ( ) { } }

implementation: Address localAddress = sleeContainer . getCluster ( ) . getLocalAddress ( ) ; return localAddress != null ? new MemberAddressImpl ( localAddress ) : null ;


signature:
public class FaultTolerantResourceAdaptorContextImpl { /** * Removes all replicated data */
public void removeReplicateData ( ) { } }

implementation: if ( replicatedDataWithFailover != null ) { replicatedDataWithFailover . remove ( ) ; replicatedDataWithFailover = null ; } if ( replicatedData != null ) { replicatedData . remove ( ) ; replicatedData = null ; }


signature:
public class SleePropertyEditorRegistrator { /** * Register the property editors for jboss jmx console , so non string SLEE api types can be used in specs mbeans methods as args */
public void register ( ) { } }

implementation: PropertyEditorManager . registerEditor ( ComponentID . class , ComponentIDPropertyEditor . class ) ; PropertyEditorManager . registerEditor ( EventTypeID . class , ComponentIDPropertyEditor . class ) ; PropertyEditorManager . registerEditor ( LibraryID . class , ComponentIDPropertyEditor . class ) ; PropertyEditorManager . registerEditor ( ProfileSpecificationID . class , ComponentIDPropertyEditor . class ) ; PropertyEditorManager . registerEditor ( ResourceAdaptorID . class , ComponentIDPropertyEditor . class ) ; PropertyEditorManager . registerEditor ( ResourceAdaptorTypeID . class , ComponentIDPropertyEditor . class ) ; PropertyEditorManager . registerEditor ( SbbID . class , ComponentIDPropertyEditor . class ) ; PropertyEditorManager . registerEditor ( ServiceID . class , ComponentIDPropertyEditor . class ) ; PropertyEditorManager . registerEditor ( ComponentID [ ] . class , ComponentIDArrayPropertyEditor . class ) ; PropertyEditorManager . registerEditor ( EventTypeID [ ] . class , ComponentIDArrayPropertyEditor . class ) ; PropertyEditorManager . registerEditor ( LibraryID [ ] . class , ComponentIDArrayPropertyEditor . class ) ; PropertyEditorManager . registerEditor ( ProfileSpecificationID [ ] . class , ComponentIDArrayPropertyEditor . class ) ; PropertyEditorManager . registerEditor ( ResourceAdaptorID [ ] . class , ComponentIDArrayPropertyEditor . class ) ; PropertyEditorManager . registerEditor ( ResourceAdaptorTypeID [ ] . class , ComponentIDArrayPropertyEditor . class ) ; PropertyEditorManager . registerEditor ( SbbID [ ] . class , ComponentIDArrayPropertyEditor . class ) ; PropertyEditorManager . registerEditor ( ServiceID [ ] . class , ComponentIDArrayPropertyEditor . class ) ; PropertyEditorManager . registerEditor ( DeployableUnitID . class , DeployableUnitIDPropertyEditor . class ) ; PropertyEditorManager . registerEditor ( Level . class , LevelPropertyEditor . class ) ; PropertyEditorManager . registerEditor ( TraceLevel . class , TraceLevelPropertyEditor . class ) ; PropertyEditorManager . registerEditor ( ConfigProperties . class , ConfigPropertiesPropertyEditor . class ) ; PropertyEditorManager . registerEditor ( NotificationSource . class , NotificationSourcePropertyEditor . class ) ; PropertyEditorManager . registerEditor ( Object . class , ObjectPropertyEditor . class ) ; PropertyEditorManager . registerEditor ( ServiceState . class , ServiceStatePropertyEditor . class ) ; PropertyEditorManager . registerEditor ( ResourceAdaptorEntityState . class , ResourceAdaptorEntityStatePropertyEditor . class ) ; PropertyEditorManager . registerEditor ( Address . class , AddressPropertyEditor . class ) ;


signature:
public class SleeComponentWithUsageParametersClassCodeGenerator { /** * Generates classes for a slee component , which defines usage parameters
 * @ param component
 * @ throws DeploymentException */
public void process ( SleeComponentWithUsageParametersInterface component ) throws DeploymentException { } }

implementation:
ClassPool classPool = component . getClassPool ( ) ; String deploymentDir = component . getDeploymentDir ( ) . getAbsolutePath ( ) ; Class < ? > usageParametersInterface = component . getUsageParametersInterface ( ) ; if ( usageParametersInterface != null ) { try { // generate the concrete usage param set class
component . setUsageParametersConcreteClass ( new ConcreteUsageParameterClassGenerator ( usageParametersInterface . getName ( ) , deploymentDir , classPool ) . generateConcreteUsageParameterClass ( ) ) ; if ( LOGGER . isDebugEnabled ( ) ) { LOGGER . debug ( "Generated usage parameter impl class for " + component ) ; } // generate the mbeans
new ConcreteUsageParameterMBeanGenerator ( component ) . generateConcreteUsageParameterMBean ( ) ; if ( LOGGER . isDebugEnabled ( ) ) { LOGGER . debug ( "Generated usage mbean (interface and impl) for " + component ) ; } } catch ( DeploymentException ex ) { throw ex ; } catch ( Exception ex ) { throw new DeploymentException ( "Failed to generate " + component + " usage parameter class" , ex ) ; } }


signature:
public class ComponentID { /** * Compare this component identifier with the specified component identifier
 * 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 .
 * Component ordering is determined by comparing the component identifier
 * attributes in the following order :
 * < ol >
 * < li > component type ( nb . any subclass of < code > ComponentID < / code > may
 * be safely compared without causing a < code > ClassCastException < / code > )
 * < li > component name
 * < li > component vendor
 * < li > component version
 * < / ol >
 * @ param thisClassName the class name of this component identifier .
 * @ param that the component identifier to compare this with .
 * @ return a negative integer , zero , or a positive integer if this component
 * identifier is considered less than , equal to , or greater than the
 * specified object .
 * @ see Comparable # compareTo ( Object ) */
protected final int compareTo ( String thisClassName , ComponentID that ) { } }

implementation: int typeComparison = thisClassName . compareTo ( that . getClassName ( ) ) ; if ( typeComparison != 0 ) return typeComparison ; int nameComparison = this . name . compareTo ( that . name ) ; if ( nameComparison != 0 ) return nameComparison ; int vendorComparison = this . vendor . compareTo ( that . vendor ) ; if ( vendorComparison != 0 ) return vendorComparison ; return this . version . compareTo ( that . version ) ;


signature:
public class ComponentID { /** * private */
private int rotateLeft ( int value , int bits ) { } }

implementation: long l = value & 0x00000000ffffffffL ; l <<= bits ; return ( int ) l | ( int ) ( l >> 32 ) ;


signature:
public class SbbObjectPoolManagementImpl { /** * Retrieves the object pool for the specified sbb and service .
 * @ param serviceID
 * @ param sbbID
 * @ return */
public SbbObjectPoolImpl getObjectPool ( ServiceID serviceID , SbbID sbbID ) { } }

implementation: return pools . get ( new ObjectPoolMapKey ( serviceID , sbbID ) ) ;


signature:
public class SbbObjectPoolManagementImpl { /** * Creates an object pool for the specified service and sbb . If a
 * transaction manager is used then , and if the tx rollbacks , the pool will
 * be removed .
 * @ param
 * @ param sleeTransactionManager */
public void createObjectPool ( final ServiceID serviceID , final SbbComponent sbbComponent , final SleeTransactionManager sleeTransactionManager ) { } }

implementation:
if ( logger . isTraceEnabled ( ) ) { logger . trace ( "Creating Pool for  " + serviceID + " and " + sbbComponent ) ; } createObjectPool ( serviceID , sbbComponent ) ; if ( sleeTransactionManager != null && sleeTransactionManager . getTransactionContext ( ) != 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 " + serviceID + " and " + sbbComponent ) ; } try { removeObjectPool ( serviceID , sbbComponent . getSbbID ( ) ) ; } catch ( Throwable e ) { logger . error ( "Failed to remove " + serviceID + " and " + sbbComponent + " object pool" , e ) ; } } } ; sleeTransactionManager . getTransactionContext ( ) . getAfterRollbackActions ( ) . add ( action ) ; }


signature:
public class SbbObjectPoolManagementImpl { /** * Removes the pool for the specified ids
 * @ param serviceID
 * @ param sbbID
 * @ throws Exception */
private void removeObjectPool ( final ServiceID serviceID , final SbbID sbbID ) { } }

implementation: ObjectPoolMapKey key = new ObjectPoolMapKey ( serviceID , sbbID ) ; final SbbObjectPoolImpl objectPool = pools . remove ( key ) ; if ( objectPool != null ) { try { objectPool . close ( ) ; } catch ( Exception e ) { logger . error ( "failed to close pool" , e ) ; } } if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Removed Pool for " + key ) ; }


signature:
public class ServiceActivityContextInterfaceFactoryImpl { /** * ( non - Javadoc )
 * @ see javax . slee . serviceactivity . ServiceActivityContextInterfaceFactory # getActivityContextInterface ( javax . slee . serviceactivity . ServiceActivity ) */
public ActivityContextInterface getActivityContextInterface ( ServiceActivity serviceActivityImpl ) throws NullPointerException , TransactionRequiredLocalException , UnrecognizedActivityException , FactoryException { } }

implementation: ActivityContextHandle ach = new ServiceActivityContextHandle ( new ServiceActivityHandleImpl ( ( ( ServiceActivityImpl ) serviceActivityImpl ) . getServiceID ( ) ) ) ; ActivityContext ac = sleeContainer . getActivityContextFactory ( ) . getActivityContext ( ach ) ; if ( ac == null ) { throw new UnrecognizedActivityException ( serviceActivityImpl ) ; } return ac . getActivityContextInterface ( ) ;


signature:
public class SleeEndpointEndActivityNotTransactedExecutor { /** * Executes a non transacted End Activity operation .
 * @ param handle
 * @ throws UnrecognizedActivityHandleException */
void execute ( final ActivityHandle handle ) throws UnrecognizedActivityHandleException { } }

implementation: final SleeTransaction tx = super . suspendTransaction ( ) ; try { sleeEndpoint . _endActivity ( handle , tx ) ; } finally { if ( tx != null ) { super . resumeTransaction ( tx ) ; } }


signature:
public class SleeEndpointImpl { /** * ( non - Javadoc )
 * @ seejavax . slee . resource . SleeEndpoint # startActivity ( javax . slee . resource .
 * ActivityHandle , java . lang . Object ) */
public void startActivity ( ActivityHandle handle , Object activity ) throws NullPointerException , IllegalStateException , ActivityAlreadyExistsException , StartActivityException , SLEEException { } }

implementation: startActivity ( handle , activity , ActivityFlags . NO_FLAGS ) ;


signature:
public class SleeEndpointImpl { /** * ( non - Javadoc )
 * @ seejavax . slee . resource . SleeEndpoint # startActivity ( javax . slee . resource .
 * ActivityHandle , java . lang . Object , int ) */
public void startActivity ( final ActivityHandle handle , Object activity , final int activityFlags ) throws NullPointerException , IllegalStateException , ActivityAlreadyExistsException , StartActivityException , SLEEException { } }

implementation: if ( doTraceLogs ) { logger . trace ( "startActivity( handle = " + handle + " , activity = " + activity + " , flags = " + activityFlags + " )" ) ; } checkStartActivityParameters ( handle , activity ) ; startActivityNotTransactedExecutor . execute ( handle , activityFlags , false ) ;


signature:
public class SleeEndpointImpl { /** * ( non - Javadoc )
 * @ see
 * javax . slee . resource . SleeEndpoint # startActivitySuspended ( javax . slee . resource
 * . ActivityHandle , java . lang . Object ) */
public void startActivitySuspended ( ActivityHandle handle , Object activity ) throws NullPointerException , IllegalStateException , TransactionRequiredLocalException , ActivityAlreadyExistsException , StartActivityException , SLEEException { } }

implementation: startActivitySuspended ( handle , activity , ActivityFlags . NO_FLAGS ) ;


signature:
public class SleeEndpointImpl { /** * ( non - Javadoc )
 * @ see
 * javax . slee . resource . SleeEndpoint # startActivitySuspended ( javax . slee . resource
 * . ActivityHandle , java . lang . Object , int ) */
public void startActivitySuspended ( ActivityHandle handle , Object activity , int activityFlags ) throws NullPointerException , IllegalStateException , TransactionRequiredLocalException , ActivityAlreadyExistsException , StartActivityException , SLEEException { } }

implementation:
if ( doTraceLogs ) { logger . trace ( "startActivitySuspended( handle = " + handle + " , activity = " + activity + " , flags = " + activityFlags + " )" ) ; } // need to check tx before doing out of tx scope activity start
txManager . mandateTransaction ( ) ; checkStartActivityParameters ( handle , activity ) ; startActivityNotTransactedExecutor . execute ( handle , activityFlags , true ) ;


signature:
public class SleeEndpointImpl { /** * ( non - Javadoc )
 * @ see
 * javax . slee . resource . SleeEndpoint # startActivityTransacted ( javax . slee . resource
 * . ActivityHandle , java . lang . Object , int ) */
public void startActivityTransacted ( ActivityHandle handle , Object activity , int activityFlags ) throws NullPointerException , IllegalStateException , TransactionRequiredLocalException , ActivityAlreadyExistsException , StartActivityException , SLEEException { } }

implementation:
if ( doTraceLogs ) { logger . trace ( "startActivityTransacted( handle = " + handle + " , activity = " + activity + " , flags = " + activityFlags + " )" ) ; } checkStartActivityParameters ( handle , activity ) ; // check tx state
txManager . mandateTransaction ( ) ; _startActivity ( handle , activityFlags , null ) ;


signature:
public class SleeEndpointImpl { /** * Checks the parameters of startActivity * methods
 * @ param handle
 * @ param activity
 * @ throws NullPointerException
 * @ throws IllegalStateException */
private void checkStartActivityParameters ( ActivityHandle handle , Object activity ) throws NullPointerException , IllegalStateException { } }

implementation:
// check args
if ( handle == null ) { throw new NullPointerException ( "null handle" ) ; } if ( activity == null ) { throw new NullPointerException ( "null activity" ) ; } // check ra state
if ( raEntity . getResourceAdaptorObject ( ) . getState ( ) != ResourceAdaptorObjectState . ACTIVE ) { throw new IllegalStateException ( "ra is in state " + raEntity . getResourceAdaptorObject ( ) . getState ( ) ) ; }


signature:
public class SleeEndpointImpl { /** * Start activity logic , independent of transaction management .
 * @ param handle
 * @ param activityFlags
 * @ param barrierTx
 * @ return */
ActivityContextHandle _startActivity ( ActivityHandle handle , int activityFlags , final SleeTransaction barrierTx ) { } }

implementation:
ActivityContext ac = null ; if ( raEntity . getHandleReferenceFactory ( ) != null && ! ActivityFlags . hasSleeMayMarshal ( activityFlags ) ) { final ActivityHandleReference reference = raEntity . getHandleReferenceFactory ( ) . createActivityHandleReference ( handle ) ; try { // create activity context with ref instead
ac = acFactory . createActivityContext ( new ResourceAdaptorActivityContextHandleImpl ( raEntity , reference ) , activityFlags ) ; } catch ( ActivityAlreadyExistsException e ) { throw e ; } catch ( RuntimeException e ) { raEntity . getHandleReferenceFactory ( ) . removeActivityHandleReference ( reference ) ; throw e ; } } else { // create activity context
ac = acFactory . createActivityContext ( new ResourceAdaptorActivityContextHandleImpl ( raEntity , handle ) , activityFlags ) ; } // suspend activity if needed
if ( barrierTx != null && ac != null ) { final ActivityEventQueueManager aeqm = ac . getLocalActivityContext ( ) . getEventQueueManager ( ) ; aeqm . createBarrier ( barrierTx ) ; TransactionalAction action = new TransactionalAction ( ) { public void execute ( ) { aeqm . removeBarrier ( barrierTx ) ; } } ; final TransactionContext tc = barrierTx . getTransactionContext ( ) ; tc . getAfterCommitActions ( ) . add ( action ) ; tc . getAfterRollbackActions ( ) . add ( action ) ; } return ac . getActivityContextHandle ( ) ;


signature:
public class SleeEndpointImpl { /** * End activity logic independent of transaction management .
 * @ param handle
 * @ param barrierTx
 * @ throws UnrecognizedActivityHandleException */
void _endActivity ( ActivityHandle handle , final SleeTransaction barrierTx ) throws UnrecognizedActivityHandleException { } }

implementation:
final ActivityContextHandle ach = new ResourceAdaptorActivityContextHandleImpl ( raEntity , handle ) ; // get ac
final ActivityContext ac = acFactory . getActivityContext ( ach ) ; if ( ac != null ) { // suspend activity if needed
if ( barrierTx != null ) { final ActivityEventQueueManager aeqm = ac . getLocalActivityContext ( ) . getEventQueueManager ( ) ; aeqm . createBarrier ( barrierTx ) ; TransactionalAction action = new TransactionalAction ( ) { public void execute ( ) { aeqm . removeBarrier ( barrierTx ) ; } } ; final TransactionContext tc = barrierTx . getTransactionContext ( ) ; tc . getAfterCommitActions ( ) . add ( action ) ; tc . getAfterRollbackActions ( ) . add ( action ) ; } // end the activity
ac . endActivity ( ) ; } else { throw new UnrecognizedActivityHandleException ( handle . toString ( ) ) ; }


signature:
public class SleeEndpointImpl { /** * ( non - Javadoc )
 * @ see
 * javax . slee . resource . SleeEndpoint # fireEvent ( javax . slee . resource . ActivityHandle
 * , javax . slee . resource . FireableEventType , java . lang . Object ,
 * javax . slee . Address , javax . slee . resource . ReceivableService ) */
public void fireEvent ( ActivityHandle handle , FireableEventType eventType , Object event , Address address , ReceivableService receivableService ) throws NullPointerException , UnrecognizedActivityHandleException , IllegalEventException , ActivityIsEndingException , FireEventException , SLEEException { } }

implementation: fireEvent ( handle , eventType , event , address , receivableService , EventFlags . NO_FLAGS , true ) ;


signature:
public class SleeEndpointImpl { /** * Checks that fire event methods can be invoked
 * @ param handle
 * @ param eventType
 * @ param event
 * @ throws NullPointerException
 * @ throws IllegalEventException
 * @ throws IllegalStateException */
private void checkFireEventPreconditions ( ActivityHandle handle , FireableEventType eventType , Object event ) throws NullPointerException , IllegalEventException , IllegalStateException { } }

implementation: if ( event == null ) throw new NullPointerException ( "event is null" ) ; if ( handle == null ) throw new NullPointerException ( "handle is null" ) ; if ( eventType == null ) { throw new NullPointerException ( "eventType is null" ) ; } final EventTypeComponent eventTypeComponent = componentRepository . getComponentByID ( eventType . getEventType ( ) ) ; if ( eventTypeComponent == null ) { throw new IllegalEventException ( "event type not installed (more on SLEE 1.1 specs 15.14.8)" ) ; } if ( ! eventTypeComponent . getEventTypeClass ( ) . isAssignableFrom ( event . getClass ( ) ) ) { throw new IllegalEventException ( "the class of the event object fired is not assignable to the event class of the event type (more on SLEE 1.1 specs 15.14.8) " ) ; } if ( eventType . getClass ( ) != FireableEventTypeImpl . class ) { throw new IllegalEventException ( "unknown implementation of FireableEventType" ) ; } if ( raEntity . getAllowedEventTypes ( ) != null && ! raEntity . getAllowedEventTypes ( ) . contains ( eventType . getEventType ( ) ) ) { throw new IllegalEventException ( "Resource Adaptor configured to not ignore ra type event checking and the event " + eventType . getEventType ( ) + " does not belongs to any of the ra types implemented by the resource adaptor" ) ; }


signature:
public class SleeEndpointImpl { /** * Event firing logic independent of transaction management .
 * @ param realHandle
 * @ param refHandle
 * @ param eventType
 * @ param event
 * @ param address
 * @ param receivableService
 * @ param eventFlags
 * @ param barrierTx
 * @ throws ActivityIsEndingException
 * @ throws SLEEException */
void _fireEvent ( ActivityHandle realHandle , ActivityHandle refHandle , FireableEventType eventType , Object event , Address address , ReceivableService receivableService , int eventFlags , final SleeTransaction barrierTx ) throws ActivityIsEndingException , SLEEException { } }

implementation:
final ActivityContextHandle ach = new ResourceAdaptorActivityContextHandleImpl ( raEntity , refHandle ) ; // get ac
final ActivityContext ac = acFactory . getActivityContext ( ach ) ; if ( ac == null ) { throw new UnrecognizedActivityHandleException ( "Unable to fire " + eventType . getEventType ( ) + " on activity handle " + realHandle + " , the handle is not mapped to an activity context" ) ; } else { // suspend activity if needed
if ( barrierTx != null ) { final ActivityEventQueueManager aeqm = ac . getLocalActivityContext ( ) . getEventQueueManager ( ) ; aeqm . createBarrier ( barrierTx ) ; TransactionalAction action = new TransactionalAction ( ) { public void execute ( ) { aeqm . removeBarrier ( barrierTx ) ; } } ; final TransactionContext tc = barrierTx . getTransactionContext ( ) ; tc . getAfterCommitActions ( ) . add ( action ) ; tc . getAfterRollbackActions ( ) . add ( action ) ; } final EventProcessingCallbacks callbacks = new EventProcessingCallbacks ( realHandle , eventType , event , address , receivableService , eventFlags , raEntity ) ; final EventProcessingSucceedCallback succeedCallback = EventFlags . hasRequestProcessingSuccessfulCallback ( eventFlags ) ? callbacks : null ; final EventProcessingFailedCallback failedCallback = EventFlags . hasRequestProcessingFailedCallback ( eventFlags ) ? callbacks : null ; final EventUnreferencedCallback unreferencedCallback = EventFlags . hasRequestEventReferenceReleasedCallback ( eventFlags ) ? callbacks : null ; ac . fireEvent ( eventType . getEventType ( ) , event , address , receivableService == null ? null : receivableService . getService ( ) , succeedCallback , failedCallback , unreferencedCallback ) ; }


signature:
public class SleeEndpointImpl { /** * ( non - Javadoc )
 * @ see
 * javax . slee . resource . SleeEndpoint # suspendActivity ( javax . slee . resource .
 * ActivityHandle ) */
public void suspendActivity ( ActivityHandle handle ) throws NullPointerException , TransactionRequiredLocalException , UnrecognizedActivityHandleException , SLEEException { } }

implementation: suspendActivity ( handle , true ) ;


signature:
public class SleeEndpointImpl { /** * ( non - Javadoc )
 * @ see
 * org . mobicents . slee . container . resource . SleeEndpoint # suspendReplicatedActivity
 * ( javax . slee . resource . ActivityHandle ) */
public void suspendReplicatedActivity ( ActivityHandle handle ) throws NullPointerException , TransactionRequiredLocalException , UnrecognizedActivityHandleException , SLEEException { } }

implementation: suspendActivity ( handle , false ) ;


signature:
public class ConcreteSbbLocalObjectGenerator { /** * Generate the Sbb Local Object Class
 * @ param sbbLocalObjectName
 * the name of the Sbb Local Object
 * @ return the concrete Sbb Local Object class implementing the Sbb Local
 * Object */
public Class generateSbbLocalObjectConcreteClass ( ) { } }

implementation:
// Generates the implements link
if ( logger . isTraceEnabled ( ) ) { logger . trace ( "generateSbbLocalObjectConcreteClass: sbbLocalObjectInterface = " + sbbLocalObjectName + " deployPath = " + deployPath ) ; } try { concreteSbbLocalObject = pool . makeClass ( ConcreteClassGeneratorUtils . SBB_LOCAL_OBJECT_CLASS_NAME_PREFIX + sbbLocalObjectName + ConcreteClassGeneratorUtils . SBB_LOCAL_OBJECT_CLASS_NAME_SUFFIX ) ; try { sleeSbbLocalObject = pool . get ( SbbLocalObjectImpl . class . getName ( ) ) ; sbbLocalObjectInterface = pool . get ( sbbLocalObjectName ) ; } catch ( NotFoundException nfe ) { nfe . printStackTrace ( ) ; String s = "Problem with pool " ; logger . error ( s , nfe ) ; throw new RuntimeException ( s , nfe ) ; } // This is our implementation interface .
CtClass concreteClassInterface ; try { concreteClassInterface = pool . get ( SbbLocalObjectConcrete . class . getName ( ) ) ; } catch ( NotFoundException nfe ) { nfe . printStackTrace ( ) ; String s = "Problem with the pool! " ; logger . error ( s , nfe ) ; throw new RuntimeException ( s , nfe ) ; } ConcreteClassGeneratorUtils . createInterfaceLinks ( concreteSbbLocalObject , new CtClass [ ] { sbbLocalObjectInterface , concreteClassInterface } ) ; // Generates an inheritance link to the slee implementation of the
// SbbLocalObject interface
ConcreteClassGeneratorUtils . createInheritanceLink ( concreteSbbLocalObject , sleeSbbLocalObject ) ; // Generates the methods to implement from the interface
Map interfaceMethods = ClassUtils . getInterfaceMethodsFromInterface ( sbbLocalObjectInterface ) ; generateConcreteMethods ( interfaceMethods , sbbAbstractClassName ) ; try { concreteSbbLocalObject . writeFile ( deployPath ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Concrete Class " + concreteSbbLocalObject . getName ( ) + " generated in the following path " + deployPath ) ; } } catch ( CannotCompileException e ) { String s = " Unexpected exception ! " ; logger . fatal ( s , e ) ; throw new RuntimeException ( s , e ) ; } catch ( IOException e ) { String s = "IO Exception!" ; logger . error ( s , e ) ; return null ; } // load the class
try { return Thread . currentThread ( ) . getContextClassLoader ( ) . loadClass ( concreteSbbLocalObject . getName ( ) ) ; } catch ( ClassNotFoundException e ) { logger . error ( "unable to load sbb local object impl class" , e ) ; return null ; } } finally { if ( this . concreteSbbLocalObject != null ) this . concreteSbbLocalObject . defrost ( ) ; }


signature:
public class ConcreteSbbLocalObjectGenerator { /** * Generates the concrete methods of the class
 * @ param interfaceMethods
 * the methods to implement coming from the
 * ActivityContextInterface developer
 * @ param sbbAbstractClassName */
private void generateConcreteMethods ( Map interfaceMethods , String sbbAbstractClassName ) { } }

implementation:
if ( interfaceMethods == null ) return ; Iterator it = interfaceMethods . values ( ) . iterator ( ) ; while ( it . hasNext ( ) ) { CtMethod interfaceMethod = ( CtMethod ) it . next ( ) ; if ( interfaceMethod == null ) return ; // The following methods are implemented in the superclass
if ( interfaceMethod . getName ( ) . equals ( "isIdentical" ) || interfaceMethod . getName ( ) . equals ( "equals" ) || interfaceMethod . getName ( ) . equals ( "hashCode" ) || interfaceMethod . getName ( ) . equals ( "getSbbPriority" ) || interfaceMethod . getName ( ) . equals ( "remove" ) || interfaceMethod . getName ( ) . equals ( "setSbbPriority" ) || interfaceMethod . getName ( ) . equals ( "getName" ) || interfaceMethod . getName ( ) . equals ( "getChildRelation" ) || interfaceMethod . getName ( ) . equals ( "getParent" ) ) continue ; String methodToAdd = "public " ; // Add the return type
boolean hasReturn = false ; CtClass returnType = null ; try { // There ' s probably a more elegant way to do this .
returnType = interfaceMethod . getReturnType ( ) ; if ( returnType . equals ( CtClass . voidType ) ) { methodToAdd += "void " ; } else { methodToAdd = methodToAdd . concat ( returnType . getName ( ) + " " ) ; hasReturn = true ; } } catch ( NotFoundException nfe ) { nfe . printStackTrace ( ) ; methodToAdd = methodToAdd + "void " ; } // Add the method name
methodToAdd += interfaceMethod . getName ( ) + "(" ; // Add the parameters
CtClass [ ] parameterTypes = null ; ; try { parameterTypes = interfaceMethod . getParameterTypes ( ) ; for ( int argNumber = 0 ; argNumber < parameterTypes . length ; argNumber ++ ) { methodToAdd = methodToAdd . concat ( parameterTypes [ argNumber ] . getName ( ) + " arg_" + argNumber ) ; if ( argNumber + 1 < parameterTypes . length ) methodToAdd = methodToAdd + "," ; } } catch ( NotFoundException nfe ) { nfe . printStackTrace ( ) ; throw new RuntimeException ( "unexpected Exception ! " , nfe ) ; } methodToAdd = methodToAdd + ") { " ; // We need to do this in a type neutral way !
methodToAdd += SbbConcrete . class . getName ( ) + " concrete = " + " getSbbEntity().getSbbObject().getSbbConcrete();" ; // These methods are delegated to superclass .
// Note the convoluted code here because finally is not supported
// yet by javaassist .
methodToAdd += "Object[] args = new Object [" + parameterTypes . length + "];" ; methodToAdd += "Class[] types = new Class [" + parameterTypes . length + "];" ; if ( parameterTypes != null && parameterTypes . length > 0 ) { for ( int argNumber = 0 ; argNumber < parameterTypes . length ; argNumber ++ ) { methodToAdd += "args[" + argNumber + "]  = " ; // Check if parameter type is primitive and add the wrapper
// types .
if ( parameterTypes [ argNumber ] . isPrimitive ( ) ) { CtClass ptype = parameterTypes [ argNumber ] ; if ( ptype . equals ( CtClass . intType ) ) { methodToAdd += "Integer.valueOf(" + "arg_" + argNumber + ");" ; } else if ( ptype . equals ( CtClass . booleanType ) ) { methodToAdd += "Boolean.valueOf(" + "arg_" + argNumber + ");" ; } else if ( ptype . equals ( CtClass . longType ) ) { methodToAdd += "Long.valueOf(" + "arg_" + argNumber + ");" ; } else if ( ptype . equals ( CtClass . shortType ) ) { methodToAdd += "Short.valueOf(" + "arg_" + argNumber + ");" ; } else if ( ptype . equals ( CtClass . floatType ) ) { methodToAdd += "Float.valueOf(" + "arg_" + argNumber + ");" ; } else if ( ptype . equals ( CtClass . doubleType ) ) { methodToAdd += "Double.valueOf(" + "arg_" + argNumber + ");" ; } else if ( ptype . equals ( CtClass . charType ) ) { methodToAdd += "Character.valueOf(" + "arg_" + argNumber + ");" ; } } else { methodToAdd += "arg_" + argNumber + ";" ; } } for ( int i = 0 ; i < parameterTypes . length ; i ++ ) { methodToAdd += "types[" + i + "] = " ; if ( parameterTypes [ i ] . isPrimitive ( ) ) { CtClass ptype = parameterTypes [ i ] ; if ( ptype . equals ( CtClass . intType ) ) { methodToAdd += "Integer.TYPE;" ; } else if ( ptype . equals ( CtClass . booleanType ) ) { methodToAdd += "Boolean.TYPE;" ; } else if ( ptype . equals ( CtClass . longType ) ) { methodToAdd += "Long.TYPE;" ; } else if ( ptype . equals ( CtClass . shortType ) ) { methodToAdd += "Short.TYPE;" ; } else if ( ptype . equals ( CtClass . floatType ) ) { methodToAdd += "Float.TYPE;" ; } else if ( ptype . equals ( CtClass . doubleType ) ) { methodToAdd += "Double.TYPE;" ; } else if ( ptype . equals ( CtClass . charType ) ) { methodToAdd += "Character.TYPE;" ; } } else { methodToAdd += parameterTypes [ i ] . getName ( ) + ".class; " ; } } } if ( hasReturn ) { methodToAdd += " return  " + "(" + returnType . getName ( ) + ")" ; } if ( returnType . isPrimitive ( ) ) { methodToAdd += "sbbLocalObjectInterceptor.invokeAndReturn" + returnType . getSimpleName ( ) + "(concrete," + "\"" + interfaceMethod . getName ( ) + "\"" + ", args, types); " ; } else { methodToAdd += "sbbLocalObjectInterceptor.invokeAndReturnObject(concrete," + "\"" + interfaceMethod . getName ( ) + "\"" + ", args, types );" ; } methodToAdd += "}" ; // Add the implementation code
if ( logger . isTraceEnabled ( ) ) { logger . trace ( "Method " + methodToAdd + " added" ) ; } CtMethod methodTest ; try { methodTest = CtNewMethod . make ( methodToAdd , concreteSbbLocalObject ) ; concreteSbbLocalObject . addMethod ( methodTest ) ; } catch ( CannotCompileException cce ) { cce . printStackTrace ( ) ; throw new RuntimeException ( "error generating method " , cce ) ; } }


signature:
public class AccessorOperation { /** * User should overide it to provide different name , for instance for boolean \ " is \ " prefix */
protected void makeGetter ( ) { } }

implementation: if ( fieldClass . equals ( boolean . class ) || fieldClass . equals ( Boolean . class ) ) { super . operationName = "is" + this . beanFieldName ; } else { super . operationName = "get" + this . beanFieldName ; }


signature:
public class AccessorOperation { /** * This method is called to convert optArg from string form , if no conversion is needed it should return passed object .
 * @ param optArg
 * @ return
 * @ throws NoSuchMethodException
 * @ throws SecurityException
 * @ throws InvocationTargetException
 * @ throws IllegalAccessException
 * @ throws InstantiationException
 * @ throws IllegalArgumentException
 * @ throws CommandException */
protected Object convert ( String optArg ) throws SecurityException , NoSuchMethodException , IllegalArgumentException , InstantiationException , IllegalAccessException , InvocationTargetException , CommandException { } }

implementation:
if ( fieldClass . isPrimitive ( ) ) { // TODO : to optimize , to rework new to valueOf
if ( fieldClass . equals ( int . class ) ) { return new Integer ( optArg ) ; } else if ( fieldClass . equals ( long . class ) ) { return new Long ( optArg ) ; } else if ( fieldClass . equals ( int . class ) ) { return new Integer ( optArg ) ; } else if ( fieldClass . equals ( byte . class ) ) { return new Byte ( optArg ) ; } else if ( fieldClass . equals ( short . class ) ) { return new Short ( optArg ) ; } else if ( fieldClass . equals ( float . class ) ) { return new Float ( optArg ) ; } else if ( fieldClass . equals ( double . class ) ) { return new Double ( optArg ) ; } else if ( fieldClass . equals ( boolean . class ) ) { return new Boolean ( optArg ) ; } else if ( fieldClass . equals ( char . class ) ) { return new Character ( optArg . charAt ( 0 ) ) ; } throw new CommandException ( "Unpredicted place. Please report." ) ; } else if ( isClassNumber ( ) ) { // Handle Long , Integer , . . , Boolean
Constructor < ? > con = fieldClass . getConstructor ( String . class ) ; return con . newInstance ( optArg ) ; } return optArg ;


signature:
public class ReplicatedDataImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . resource . cluster . ReplicatedData # getLocalKeyset ( ) */
public Set < K > getLocalKeyset ( ) { } }

implementation: Set < K > set = new HashSet < K > ( ) ; ReplicatedDataKeyClusteredCacheData < K , V > handleCacheData = null ; Address handleCacheDataClusterNode = null ; for ( K handle : cacheData . getAllKeys ( ) ) { handleCacheData = new ReplicatedDataKeyClusteredCacheData < K , V > ( cacheData , handle , cluster ) ; handleCacheDataClusterNode = handleCacheData . getClusterNodeAddress ( ) ; if ( handleCacheDataClusterNode == null || handleCacheDataClusterNode . equals ( cluster . getLocalAddress ( ) ) ) { set . add ( handle ) ; } } return Collections . unmodifiableSet ( set ) ;


signature:
public class ReplicatedDataImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . resource . cluster . ReplicatedData # put ( java . io . Serializable , java . io . Serializable ) */
public boolean put ( K key , V value ) { } }

implementation: final ReplicatedDataKeyClusteredCacheData < K , V > keyCacheData = new ReplicatedDataKeyClusteredCacheData < K , V > ( cacheData , key , cluster ) ; boolean created = keyCacheData . create ( ) ; if ( value != null ) { keyCacheData . setValue ( value ) ; } return created ;


signature:
public class ReplicatedDataImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . resource . cluster . ReplicatedData # get ( java . io . Serializable ) */
public V get ( K key ) { } }

implementation: final ReplicatedDataKeyClusteredCacheData < K , V > handleCacheData = new ReplicatedDataKeyClusteredCacheData < K , V > ( cacheData , key , cluster ) ; return handleCacheData . exists ( ) ? handleCacheData . getValue ( ) : null ;


signature:
public class ReplicatedDataImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . resource . cluster . ReplicatedData # contains ( java . io . Serializable ) */
public boolean contains ( K key ) { } }

implementation: return new ReplicatedDataKeyClusteredCacheData < K , V > ( cacheData , key , cluster ) . exists ( ) ;


signature:
public class ReplicatedDataImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . resource . cluster . ReplicatedData # remove ( java . io . Serializable ) */
public boolean remove ( K key ) { } }

implementation: return new ReplicatedDataKeyClusteredCacheData < K , V > ( cacheData , key , cluster ) . remove ( ) ;


signature:
public class TraceLevelFilter { /** * 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 TraceNotification } . */
public boolean isNotificationEnabled ( Notification notification ) { } }

implementation:
if ( ! ( notification instanceof TraceNotification ) ) return false ; if ( minLevel_10 != null ) { // SLEE 1.0 comparison
Level traceLevel = ( ( TraceNotification ) notification ) . getLevel ( ) ; return traceLevel != null && ! minLevel_10 . isHigherLevel ( traceLevel ) ; } else { // SLEE 1.1 comparison
TraceLevel traceLevel = ( ( TraceNotification ) notification ) . getTraceLevel ( ) ; return traceLevel != null && ! minLevel_11 . isHigherLevel ( traceLevel ) ; }


signature:
public class ProfileID { /** * Set the profile table and profile referenced by this profile identifier to new
 * values .
 * @ param profileTableName the name of the profile table .
 * @ param profileName the name of the profile within the profile table .
 * @ throws NullPointerException if either argument is < code > null < / code > .
 * @ throws IllegalArgumentException if < code > profileTableName < / code > includes the
 * ' < tt > / < / tt > ' character . This character is not permitted in profile table names . */
public final void setProfileID ( String profileTableName , String profileName ) throws NullPointerException , IllegalArgumentException { } }

implementation: if ( profileTableName == null ) throw new NullPointerException ( "profileTableName is null" ) ; if ( profileName == null ) throw new NullPointerException ( "profileName is null" ) ; if ( profileTableName . indexOf ( '/' ) >= 0 ) throw new IllegalArgumentException ( "profileTableName cannot contain the '/' character" ) ; this . profileTableName = profileTableName ; this . profileName = profileName ; this . address = null ;


signature:
public class ProfileID { /** * Get an < code > Address < / code > object containing the address form of the profile
 * identified by this profile identifier .
 * @ return an < code > Address < / code > object containing the address form of the profile
 * identified by this profile identifier . */
public Address toAddress ( ) { } }

implementation: if ( address == null ) { address = new Address ( AddressPlan . SLEE_PROFILE , profileTableName + '/' + profileName ) ; } return address ;


signature:
public class DefaultEventContextData { /** * ( non - Javadoc )
 * @ see
 * org . mobicents . slee . container . event . EventContextData # barrierEvent ( org .
 * mobicents . slee . container . event . EventContext ) */
public void barrierEvent ( EventContext eventContext ) { } }

implementation: if ( barriedEvents == null ) { barriedEvents = new LinkedList < EventContext > ( ) ; } barriedEvents . add ( eventContext ) ;


signature:
public class DefaultEventContextData { /** * ( non - Javadoc )
 * @ see
 * org . mobicents . slee . container . event . EventContextData # removeEventsBarried ( ) */
public EventContext [ ] removeEventsBarried ( ) { } }

implementation:
// this is safe because adding events and calling this is ever done by
// same executor / thread
final EventContext [ ] result = barriedEvents . toArray ( new EventContext [ barriedEvents . size ( ) ] ) ; barriedEvents = null ; return result ;


signature:
public class ActivityHashingEventRouterExecutorMapper { /** * ( non - Javadoc )
 * @ seeorg . mobicents . slee . runtime . eventrouter . mapping .
 * AbstractEventRouterExecutorMapper
 * # getExecutor ( org . mobicents . slee . runtime . activity . ActivityContextHandle ) */
@ Override public EventRouterExecutor getExecutor ( ActivityContextHandle activityContextHandle ) { } }

implementation: return executors [ ( activityContextHandle . hashCode ( ) & Integer . MAX_VALUE ) % executors . length ] ;


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

implementation: switch ( state ) { case SLEE_STOPPED : return STOPPED ; case SLEE_STARTING : return STARTING ; case SLEE_RUNNING : return RUNNING ; case SLEE_STOPPING : return STOPPING ; default : throw new IllegalArgumentException ( "Invalid state: " + state ) ; }


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

implementation: if ( state == null ) throw new NullPointerException ( "state is null" ) ; if ( state . equalsIgnoreCase ( STOPPED_STRING ) ) return STOPPED ; if ( state . equalsIgnoreCase ( STARTING_STRING ) ) return STARTING ; if ( state . equalsIgnoreCase ( RUNNING_STRING ) ) return RUNNING ; if ( state . equalsIgnoreCase ( STOPPING_STRING ) ) return STOPPING ; throw new IllegalArgumentException ( "Invalid state: " + state ) ;


signature:
public class DeployableUnitInstallPanel { /** * protected DeployableUnitsCard deployableUnitsCard ; */
private String extractMessage ( String result ) { } }

implementation:
// Fix :
// Firefox 2 encapsulates the text inside < pre > tag
String startPreTag = "<pre>" ; String endPreTag = "</pre>" ; result = result . trim ( ) ; if ( result . startsWith ( startPreTag ) && result . endsWith ( endPreTag ) ) { result = result . substring ( startPreTag . length ( ) , result . length ( ) - endPreTag . length ( ) ) ; } return result ;


signature:
public class AlarmThresholdFilter { /** * 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 AlarmNotification } . */
public boolean isNotificationEnabled ( Notification notification ) { } }

implementation:
if ( ! ( notification instanceof AlarmNotification ) ) return false ; synchronized ( knownAlarms ) { clearStaleTimeouts ( ) ; NotificationInfo info = ( NotificationInfo ) knownAlarms . get ( notification ) ; if ( info == null ) { // we ' ve not seen this alarm before , or the period has expired since
// the first notification
knownAlarms . put ( notification , new NotificationInfo ( System . currentTimeMillis ( ) ) ) ; return false ; } if ( ++ info . count == threshold ) { // passed threshold
knownAlarms . remove ( notification ) ; return true ; } return false ; }


signature:
public class AlarmThresholdFilter { /** * private */
private void clearStaleTimeouts ( ) { } }

implementation:
Iterator iterator = knownAlarms . values ( ) . iterator ( ) ; long currentTime = System . currentTimeMillis ( ) ; while ( iterator . hasNext ( ) ) { NotificationInfo info = ( NotificationInfo ) iterator . next ( ) ; // if period has expired remove reference to the notification
if ( ( info . firstSeenTime + period ) < currentTime ) { iterator . remove ( ) ; } }


signature:
public class ResourceManagementImpl { /** * Installs the specified { @ link ResourceAdaptorTypeComponent } in the container
 * @ param component
 * @ throws DeploymentException */
public void installResourceAdaptorType ( ResourceAdaptorTypeComponent component ) throws DeploymentException { } }

implementation:
if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Installing " + component ) ; } // generate code for aci factory
new ResourceAdaptorTypeClassCodeGenerator ( ) . process ( component ) ; // create instance of aci factory and store it in the
// component
if ( component . getActivityContextInterfaceFactoryConcreteClass ( ) != null ) { try { Constructor < ? > constructor = component . getActivityContextInterfaceFactoryConcreteClass ( ) . getConstructor ( new Class [ ] { SleeContainer . class , ResourceAdaptorTypeID . class } ) ; Object aciFactory = constructor . newInstance ( new Object [ ] { sleeContainer , component . getResourceAdaptorTypeID ( ) } ) ; component . setActivityContextInterfaceFactory ( aciFactory ) ; } catch ( Throwable e ) { throw new SLEEException ( "unable to create ra type aci factory instance" , e ) ; } } final ResourceAdaptorTypeID resourceAdaptorTypeID = component . getResourceAdaptorTypeID ( ) ; entitiesPerType . put ( resourceAdaptorTypeID , new HashSet < ResourceAdaptorEntity > ( ) ) ; TransactionalAction action = new TransactionalAction ( ) { public void execute ( ) { entitiesPerType . remove ( resourceAdaptorTypeID ) ; } } ; sleeContainer . getTransactionManager ( ) . getTransactionContext ( ) . getAfterRollbackActions ( ) . add ( action ) ;


signature:
public class ResourceManagementImpl { /** * Installs the specified { @ link ResourceAdaptorComponent } in the container
 * @ param component
 * @ throws DeploymentException */
public void installResourceAdaptor ( final ResourceAdaptorComponent component ) throws DeploymentException { } }

implementation:
if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Installing " + component ) ; } new ResourceAdaptorClassCodeGenerator ( ) . process ( component ) ; // if we are in cluster mode we need to add the RA class loader domain to the replication class loader
if ( ! sleeContainer . getCluster ( ) . getMobicentsCache ( ) . isLocalMode ( ) ) { final ReplicationClassLoader replicationClassLoader = sleeContainer . getReplicationClassLoader ( ) ; replicationClassLoader . addDomain ( component . getClassLoaderDomain ( ) ) ; final TransactionContext txContext = sleeContainer . getTransactionManager ( ) . getTransactionContext ( ) ; if ( txContext != null ) { TransactionalAction action = new TransactionalAction ( ) { public void execute ( ) { replicationClassLoader . removeDomain ( component . getClassLoaderDomain ( ) ) ; } } ; txContext . getAfterRollbackActions ( ) . add ( action ) ; } }


signature:
public class ResourceManagementImpl { /** * Uninstalls the specified { @ link ResourceAdaptorTypeComponent } from the container
 * @ param component */
public void uninstallResourceAdaptorType ( final ResourceAdaptorTypeComponent component ) { } }

implementation:
if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Uninstalling " + component ) ; } final ResourceAdaptorTypeID resourceAdaptorTypeID = component . getResourceAdaptorTypeID ( ) ; final TransactionContext txContext = sleeContainer . getTransactionManager ( ) . getTransactionContext ( ) ; TransactionalAction action1 = new TransactionalAction ( ) { public void execute ( ) { entitiesPerType . remove ( resourceAdaptorTypeID ) ; } } ; if ( txContext != null ) { txContext . getAfterCommitActions ( ) . add ( action1 ) ; } else { action1 . execute ( ) ; } // if we are in cluster mode we need to remove the RA class loader domain from the replication class loader
if ( ! sleeContainer . getCluster ( ) . getMobicentsCache ( ) . isLocalMode ( ) ) { final ReplicationClassLoader replicationClassLoader = sleeContainer . getReplicationClassLoader ( ) ; TransactionalAction action2 = new TransactionalAction ( ) { public void execute ( ) { replicationClassLoader . removeDomain ( component . getClassLoaderDomain ( ) ) ; } } ; if ( txContext != null ) { txContext . getAfterCommitActions ( ) . add ( action2 ) ; } else { action2 . execute ( ) ; } }


signature:
public class ResourceManagementImpl { /** * Uninstalls the specified { @ link ResourceAdaptorComponent } from the container
 * @ param component
 * @ throws DependencyException */
public void uninstallResourceAdaptor ( ResourceAdaptorComponent component ) throws DependencyException { } }

implementation: if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Uninstalling " + component ) ; } for ( ResourceAdaptorEntity raEntity : resourceAdaptorEntities . values ( ) ) { if ( raEntity . getResourceAdaptorID ( ) . equals ( component . getResourceAdaptorID ( ) ) ) { throw new DependencyException ( "can't uninstall " + component . getResourceAdaptorID ( ) + " since ra entity " + raEntity . getName ( ) + " refers it" ) ; } }


signature:
public class ChildRelationImpl { /** * The contains method . This method returns true if the SBB entity
 * represented by the SBB local object specified by the input argument is a
 * member of this child relation . If the method argument is not an SBB local
 * object , is an invalid SBB local object , or is an SBB local object whose
 * underlying SBB entity is not a member of this child relation , then this
 * method returns false . */
public boolean contains ( Object object ) { } }

implementation: if ( ! ( object instanceof SbbLocalObject ) ) return false ; final SbbLocalObjectImpl sbblocal = ( SbbLocalObjectImpl ) object ; final SbbEntityID sbbEntityId = sbblocal . getSbbEntityId ( ) ; if ( ! idBelongsToChildRelation ( sbbEntityId ) ) { return false ; } return new SbbEntityCacheData ( sbbEntityId , sleeContainer . getCluster ( ) . getMobicentsCache ( ) ) . exists ( ) ;


signature:
public class ChildRelationImpl { /** * ( non - Javadoc )
 * @ see java . util . Collection # clear ( ) */
@ SuppressWarnings ( "rawtypes" ) public void clear ( ) { } }

implementation: sleeContainer . getTransactionManager ( ) . mandateTransaction ( ) ; for ( Iterator it = iterator ( ) ; it . hasNext ( ) ; ) { it . next ( ) ; it . remove ( ) ; }


signature:
public class ChildRelationImpl { /** * Spec page 62 The remove methods : clear , remove , removeAll , and retainAll .
 * o These methods may remove SBB entities from the child relation . The
 * input argument specifies which SBB entities will be removed from the
 * child relation or retained in the child relation by specifying the SBB
 * local object or collection of SBB local objects that represent the SBB
 * entities to be removed or retained . o Removing an SBB entity from a child
 * relation initiates a cascading removal of the SBB entity tree rooted by
 * the SBB entity , similar to invoking the remove method on an SBB local
 * object that represents the SBB entity . */
public boolean remove ( Object object ) { } }

implementation: sleeContainer . getTransactionManager ( ) . mandateTransaction ( ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "removing sbb local object " + object ) ; } if ( object == null ) throw new NullPointerException ( "Null arg for remove " ) ; if ( ! ( object instanceof SbbLocalObject ) ) return false ; final SbbLocalObjectImpl sbbLocalObjectImpl = ( SbbLocalObjectImpl ) object ; if ( ! idBelongsToChildRelation ( sbbLocalObjectImpl . getSbbEntityId ( ) ) && ! sbbLocalObjectImpl . getSbbEntity ( ) . isRemoved ( ) ) { return false ; } else { sbbLocalObjectImpl . remove ( ) ; return true ; }


signature:
public class ChildRelationImpl { /** * This method returns true if all SBB entities represented by the SBB local
 * objects in the collection specified by the input argument are members of
 * this child relation . If the collection contains an object that is not an
 * SBB local object , an SBB local object that is invalid , or an SBB local
 * object whose underlying SBB entity is not a member of this child
 * relation , then this method returns false . */
@ SuppressWarnings ( "rawtypes" ) public boolean containsAll ( Collection c ) { } }

implementation: if ( c == null ) throw new NullPointerException ( "null collection!" ) ; for ( Iterator it = c . iterator ( ) ; it . hasNext ( ) ; ) { if ( ! contains ( it . next ( ) ) ) { return false ; } } if ( logger . isDebugEnabled ( ) ) { logger . debug ( "containsAll : collection = " + c + " > all in child relation" ) ; } return true ;


signature:
public class ChildRelationImpl { /** * Removing an SBB entity from a child relation initiates a cascading
 * removal of the SBB entity tree rooted by the SBB entity , similar to
 * invoking the remove method on an SBB local object that represents the SBB
 * entity . */
@ SuppressWarnings ( "rawtypes" ) public boolean removeAll ( Collection c ) { } }

implementation: boolean flag = true ; if ( c == null ) throw new NullPointerException ( " null collection ! " ) ; for ( Iterator it = c . iterator ( ) ; it . hasNext ( ) ; ) { flag &= this . remove ( it . next ( ) ) ; } return flag ;


signature:
public class ChildRelationImpl { /** * ( non - Javadoc )
 * @ see java . util . Collection # retainAll ( java . util . Collection ) */
@ SuppressWarnings ( "rawtypes" ) public boolean retainAll ( Collection c ) { } }

implementation: boolean flag = false ; if ( c == null ) throw new NullPointerException ( " null arg! " ) ; for ( Iterator it = this . iterator ( ) ; it . hasNext ( ) ; ) { if ( ! c . contains ( it . next ( ) ) ) { flag = true ; it . remove ( ) ; } } return flag ;


signature:
public class ChildRelationImpl { /** * ( non - Javadoc )
 * @ see java . util . Collection # toArray ( java . lang . Object [ ] ) */
@ SuppressWarnings ( { } }

implementation: "rawtypes" , "unchecked" } ) public Object [ ] toArray ( Object [ ] a ) { if ( a == null ) throw new NullPointerException ( "null arg!" ) ; HashSet localObjects = this . getLocalObjects ( ) ; return localObjects . toArray ( a ) ;


signature:
public class ChildRelationImpl { /** * extension methods */
private void validateChildName ( String childName ) throws IllegalArgumentException , NullPointerException { } }

implementation: if ( childName == null ) { throw new NullPointerException ( "null child name" ) ; } if ( childName . isEmpty ( ) ) { throw new IllegalArgumentException ( "empty child name" ) ; }


signature:
public class SleeCommand { /** * ( non - Javadoc )
 * @ see
 * org . mobicents . slee . tools . twiddle . AbstractSleeCommand # processArguments
 * ( java . lang . String [ ] ) */
@ Override protected void processArguments ( String [ ] args ) throws CommandException { } }

implementation:
String sopts = ":rsdi" ; LongOpt [ ] lopts = { new LongOpt ( "start" , LongOpt . NO_ARGUMENT , null , 'r' ) , new LongOpt ( "stopt" , LongOpt . NO_ARGUMENT , null , 's' ) , new LongOpt ( "shutdown" , LongOpt . NO_ARGUMENT , null , 'd' ) , new LongOpt ( "info" , LongOpt . NO_ARGUMENT , null , 'i' ) , } ; Getopt getopt = new Getopt ( null , args , sopts , lopts ) ; // getopt . setOpterr ( false ) ;
int code ; while ( ( code = getopt . getopt ( ) ) != - 1 ) { switch ( code ) { case ':' : throw new CommandException ( "Option requires an argument: " + args [ getopt . getOptind ( ) - 1 ] ) ; case '?' : throw new CommandException ( "Invalid (or ambiguous) option: " + args [ getopt . getOptind ( ) - 1 ] ) ; case 'r' : super . operation = new StartOperation ( super . context , super . log , this ) ; super . operation . buildOperation ( getopt , args ) ; break ; case 's' : super . operation = new StopOperation ( super . context , super . log , this ) ; super . operation . buildOperation ( getopt , args ) ; break ; case 'd' : super . operation = new ShutdownOperation ( super . context , super . log , this ) ; super . operation . buildOperation ( getopt , args ) ; break ; case 'i' : super . operation = new InfoOperation ( super . context , super . log , this ) ; super . operation . buildOperation ( getopt , args ) ; break ; default : throw new CommandException ( "Command: \"" + getName ( ) + "\", found unexpected opt: " + args [ getopt . getOptind ( ) - 1 ] ) ; } }


signature:
public class FailureReason { /** * Get a < code > FailureReason < / code > object from an integer value .
 * This method returns the singleton objects for the failure reasons defined in
 * this class . For all vendor - defined reason codes ( those greater than 0 in value ) ,
 * a non - unique < code > FailureReason < / code > object is return encapsulating that value .
 * @ param reason the reason as an integer .
 * @ return a < code > FailureReason < / code > object corresponding to < code > reason < / code > .
 * @ throws IllegalArgumentException if < code > reason < / code > is less that 0 and does not
 * correspond to a SLEE - defined reason code . */
public static FailureReason fromInt ( int reason ) throws IllegalArgumentException { } }

implementation: switch ( reason ) { case REASON_OTHER_REASON : return OTHER_REASON ; case REASON_EVENT_QUEUE_FULL : return EVENT_QUEUE_FULL ; case REASON_EVENT_QUEUE_TIMEOUT : return EVENT_QUEUE_TIMEOUT ; case REASON_SYSTEM_OVERLOAD : return SYSTEM_OVERLOAD ; case REASON_EVENT_MARSHALING_ERROR : return EVENT_MARSHALING_ERROR ; case REASON_FIRING_TRANSACTION_ROLLED_BACK : return FIRING_TRANSACTION_ROLLED_BACK ; default : if ( reason > 0 ) return new FailureReason ( reason ) ; else throw new IllegalArgumentException ( "Invalid failure reason: " + reason ) ; }


signature:
public class SubsystemNotification { /** * Get a JMX Object Name property string that uniquely identifies the specified SLEE
 * internal component or subsystem , suitable for inclusion in the Object Name of a Usage
 * MBean . This method makes use of the { @ link javax . management . ObjectName # quote } < / code >
 * method to ensure that the name is valid for inclusion as property values in an Object
 * Name .
 * This method can be used as follows to manually construct a complete Object Name
 * for a Usage MBean :
 * < br > < ul > < code >
 * ObjectName name = new ObjectName ( < br >
 * & nbsp ; & nbsp ; & nbsp ; & nbsp ; { @ link javax . slee . usage . UsageMBean # BASE _ OBJECT _ NAME } + " , " + < br >
 * & nbsp ; & nbsp ; & nbsp ; & nbsp ; { @ link javax . slee . usage . UsageMBean # USAGE _ PARAMETER _ SET _ NAME _ KEY } + " = " + ObjectName . quote ( paramSetName ) + " , " & nbsp ; / / optional < br >
 * & nbsp ; & nbsp ; & nbsp ; & nbsp ; { @ link javax . slee . usage . UsageMBean # NOTIFICATION _ SOURCE _ KEY } + " = " + { @ link # USAGE _ NOTIFICATION _ TYPE SubsystemNotification . USAGE _ NOTIFICATION _ TYPE } + " , " + < br >
 * & nbsp ; & nbsp ; & nbsp ; & nbsp ; { @ link # getUsageMBeanProperties ( String ) SubsystemNotification . getUsageMBeanProperties ( subsystemName ) } < br >
 * < / code > < / ul >
 * @ param subsystemName the name of the SLEE internal component or subsystem .
 * @ return an Object Name property string that uniquely identifies the specified
 * internal component or subsystem .
 * @ throws NullPointerException if < code > subsystem < / code > is < code > null < / code > . */
public static String getUsageMBeanProperties ( String subsystemName ) { } }

implementation: if ( subsystemName == null ) throw new NullPointerException ( "subsystemName is null" ) ; return SUBSYSTEM_NAME_KEY + '=' + ObjectName . quote ( subsystemName ) ;


signature:
public class SubsystemNotification { /** * 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 > SubsystemNotification < / code > , order is
 * determined by comparing the encapsulated subsystem 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 SubsystemNotification ) { // compare the profile table name
SubsystemNotification that = ( SubsystemNotification ) obj ; return this . subsystemName . compareTo ( that . subsystemName ) ; } else { return super . compareTo ( TYPE , obj ) ; }


signature:
public class ProfileEntityArrayAttributeValue { /** * Stores the attr value , converting and storing in the string field of the
 * entity
 * @ param attrValue */
public void setBoolean ( Boolean attrValue ) { } }

implementation: if ( attrValue != null ) { setString ( attrValue . toString ( ) ) ; } else { setString ( null ) ; }


signature:
public class ProfileEntityArrayAttributeValue { /** * Stores the attr value , converting and storing in the string field of the
 * entity
 * @ param attrValue */
public void setByte ( Byte attrValue ) { } }


signature:
public class ProfileEntityArrayAttributeValue { /** * Stores the attr value , converting and storing in the string field of the
 * entity
 * @ param attrValue */
public void setCharacter ( Character attrValue ) { } }


signature:
public class ProfileEntityArrayAttributeValue { /** * Stores the attr value , converting and storing in the string field of the
 * entity
 * @ param attrValue */
public void setDouble ( Double attrValue ) { } }