signature:
public class ProfileManagementImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . container . management . ProfileManagement # getProfileTable ( java . lang . String ) */
public ProfileTableImpl getProfileTable ( String profileTableName ) throws NullPointerException , UnrecognizedProfileTableNameException { } }

implementation:
if ( profileTableName == null ) throw new NullPointerException ( "profile table name is null" ) ; ProfileTableImpl profileTable = null ; if ( sleeContainer . getCluster ( ) . getMobicentsCache ( ) . isLocalMode ( ) ) { // no replication , table may only exist in local resources
profileTable = profileTablesLocalObjects . get ( profileTableName ) ; if ( profileTable == null ) { throw new UnrecognizedProfileTableNameException ( profileTableName ) ; } } else { if ( ! profileTableFramework . getConfiguration ( ) . isClusteredProfiles ( ) ) { // profiles are not clustered , table may only exist in local resources
profileTable = profileTablesLocalObjects . get ( profileTableName ) ; if ( profileTable == null ) { throw new UnrecognizedProfileTableNameException ( ) ; } } else { // profiles are clustered , table may exist " remotely " and not in local resources , due to runtime creation in another cluster node , we need to go to database first
final ProfileSpecificationID profileSpecificationID = profileTableFramework . getProfileSpecificationID ( profileTableName ) ; if ( profileSpecificationID != null ) { // exists in database
profileTable = profileTablesLocalObjects . get ( profileTableName ) ; if ( profileTable == null ) { // local resource does not exists , create it
ProfileSpecificationComponent component = sleeContainer . getComponentRepository ( ) . getComponentByID ( profileSpecificationID ) ; if ( component != null ) { profileTable = addProfileTableLocally ( createProfileTableInstance ( profileTableName , component ) , false , false ) ; } } } else { // does not exists in database , ensure it is not in local objects
profileTablesLocalObjects . remove ( profileTableName ) ; } } } if ( profileTable == null ) throw new UnrecognizedProfileTableNameException ( ) ; else return profileTable ;


signature:
public class LazyStoredEventContext { /** * / * ( non - Javadoc )
 * @ see org . mobicents . slee . container . event . EventContext # getEventContextHandle ( ) */
public EventContextHandle getEventContextHandle ( ) { } }

implementation: if ( handle == null ) { handle = new EventContextHandleImpl ( factory . getSleeContainer ( ) . getUuidGenerator ( ) . createUUID ( ) ) ; factory . getDataSource ( ) . addEventContext ( handle , this ) ; } return handle ;


signature:
public class SleeProfileClassCodeGenerator { /** * Check which combination ( see JSLEE 1.0 spec section 10.5.2 ) matches the
 * Sbb Developer ' s Profile Specification
 * @ param profileCMPInterfaceName
 * name of the Profile CMP interface
 * @ param profileManagementInterfaceName
 * name of the Profile Management interface
 * @ param profileManagementAbstractClassName
 * name of the Profile Management Abstract class
 * @ return the number of the combination ( see JSLEE 1.0 spec section 10.5.2
 * or 10.5.1.2 in JSLEE 1.1 spec ) , - 1 if it doesn ' t match no
 * combination < br >
 * < ul >
 * < li > < b > 1 < / b > - all cmp fields are exposed to management client and SLEE components ( for SLEE as read only ) , no managemetn methods < / li >
 * < li > < b > 2 < / b > - ony double defined CMP accessors and management methods are visible < / li >
 * < li > < b > 3 < / b > < / li >
 * < li > < b > 4 < / b > < / li >
 * < li > < b > - 1 < / b > - when error occurs , no definitions < / li >
 * < / ul > */
public static int checkCombination ( ProfileSpecificationComponent component ) { } }

implementation:
Object profileCmpInterface = component . getDescriptor ( ) . getProfileCMPInterface ( ) ; Object profileManagementInterface = component . getDescriptor ( ) . getProfileManagementInterface ( ) ; Object profileManagementAbstractClass = component . getDescriptor ( ) . getProfileAbstractClass ( ) ; // Object profileManagementLocalObjectInterface = compoenent . getDescriptor ( ) . getProfileLocalInterface ( ) ;
// if the Profile Specification has no Profile CMP interface , it is incorrect
if ( profileCmpInterface == null ) return - 1 ; // if ( compoenent . isSlee11 ( ) ) {
// if ( profileCmpInterface ! = null & & profileManagementLocalObjectInterface ! = null & & profileManagementAbstractClass ! = null )
// return 4;
// if ( profileCmpInterface ! = null & & profileManagementAbstractClass ! = null )
// return 3;
// if ( profileCmpInterface ! = null & & profileManagementLocalObjectInterface ! = null )
// return 2;
// return 1;
// else
if ( profileCmpInterface != null && profileManagementInterface != null && profileManagementAbstractClass != null ) return 4 ; if ( profileCmpInterface != null && profileManagementAbstractClass != null ) return 3 ; if ( profileCmpInterface != null && profileManagementInterface != null ) return 2 ; return 1 ;


signature:
public class SbbLocalObjectImpl { /** * Validates an invocation of the { @ link SbbLocalObject } .
 * @ throws TransactionRolledbackLocalException
 * @ throws NoSuchObjectLocalException
 * @ throws SLEEException */
private void validateInvocation ( ) throws TransactionRolledbackLocalException , NoSuchObjectLocalException , SLEEException { } }

implementation:
// validate tx
sleeContainer . getTransactionManager ( ) . mandateTransaction ( ) ; // validate object
if ( this . rollbackOnly ) { try { sleeContainer . getTransactionManager ( ) . setRollbackOnly ( ) ; } catch ( SystemException ex ) { throw new SLEEException ( "unable to set rollbackOnly in transaction manager" , ex ) ; } throw new TransactionRolledbackLocalException ( "Unable to proceed, transaction is set to rollback" ) ; } if ( this . isRemoved ) throw new NoSuchObjectLocalException ( "sbb local object is removed" ) ;


signature:
public class SbbLocalObjectImpl { /** * ( non - Javadoc )
 * @ see javax . slee . SbbLocalObject # isIdentical ( javax . slee . SbbLocalObject ) */
public boolean isIdentical ( javax . slee . SbbLocalObject obj ) throws TransactionRequiredLocalException , SLEEException { } }

implementation: validateInvocation ( ) ; return this . equals ( obj ) ;


signature:
public class SbbLocalObjectImpl { /** * ( non - Javadoc )
 * @ see javax . slee . SbbLocalObject # remove ( ) */
public void remove ( ) throws TransactionRequiredLocalException , NoSuchObjectLocalException , SLEEException { } }

implementation:
if ( trace ) logger . trace ( "remove()" ) ; validateInvocation ( ) ; if ( ! sbbEntity . isReentrant ( ) && sleeContainer . getTransactionManager ( ) . getTransactionContext ( ) . getInvokedNonReentrantSbbEntities ( ) . contains ( sbbEntity . getSbbEntityId ( ) ) ) throw new SLEEException ( " re-entrancy not allowed " ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "nonSleeInitiatedCascadingRemoval : " + sbbEntity . getSbbId ( ) + " entityID = " + sbbEntity . getSbbEntityId ( ) ) ; } try { sleeContainer . getSbbEntityFactory ( ) . removeSbbEntity ( sbbEntity , false ) ; } catch ( Throwable e ) { throw new SLEEException ( "Removal of the sbb entity failed" , e ) ; } try { if ( sleeContainer . getTransactionManager ( ) . getRollbackOnly ( ) ) { final TransactionContext txContext = sleeContainer . getTransactionManager ( ) . getTransactionContext ( ) ; EventRoutingTransactionData ertd = txContext . getEventRoutingTransactionData ( ) ; txContext . getAfterRollbackActions ( ) . add ( new RolledBackAction ( sbbEntity . getSbbEntityId ( ) , ertd . getEventBeingDelivered ( ) . getEvent ( ) , ertd . getAciReceivingEvent ( ) , true ) ) ; } } catch ( Exception e ) { throw new SLEEException ( "Failed to check and possibly set rollback context of entity " + sbbEntity . getSbbEntityId ( ) , e ) ; } // I Think this should set isRemoved only to true but then test 323
// will fail .
// Ralf : see above
this . rollbackOnly = true ; this . isRemoved = true ;


signature:
public class SbbLocalObjectImpl { /** * ( non - Javadoc )
 * @ see javax . slee . SbbLocalObject # setSbbPriority ( byte ) */
public void setSbbPriority ( byte priority ) throws TransactionRequiredLocalException , NoSuchObjectLocalException , SLEEException { } }

implementation: if ( trace ) logger . trace ( "setSbbPriority( priority = " + priority + " )" ) ; validateInvocation ( ) ; sbbEntity . setPriority ( priority ) ;


signature:
public class DeployableUnitJarComponentBuilder { /** * Builds the DU component from a jar with the specified file name ,
 * contained in the specified DU jar file . The component is built in the
 * specified deployment dir .
 * @ param componentJarFileName
 * @ param deployableUnitJar
 * @ param deploymentDir
 * @ param documentBuilder
 * @ return
 * @ throws DeploymentException */
@ SuppressWarnings ( "deprecation" ) public List < AbstractSleeComponent > buildComponents ( String componentJarFileName , JarFile deployableUnitJar , File deploymentDir ) throws DeploymentException { } }

implementation:
// extract the component jar from the DU jar , to the temp du dir
File extractedFile = extractFile ( componentJarFileName , deployableUnitJar , deploymentDir ) ; JarFile componentJarFile = null ; try { componentJarFile = new JarFile ( extractedFile ) ; } catch ( IOException e ) { throw new DeploymentException ( "failed to create jar file for extracted file " + extractedFile ) ; } InputStream componentDescriptorInputStream = null ; List < AbstractSleeComponent > components = new ArrayList < AbstractSleeComponent > ( ) ; try { // now extract the jar file to a new dir
File componentJarDeploymentDir = new File ( deploymentDir , componentJarFileName + "-contents" ) ; if ( ! componentJarDeploymentDir . exists ( ) ) { // the jar may not be on root of DU , create additional dirs if needed
LinkedList < File > dirsToCreate = new LinkedList < File > ( ) ; File dir = componentJarDeploymentDir . getParentFile ( ) ; while ( ! dir . equals ( deploymentDir ) ) { dirsToCreate . addFirst ( dir ) ; dir = dir . getParentFile ( ) ; } for ( File f : dirsToCreate ) { f . mkdir ( ) ; } // now create the dir for the component jar
if ( ! componentJarDeploymentDir . mkdir ( ) ) { throw new SLEEException ( "dir for jar " + componentJarFileName + " not created in " + deploymentDir ) ; } } else { throw new SLEEException ( "dir for jar " + componentJarFileName + " already exists in " + deploymentDir ) ; } extractJar ( componentJarFile , componentJarDeploymentDir ) ; // create components from descriptor
JarEntry componentDescriptor = null ; if ( ( componentDescriptor = componentJarFile . getJarEntry ( "META-INF/sbb-jar.xml" ) ) != null ) { // create class loader domain shared by all components
URLClassLoaderDomainImpl classLoaderDomain = componentManagement . getClassLoaderFactory ( ) . newClassLoaderDomain ( new URL [ ] { componentJarDeploymentDir . toURL ( ) } , Thread . currentThread ( ) . getContextClassLoader ( ) ) ; // parse descriptor
componentDescriptorInputStream = componentJarFile . getInputStream ( componentDescriptor ) ; SbbDescriptorFactoryImpl descriptorFactory = componentManagement . getComponentDescriptorFactory ( ) . getSbbDescriptorFactory ( ) ; List < SbbDescriptorImpl > descriptors = descriptorFactory . parse ( componentDescriptorInputStream ) ; // create components
for ( SbbDescriptorImpl descriptor : descriptors ) { PreferredPackagesBuilder . buildPreferredPackages ( descriptor , classLoaderDomain ) ; SbbComponentImpl component = new SbbComponentImpl ( descriptor ) ; component . setDeploymentDir ( componentJarDeploymentDir ) ; component . setClassLoaderDomain ( classLoaderDomain ) ; components . add ( component ) ; } } else if ( ( componentDescriptor = componentJarFile . getJarEntry ( "META-INF/profile-spec-jar.xml" ) ) != null ) { // create class loader domain shared by all components
URLClassLoaderDomainImpl classLoaderDomain = componentManagement . getClassLoaderFactory ( ) . newClassLoaderDomain ( new URL [ ] { componentJarDeploymentDir . toURL ( ) } , Thread . currentThread ( ) . getContextClassLoader ( ) ) ; // parse descriptor
componentDescriptorInputStream = componentJarFile . getInputStream ( componentDescriptor ) ; ProfileSpecificationDescriptorFactoryImpl descriptorFactory = componentManagement . getComponentDescriptorFactory ( ) . getProfileSpecificationDescriptorFactory ( ) ; List < ProfileSpecificationDescriptorImpl > descriptors = descriptorFactory . parse ( componentDescriptorInputStream ) ; // create components
for ( ProfileSpecificationDescriptorImpl descriptor : descriptors ) { ProfileSpecificationComponentImpl component = new ProfileSpecificationComponentImpl ( descriptor ) ; component . setDeploymentDir ( componentJarDeploymentDir ) ; component . setClassLoaderDomain ( classLoaderDomain ) ; components . add ( component ) ; } } else if ( ( componentDescriptor = componentJarFile . getJarEntry ( "META-INF/library-jar.xml" ) ) != null ) { Set < LibraryComponentImpl > libraryComponents = new HashSet < LibraryComponentImpl > ( ) ; // we need to gather all URLs for the shared class loader domain
// to watch
Set < URL > classLoaderDomainURLs = new HashSet < URL > ( ) ; classLoaderDomainURLs . add ( componentJarDeploymentDir . toURL ( ) ) ; // parse the descriptor
componentDescriptorInputStream = componentJarFile . getInputStream ( componentDescriptor ) ; LibraryDescriptorFactoryImpl descriptorFactory = componentManagement . getComponentDescriptorFactory ( ) . getLibraryDescriptorFactory ( ) ; List < LibraryDescriptorImpl > descriptors = descriptorFactory . parse ( componentDescriptorInputStream ) ; // create components
for ( LibraryDescriptorImpl descriptor : descriptors ) { LibraryComponentImpl component = new LibraryComponentImpl ( descriptor ) ; for ( JarDescriptor mJar : descriptor . getJars ( ) ) { classLoaderDomainURLs . add ( new File ( componentJarDeploymentDir , mJar . getJarName ( ) ) . toURL ( ) ) ; } // set deploy dir and cl domain
component . setDeploymentDir ( componentJarDeploymentDir ) ; components . add ( component ) ; libraryComponents . add ( component ) ; } // create shared url domain
URLClassLoaderDomainImpl classLoaderDomain = componentManagement . getClassLoaderFactory ( ) . newClassLoaderDomain ( classLoaderDomainURLs . toArray ( new URL [ classLoaderDomainURLs . size ( ) ] ) , Thread . currentThread ( ) . getContextClassLoader ( ) ) ; // add it to each component
for ( LibraryComponentImpl component : libraryComponents ) { component . setClassLoaderDomain ( classLoaderDomain ) ; } } else if ( ( componentDescriptor = componentJarFile . getJarEntry ( "META-INF/event-jar.xml" ) ) != null ) { // create class loader domain shared by all components
URLClassLoaderDomainImpl classLoaderDomain = componentManagement . getClassLoaderFactory ( ) . newClassLoaderDomain ( new URL [ ] { componentJarDeploymentDir . toURL ( ) } , Thread . currentThread ( ) . getContextClassLoader ( ) ) ; // parse descriptor
componentDescriptorInputStream = componentJarFile . getInputStream ( componentDescriptor ) ; EventTypeDescriptorFactoryImpl descriptorFactory = componentManagement . getComponentDescriptorFactory ( ) . getEventTypeDescriptorFactory ( ) ; List < EventTypeDescriptorImpl > descriptors = descriptorFactory . parse ( componentDescriptorInputStream ) ; // create components
for ( EventTypeDescriptorImpl descriptor : descriptors ) { EventTypeComponentImpl component = new EventTypeComponentImpl ( descriptor ) ; component . setDeploymentDir ( componentJarDeploymentDir ) ; component . setClassLoaderDomain ( classLoaderDomain ) ; components . add ( component ) ; } } else if ( ( componentDescriptor = componentJarFile . getJarEntry ( "META-INF/resource-adaptor-type-jar.xml" ) ) != null ) { // create class loader domain shared by all components
URLClassLoaderDomainImpl classLoaderDomain = componentManagement . getClassLoaderFactory ( ) . newClassLoaderDomain ( new URL [ ] { componentJarDeploymentDir . toURL ( ) } , Thread . currentThread ( ) . getContextClassLoader ( ) ) ; // parse descriptor
componentDescriptorInputStream = componentJarFile . getInputStream ( componentDescriptor ) ; ResourceAdaptorTypeDescriptorFactoryImpl descriptorFactory = componentManagement . getComponentDescriptorFactory ( ) . getResourceAdaptorTypeDescriptorFactory ( ) ; List < ResourceAdaptorTypeDescriptorImpl > descriptors = descriptorFactory . parse ( componentDescriptorInputStream ) ; // create components
for ( ResourceAdaptorTypeDescriptorImpl descriptor : descriptors ) { ResourceAdaptorTypeComponentImpl component = new ResourceAdaptorTypeComponentImpl ( descriptor ) ; component . setDeploymentDir ( componentJarDeploymentDir ) ; component . setClassLoaderDomain ( classLoaderDomain ) ; components . add ( component ) ; } } else if ( ( componentDescriptor = componentJarFile . getJarEntry ( "META-INF/resource-adaptor-jar.xml" ) ) != null ) { // create class loader domain shared by all components
URLClassLoaderDomainImpl classLoaderDomain = componentManagement . getClassLoaderFactory ( ) . newClassLoaderDomain ( new URL [ ] { componentJarDeploymentDir . toURL ( ) } , Thread . currentThread ( ) . getContextClassLoader ( ) ) ; // parse descriptor
componentDescriptorInputStream = componentJarFile . getInputStream ( componentDescriptor ) ; ResourceAdaptorDescriptorFactoryImpl descriptorFactory = componentManagement . getComponentDescriptorFactory ( ) . getResourceAdaptorDescriptorFactory ( ) ; List < ResourceAdaptorDescriptorImpl > descriptors = descriptorFactory . parse ( componentDescriptorInputStream ) ; // create components
for ( ResourceAdaptorDescriptorImpl descriptor : descriptors ) { ResourceAdaptorComponentImpl component = new ResourceAdaptorComponentImpl ( descriptor ) ; component . setDeploymentDir ( componentJarDeploymentDir ) ; component . setClassLoaderDomain ( classLoaderDomain ) ; components . add ( component ) ; } } else { throw new DeploymentException ( "No Deployment Descriptor found in the " + componentJarFile . getName ( ) + " entry of a deployable unit." ) ; } } catch ( IOException e ) { throw new DeploymentException ( "failed to parse jar descriptor from " + componentJarFile . getName ( ) , e ) ; } finally { if ( componentDescriptorInputStream != null ) { try { componentDescriptorInputStream . close ( ) ; } catch ( IOException e ) { logger . error ( "failed to close inputstream of descriptor for jar " + componentJarFile ) ; } } } // close component jar file
try { componentJarFile . close ( ) ; } catch ( IOException e ) { logger . error ( "failed to close component jar file" , e ) ; } // and delete the extracted jar file , we don ' t need it anymore
if ( ! extractedFile . delete ( ) ) { logger . warn ( "failed to delete " + extractedFile ) ; } return components ;


signature:
public class DeployableUnitJarComponentBuilder { /** * Extracts the file with name < code > fileName < / code > out of the
 * < code > containingJar < / code > archive and stores it in < code > dstDir < / code > .
 * @ param fileName
 * the name of the file to extract .
 * @ param containingJar
 * the archive where to extract it from .
 * @ param dstDir
 * the location where the extracted file should be stored .
 * @ return a < code > java . io . File < / code > reference to the extracted file .
 * @ throws DeploymentException */
private File extractFile ( String fileName , JarFile containingJar , File dstDir ) throws DeploymentException { } }

implementation: ZipEntry zipFileEntry = containingJar . getEntry ( fileName ) ; logger . trace ( "Extracting file " + fileName + " from " + containingJar . getName ( ) ) ; if ( zipFileEntry == null ) { throw new DeploymentException ( "Error extracting jar file  " + fileName + " from " + containingJar . getName ( ) ) ; } File extractedFile = new File ( dstDir , new File ( zipFileEntry . getName ( ) ) . getName ( ) ) ; try { pipeStream ( containingJar . getInputStream ( zipFileEntry ) , new FileOutputStream ( extractedFile ) ) ; } catch ( FileNotFoundException e ) { throw new DeploymentException ( "file " + fileName + " not found in " + containingJar . getName ( ) , e ) ; } catch ( IOException e ) { throw new DeploymentException ( "erro extracting file " + fileName + " from " + containingJar . getName ( ) , e ) ; } logger . debug ( "Extracted file " + extractedFile . getName ( ) ) ; return extractedFile ;


signature:
public class DeployableUnitJarComponentBuilder { /** * This method will extract all the files in the jar file
 * @ param jarFile
 * the jar file
 * @ param dstDir
 * the destination where files in the jar file be extracted
 * @ param deployableUnitID
 * @ return
 * @ throws DeploymentException
 * failed to extract files */
private void extractJar ( JarFile jarFile , File dstDir ) throws DeploymentException { } }

implementation:
// Extract jar contents to a classpath location
JarInputStream jarIs = null ; try { jarIs = new JarInputStream ( new BufferedInputStream ( new FileInputStream ( jarFile . getName ( ) ) ) ) ; for ( JarEntry entry = jarIs . getNextJarEntry ( ) ; jarIs . available ( ) > 0 && entry != null ; entry = jarIs . getNextJarEntry ( ) ) { logger . trace ( "jar entry = " + entry . getName ( ) ) ; if ( entry . isDirectory ( ) ) { // Create jar directories .
File dir = new File ( dstDir , entry . getName ( ) ) ; if ( ! dir . exists ( ) ) { if ( ! dir . mkdirs ( ) ) { logger . debug ( "Failed to create directory " + dir . getAbsolutePath ( ) ) ; throw new IOException ( "Failed to create directory " + dir . getAbsolutePath ( ) ) ; } } else logger . trace ( "Created directory" + dir . getAbsolutePath ( ) ) ; } else // unzip files
{ File file = new File ( dstDir , entry . getName ( ) ) ; File dir = file . getParentFile ( ) ; if ( ! dir . exists ( ) ) { if ( ! dir . mkdirs ( ) ) { logger . debug ( "Failed to create directory " + dir . getAbsolutePath ( ) ) ; throw new IOException ( "Failed to create directory " + dir . getAbsolutePath ( ) ) ; } else logger . trace ( "Created directory" + dir . getAbsolutePath ( ) ) ; } pipeStream ( jarFile . getInputStream ( entry ) , new FileOutputStream ( file ) ) ; } } } catch ( Exception e ) { throw new DeploymentException ( "failed to extract jar file " + jarFile . getName ( ) ) ; } finally { if ( jarIs != null ) { try { jarIs . close ( ) ; } catch ( IOException e ) { logger . error ( "failed to close jar input stream" , e ) ; } } }


signature:
public class DeployableUnitJarComponentBuilder { /** * Pipes data from the input stream into the output stream .
 * @ param is
 * The InputStream where the data is coming from .
 * @ param os
 * The OutputStream where the data is going to .
 * @ throws IOException
 * if reading or writing the data fails . */
private void pipeStream ( InputStream is , OutputStream os ) throws IOException { } }

implementation:
synchronized ( buffer ) { try { for ( int bytesRead = is . read ( buffer ) ; bytesRead != - 1 ; bytesRead = is . read ( buffer ) ) os . write ( buffer , 0 , bytesRead ) ; is . close ( ) ; os . close ( ) ; } catch ( IOException ioe ) { try { is . close ( ) ; } catch ( Exception ioexc ) { /* do sth ? */
} try { os . close ( ) ; } catch ( Exception ioexc ) { /* do sth ? */
} throw ioe ; } }


signature:
public class ActivityContextCacheData { /** * Puts an object in cache data
 * @ param key
 * @ param value
 * @ return the old object for the specified key , null if key was not mapped */
@ SuppressWarnings ( "unchecked" ) public Object putObject ( Object key , Object value ) { } }

implementation: return getNode ( ) . put ( key , value ) ;


signature:
public class ActivityContextCacheData { /** * Tries to attaches an sbb entity
 * @ param sbbEntityId
 * @ return true if it was attached , false if already was attached */
public boolean attachSbbEntity ( SbbEntityID sbbEntityId ) { } }

implementation: final Node node = getAttachedSbbsNode ( true ) ; if ( ! node . hasChild ( sbbEntityId ) ) { node . addChild ( Fqn . fromElements ( sbbEntityId ) ) ; return true ; } else { return false ; }


signature:
public class ActivityContextCacheData { /** * Detaches an sbb entity
 * @ param sbbEntityId */
public boolean detachSbbEntity ( SbbEntityID sbbEntityId ) { } }

implementation: final Node node = getAttachedSbbsNode ( false ) ; return node != null ? node . removeChild ( sbbEntityId ) : false ;


signature:
public class ActivityContextCacheData { /** * Verifies if there at least one sbb entity attached
 * @ return false is there are no sbb entities attached , true otherwise */
public boolean noSbbEntitiesAttached ( ) { } }

implementation: final Node node = getAttachedSbbsNode ( false ) ; return node != null ? node . getChildrenNames ( ) . isEmpty ( ) : true ;


signature:
public class ActivityContextCacheData { /** * Return a set with all sbb entities attached .
 * @ return */
@ SuppressWarnings ( "unchecked" ) public Set < SbbEntityID > getSbbEntitiesAttached ( ) { } }

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


signature:
public class ActivityContextCacheData { /** * Attaches a timer
 * @ param timerID */
public boolean attachTimer ( TimerID timerID ) { } }

implementation: final Node node = getAttachedTimersNode ( true ) ; if ( ! node . hasChild ( timerID ) ) { node . addChild ( Fqn . fromElements ( timerID ) ) ; return true ; } else { return false ; }


signature:
public class ActivityContextCacheData { /** * Detaches a timer
 * @ param timerID */
public boolean detachTimer ( TimerID timerID ) { } }

implementation: final Node node = getAttachedTimersNode ( false ) ; return node != null ? node . removeChild ( timerID ) : false ;


signature:
public class ActivityContextCacheData { /** * Verifies if there at least one timer attached
 * @ return false is there are no timers attached , true otherwise */
public boolean noTimersAttached ( ) { } }

implementation: final Node node = getAttachedTimersNode ( false ) ; return node != null ? node . getChildrenNames ( ) . isEmpty ( ) : true ;


signature:
public class ActivityContextCacheData { /** * Returns the set of timers attached to the ac
 * @ return */
public Set getAttachedTimers ( ) { } }

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


signature:
public class ActivityContextCacheData { /** * Adds the specified name to the set of names bound to the ac
 * @ param name */
public void nameBound ( String name ) { } }

implementation: final Node node = getNamesBoundNode ( true ) ; if ( ! node . hasChild ( name ) ) { node . addChild ( Fqn . fromElements ( name ) ) ; }


signature:
public class ActivityContextCacheData { /** * Removes the specified name from the set of names bound to the ac
 * @ param name */
public boolean nameUnbound ( String name ) { } }

implementation: final Node node = getNamesBoundNode ( false ) ; return node != null ? node . removeChild ( name ) : false ;


signature:
public class ActivityContextCacheData { /** * Verifies if there at least one name bound to the ac
 * @ return false is there are no names bound , true otherwise */
public boolean noNamesBound ( ) { } }

implementation: final Node node = getNamesBoundNode ( false ) ; return node != null ? node . getChildrenNames ( ) . isEmpty ( ) : true ;


signature:
public class ActivityContextCacheData { /** * Returns the set of names bound to the ac
 * @ return */
public Set getNamesBoundCopy ( ) { } }

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


signature:
public class ActivityContextCacheData { /** * Sets the aci cmp attribute
 * @ param attrName
 * @ param attrValue */
@ SuppressWarnings ( "unchecked" ) public void setCmpAttribute ( String attrName , Object attrValue ) { } }

implementation: final Node node = getCmpAttributesNode ( true ) ; Node cmpNode = node . getChild ( attrName ) ; if ( cmpNode == null ) { cmpNode = node . addChild ( Fqn . fromElements ( attrName ) ) ; } cmpNode . put ( CMP_ATTRIBUTES_NODE_MAP_KEY , attrValue ) ;


signature:
public class ActivityContextCacheData { /** * Retrieves the aci cmp attribute
 * @ param attrName
 * @ return */
@ SuppressWarnings ( "unchecked" ) public Object getCmpAttribute ( String attrName ) { } }

implementation: final Node node = getCmpAttributesNode ( false ) ; if ( node == null ) { return null ; } else { final Node cmpNode = node . getChild ( attrName ) ; if ( cmpNode != null ) { return cmpNode . get ( CMP_ATTRIBUTES_NODE_MAP_KEY ) ; } else { return null ; } }


signature:
public class ActivityContextCacheData { /** * Retrieves a map copy of the aci attributes set
 * @ return */
@ SuppressWarnings ( "unchecked" ) public Map getCmpAttributesCopy ( ) { } }

implementation: final Node node = getCmpAttributesNode ( false ) ; if ( node == null ) { return Collections . emptyMap ( ) ; } else { Map result = new HashMap ( ) ; Node cmpNode = null ; for ( Object obj : node . getChildren ( ) ) { cmpNode = ( Node ) obj ; result . put ( cmpNode . getFqn ( ) . getLastElement ( ) , cmpNode . get ( CMP_ATTRIBUTES_NODE_MAP_KEY ) ) ; } return result ; }


signature:
public class ResourceAdaptorValidator { /** * FIXME : add check for access ? */
protected String appendToBuffer ( String message , String section , String buffer ) { } }

implementation: buffer += ( this . component . getDescriptor ( ) . getResourceAdaptorID ( ) + " : violates section " + section + " of jSLEE 1.1 specification : " + message + "\n" ) ; return buffer ;


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

implementation:
String sopts = ":a:f:sug" ; LongOpt [ ] lopts = { new LongOpt ( "tracers-used" , LongOpt . REQUIRED_ARGUMENT , null , 'a' ) , new LongOpt ( "tracers-set" , LongOpt . REQUIRED_ARGUMENT , null , 'f' ) , new LongOpt ( "set-level" , LongOpt . NO_ARGUMENT , null , 's' ) , new LongOpt ( "cid" , LongOpt . REQUIRED_ARGUMENT , null , SetLevelOperation . cid ) , new LongOpt ( "nsrc" , LongOpt . REQUIRED_ARGUMENT , null , SetLevelOperation . nsrc ) , new LongOpt ( "name" , LongOpt . REQUIRED_ARGUMENT , null , SetLevelOperation . name ) , new LongOpt ( "level" , LongOpt . REQUIRED_ARGUMENT , null , SetLevelOperation . level ) , new LongOpt ( "un-set-level" , LongOpt . NO_ARGUMENT , null , 'u' ) , new LongOpt ( "nsrc" , LongOpt . REQUIRED_ARGUMENT , null , UnsetLevelOperation . nsrc ) , new LongOpt ( "name" , LongOpt . REQUIRED_ARGUMENT , null , UnsetLevelOperation . name ) , new LongOpt ( "get-level" , LongOpt . NO_ARGUMENT , null , 'g' ) , new LongOpt ( "cid" , LongOpt . REQUIRED_ARGUMENT , null , GetLevelOperation . cid ) , new LongOpt ( "nsrc" , LongOpt . REQUIRED_ARGUMENT , null , GetLevelOperation . nsrc ) , new LongOpt ( "name" , LongOpt . REQUIRED_ARGUMENT , null , GetLevelOperation . name ) , } ; 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 'a' : super . operation = new GetTracersUsedOperation ( super . context , super . log , this ) ; super . operation . buildOperation ( getopt , args ) ; break ; case 'f' : super . operation = new GetTracersSetOperation ( super . context , super . log , this ) ; super . operation . buildOperation ( getopt , args ) ; break ; case 's' : super . operation = new SetLevelOperation ( super . context , super . log , this ) ; super . operation . buildOperation ( getopt , args ) ; break ; case 'u' : super . operation = new UnsetLevelOperation ( super . context , super . log , this ) ; super . operation . buildOperation ( getopt , args ) ; break ; case 'g' : super . operation = new GetLevelOperation ( 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 ProfileTableActivityContextInterfaceFactoryImpl { /** * ( non - Javadoc )
 * @ see javax . slee . profile . ProfileTableActivityContextInterfaceFactory # getActivityContextInterface ( javax . slee . profile . ProfileTableActivity ) */
public ActivityContextInterface getActivityContextInterface ( ProfileTableActivity profileTableActivity ) throws NullPointerException , TransactionRequiredLocalException , UnrecognizedActivityException , FactoryException { } }

implementation:
if ( profileTableActivity == null || profileTableActivity . getProfileTableName ( ) == null ) { throw new NullPointerException ( "null profile table activity" ) ; } serviceContainer . getTransactionManager ( ) . mandateTransaction ( ) ; ProfileTableImpl profileTableImpl = null ; try { // check if this is an assigned profile table
// name .
profileTableImpl = profileManagementImpl . getProfileTable ( profileTableActivity . getProfileTableName ( ) ) ; } catch ( UnrecognizedProfileTableNameException e ) { throw new UnrecognizedActivityException ( profileTableActivity . getProfileTableName ( ) , e ) ; } ActivityContext ac = profileTableImpl . getActivityContext ( ) ; if ( ac == null ) { throw new UnrecognizedActivityException ( "No resource for: " + profileTableActivity . getProfileTableName ( ) , profileTableActivity ) ; } return ac . getActivityContextInterface ( ) ;


signature:
public class UsageMBeanImpl { /** * Initiates the notification info for usage mbeans
 * @ return */
private static MBeanNotificationInfo [ ] initNotificationInfo ( ) { } }

implementation: String [ ] notificationTypes = new String [ ] { ProfileTableNotification . USAGE_NOTIFICATION_TYPE , ResourceAdaptorEntityNotification . USAGE_NOTIFICATION_TYPE , SbbNotification . USAGE_NOTIFICATION_TYPE , SubsystemNotification . USAGE_NOTIFICATION_TYPE } ; return new MBeanNotificationInfo [ ] { new MBeanNotificationInfo ( notificationTypes , UsageNotification . class . getName ( ) , "JAIN SLEE 1.1 Usage MBean Notification" ) } ;


signature:
public class UsageMBeanImpl { /** * Send the notification .
 * @ param value
 * @ param seqno
 * @ param usageParameterSetName
 * @ param usageParameterName
 * @ param isCounter */
public void sendUsageNotification ( long value , long seqno , String usageParameterSetName , String usageParameterName , boolean isCounter ) { } }

implementation:
UsageNotificationManagerMBeanImpl notificationManager = parent . getUsageNotificationManagerMBean ( notificationSource ) ; if ( notificationManager == null || notificationManager . getNotificationsEnabled ( usageParameterName ) ) { // if the notification manager is null we consider the notification
// can be sent
UsageNotification notification = createUsageNotification ( value , seqno , usageParameterSetName , usageParameterName , isCounter ) ; for ( ListenerFilterHandbackTriplet triplet : listeners . values ( ) ) { if ( triplet . notificationFilter == null || triplet . notificationFilter . isNotificationEnabled ( notification ) ) { triplet . notificationListener . handleNotification ( notification , triplet . handbackObject ) ; } } }


signature:
public class UsageMBeanImpl { /** * Creates an instance of an { @ link UsageNotification } for the specified
 * args . This operation is exposed to allow it be overriden by
 * { @ link SbbUsageMBean } impl .
 * @ param value
 * @ param seqno
 * @ param usageParameterSetName
 * @ param usageParameterName
 * @ param isCounter
 * @ return */
protected UsageNotification createUsageNotification ( long value , long seqno , String usageParameterSetName , String usageParameterName , boolean isCounter ) { } }

implementation: return new UsageNotification ( notificationSource . getUsageNotificationType ( ) , this , notificationSource , usageParameterSetName , usageParameterName , isCounter , value , seqno , System . currentTimeMillis ( ) ) ;


signature:
public class ResourceAdaptorTypeComponentImpl { /** * Retrieves the JAIN SLEE specs descriptor
 * @ return */
public javax . slee . resource . ResourceAdaptorTypeDescriptor getSpecsDescriptor ( ) { } }

implementation: if ( specsDescriptor == null ) { final LibraryID [ ] libraryIDs = descriptor . getLibraryRefs ( ) . toArray ( new LibraryID [ descriptor . getLibraryRefs ( ) . size ( ) ] ) ; final String [ ] activityTypes = descriptor . getActivityTypes ( ) . toArray ( new String [ descriptor . getActivityTypes ( ) . size ( ) ] ) ; final EventTypeID [ ] eventTypes = descriptor . getEventTypeRefs ( ) . toArray ( new EventTypeID [ descriptor . getEventTypeRefs ( ) . size ( ) ] ) ; String raInterface = descriptor . getResourceAdaptorInterface ( ) == null ? null : descriptor . getResourceAdaptorInterface ( ) ; specsDescriptor = new javax . slee . resource . ResourceAdaptorTypeDescriptor ( getResourceAdaptorTypeID ( ) , getDeployableUnit ( ) . getDeployableUnitID ( ) , getDeploymentUnitSource ( ) , libraryIDs , activityTypes , raInterface , eventTypes ) ; } return specsDescriptor ;


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

implementation:
String sopts = ":lcrng" ; LongOpt [ ] lopts = { new LongOpt ( "list" , LongOpt . NO_ARGUMENT , null , 'l' ) , new LongOpt ( "table" , LongOpt . OPTIONAL_ARGUMENT , null , ListOperation . table ) , new LongOpt ( "profile" , LongOpt . REQUIRED_ARGUMENT , null , ListOperation . profile ) , new LongOpt ( "create" , LongOpt . NO_ARGUMENT , null , 'c' ) , // those are also for remove
new LongOpt ( "profile-name" , LongOpt . REQUIRED_ARGUMENT , null , CreateOperation . profile_name ) , new LongOpt ( "table-name" , LongOpt . REQUIRED_ARGUMENT , null , CreateOperation . table_name ) , new LongOpt ( "profile-spec" , LongOpt . REQUIRED_ARGUMENT , null , CreateOperation . profile_spec ) , new LongOpt ( "remove" , LongOpt . NO_ARGUMENT , null , 'r' ) , // covered above
new LongOpt ( "rename" , LongOpt . NO_ARGUMENT , null , 'n' ) , new LongOpt ( "current-name" , LongOpt . REQUIRED_ARGUMENT , null , RenameOperation . current_name ) , new LongOpt ( "new-name" , LongOpt . REQUIRED_ARGUMENT , null , RenameOperation . new_name ) , new LongOpt ( "get" , LongOpt . NO_ARGUMENT , null , 'g' ) , // new LongOpt ( " profile - name " , LongOpt . REQUIRED _ ARGUMENT , null , GetOperation . profile _ name ) ,
new LongOpt ( "profile-spec" , LongOpt . REQUIRED_ARGUMENT , null , GetOperation . profile_spec ) , // new LongOpt ( " profile " , LongOpt . REQUIRED _ ARGUMENT , null , GetOperation . profile ) ,
} ; 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 'l' : super . operation = new ListOperation ( super . context , super . log , this ) ; super . operation . buildOperation ( getopt , args ) ; break ; case 'c' : super . operation = new CreateOperation ( super . context , super . log , this ) ; super . operation . buildOperation ( getopt , args ) ; break ; case 'r' : super . operation = new RemoveOperation ( super . context , super . log , this ) ; super . operation . buildOperation ( getopt , args ) ; break ; case 'n' : super . operation = new RenameOperation ( super . context , super . log , this ) ; super . operation . buildOperation ( getopt , args ) ; break ; case 'g' : super . operation = new GetOperation ( 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 DeploymentManagerMBeanImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . container . deployment . jboss . DeploymentManagerMBean # persistentInstall ( java . net . URL ) */
public void persistentInstall ( URL deployableUnitURL ) throws DeploymentException { } }

implementation: try { doPersistentInstall ( deployableUnitURL , deployDir ) ; } catch ( Exception e ) { throw new DeploymentException ( e ) ; }


signature:
public class DeploymentManagerMBeanImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . container . deployment . jboss . DeploymentManagerMBean # persistentUninstall ( java . net . URL ) */
public void persistentUninstall ( URL deployableUnitURL ) throws DeploymentException { } }

implementation:
try { // All we really care is for the filename
String fullPath = deployableUnitURL . getFile ( ) ; String filename = fullPath . substring ( fullPath . lastIndexOf ( '/' ) + 1 ) ; // Here ' s what we want to delete
String filePath = deployDir + File . separator + filename ; // Delete it
if ( ! new File ( filePath ) . delete ( ) ) { throw new DeploymentException ( "Failed to delete " + filePath ) ; } } catch ( Exception e ) { throw new DeploymentException ( e ) ; }


signature:
public class DeploymentManagerMBeanImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . container . deployment . jboss . DeploymentManagerMBean # clusterInstall ( java . net . URL ) */
public void clusterInstall ( URL deployableUnitURL ) throws DeploymentException { } }

implementation: try { doPersistentInstall ( deployableUnitURL , farmDeployDir ) ; } catch ( Exception e ) { throw new DeploymentException ( e ) ; }


signature:
public class DeploymentManagerMBeanImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . container . deployment . jboss . DeploymentManagerMBean # clusterUninstall ( java . net . URL ) */
public void clusterUninstall ( URL deployableUnitURL ) throws DeploymentException { } }

implementation:
try { // All we really care is for the filename
String fullPath = deployableUnitURL . getFile ( ) ; String filename = fullPath . substring ( fullPath . lastIndexOf ( '/' ) + 1 ) ; // Here ' s what we want to delete
String filePath = farmDeployDir + File . separator + filename ; // Delete it
if ( ! new File ( filePath ) . delete ( ) ) { throw new DeploymentException ( "Failed to delete " + filePath ) ; } } catch ( Exception e ) { throw new DeploymentException ( e ) ; }


signature:
public class DeploymentManagerMBeanImpl { /** * Downloads a remote DU to a local folder
 * @ param duURL URL where the DU can be fetched from
 * @ param deploymentRoot the location where it will be saved to
 * @ return a File related to the downloaded DU
 * @ throws Exception */
private File downloadRemoteDU ( URL duURL , File deploymentRoot ) throws Exception { } }

implementation:
InputStream in = null ; OutputStream out = null ; try { // Get the filename out of the URL
String filename = new File ( duURL . getPath ( ) ) . getName ( ) ; // Prepare for creating the file at deploy folder
File tempFile = new File ( deploymentRoot , filename ) ; out = new BufferedOutputStream ( new FileOutputStream ( tempFile ) ) ; URLConnection conn = duURL . openConnection ( ) ; in = conn . getInputStream ( ) ; // Get the data
byte [ ] buffer = new byte [ 1024 ] ; int numRead ; while ( ( numRead = in . read ( buffer ) ) != - 1 ) { out . write ( buffer , 0 , numRead ) ; } // Done ! Successful .
return tempFile ; } finally { // Do the clean up .
try { if ( in != null ) { in . close ( ) ; in = null ; } if ( out != null ) { out . close ( ) ; out = null ; } } catch ( IOException ioe ) { // Shouldn ' t happen , let ' s ignore .
} }


signature:
public class DeploymentManager { /** * Updates the list of components already deployed to SLEE . */
public void updateDeployedComponents ( ) { } }

implementation:
try { // Get the SLEE Component Repo
ComponentRepository componentRepository = sleeContainerDeployer . getSleeContainer ( ) . getComponentRepository ( ) ; // First we ' ll put the components in a temp Collection
ConcurrentLinkedQueue < String > newDeployedComponents = new ConcurrentLinkedQueue < String > ( ) ; // Get the deployed Profile Specifications
for ( ComponentID componentID : componentRepository . getProfileSpecificationIDs ( ) ) { newDeployedComponents . add ( componentID . toString ( ) ) ; } // Get the deployed Event Types
for ( ComponentID componentID : componentRepository . getEventComponentIDs ( ) ) { newDeployedComponents . add ( componentID . toString ( ) ) ; } // Get the deployed Resource Adaptor Types
for ( ComponentID componentID : componentRepository . getResourceAdaptorTypeIDs ( ) ) { newDeployedComponents . add ( componentID . toString ( ) ) ; } // Get the deployed Resource Adaptors
for ( ComponentID componentID : componentRepository . getResourceAdaptorIDs ( ) ) { newDeployedComponents . add ( componentID . toString ( ) ) ; } // Get the deployed Service Building Blocks ( SBBs )
for ( ComponentID componentID : componentRepository . getSbbIDs ( ) ) { newDeployedComponents . add ( componentID . toString ( ) ) ; } // Get the deployed Services
for ( ComponentID componentID : componentRepository . getServiceIDs ( ) ) { newDeployedComponents . add ( componentID . toString ( ) ) ; } // Get the deployed Libraries
for ( ComponentID componentID : componentRepository . getLibraryIDs ( ) ) { newDeployedComponents . add ( componentID . toString ( ) ) ; } ResourceManagement resourceManagement = sleeContainerDeployer . getSleeContainer ( ) . getResourceManagement ( ) ; // Get the existing Resource Adaptor Entity links
String [ ] entityNames = resourceManagement . getResourceAdaptorEntities ( ) ; for ( String entityName : entityNames ) { newDeployedComponents . addAll ( Arrays . asList ( resourceManagement . getLinkNames ( entityName ) ) ) ; } // All good . . Make the temp the good one .
deployedComponents = newDeployedComponents ; } catch ( Exception e ) { logger . warn ( "Failure while updating deployed components." , e ) ; }


signature:
public class DeploymentManager { /** * Method for installing a Deployable Unit into SLEE .
 * @ param du the Deployable Unit to install .
 * @ throws Exception */
public void installDeployableUnit ( DeployableUnit du ) throws Exception { } }

implementation:
// Update the deployed components from SLEE
updateDeployedComponents ( ) ; // Check if the DU is ready to be installed
if ( du . isReadyToInstall ( true ) ) { // Get and Run the actions needed for installing this DU
sciAction ( du . getInstallActions ( ) , du ) ; // Set the DU as installed
du . setInstalled ( true ) ; // Add the DU to the installed list
deployedDUs . add ( du ) ; // Update the deployed components from SLEE
updateDeployedComponents ( ) ; // Go through the remaining DUs waiting for installation
Iterator < DeployableUnit > duIt = waitingForInstallDUs . iterator ( ) ; while ( duIt . hasNext ( ) ) { DeployableUnit waitingDU = duIt . next ( ) ; // If it is ready for installation , follow the same procedure
if ( waitingDU . isReadyToInstall ( false ) ) { // Get and Run the actions needed for installing this DU
sciAction ( waitingDU . getInstallActions ( ) , waitingDU ) ; // Set the DU as installed
waitingDU . setInstalled ( true ) ; // Add the DU to the installed list
deployedDUs . add ( waitingDU ) ; // Update the deployed components from SLEE
updateDeployedComponents ( ) ; // Remove the DU from the waiting list .
waitingForInstallDUs . remove ( waitingDU ) ; // Let ' s start all over . . : )
duIt = waitingForInstallDUs . iterator ( ) ; } } } else { logger . warn ( "Unable to INSTALL " + du . getDeploymentInfoShortName ( ) + " right now. Waiting for dependencies to be resolved." ) ; // The DU can ' t be installed now , let ' s wait . . .
waitingForInstallDUs . add ( du ) ; }


signature:
public class DeploymentManager { /** * Method for uninstalling a Deployable Unit into SLEE .
 * @ param du the Deployable Unit to install .
 * @ throws Exception */
public void uninstallDeployableUnit ( DeployableUnit du ) throws Exception { } }

implementation:
// Update the deployed components from SLEE
updateDeployedComponents ( ) ; // It isn ' t installed ?
if ( ! du . isInstalled ( ) ) { // Then it should be in the waiting list . . . remove and we ' re done .
if ( waitingForInstallDUs . remove ( du ) ) { logger . info ( du . getDeploymentInfoShortName ( ) + " wasn't deployed. Removing from waiting list." ) ; } } // Check if DU components are still present
else if ( ! du . areComponentsStillPresent ( ) ) { logger . info ( du . getDeploymentInfoShortName ( ) + " components already removed. Removing DU info." ) ; // Process internals of undeployment . . .
processInternalUndeploy ( du ) ; } // Check if the DU is ready to be uninstalled
else if ( du . isReadyToUninstall ( ) ) { // Get and Run the actions needed for uninstalling this DU
sciAction ( du . getUninstallActions ( ) , du ) ; // Process internals of undeployment . . .
processInternalUndeploy ( du ) ; } else { // Have we been her already ? If so , don ' t flood user with log messages . . .
if ( ! waitingForUninstallDUs . contains ( du ) ) { // Add it to the waiting list .
waitingForUninstallDUs . add ( du ) ; logger . warn ( "Unable to UNINSTALL " + du . getDeploymentInfoShortName ( ) + " right now. Waiting for dependents to be removed." ) ; } throw new DependencyException ( "Unable to undeploy " + du . getDeploymentInfoShortName ( ) ) ; }


signature:
public class DeploymentManager { /** * Sets the DU as not installed and remove it from waiting list if present there .
 * Also , tries to undeploy DU ' s waiting for dependencies to be removed .
 * @ param du the DeployableUnit that was just removed
 * @ throws Exception */
private void processInternalUndeploy ( DeployableUnit du ) throws Exception { } }

implementation:
// Set the DU as not installed
du . setInstalled ( false ) ; // Remove if it was present in waiting list
waitingForUninstallDUs . remove ( du ) ; // Update the deployed components from SLEE
updateDeployedComponents ( ) ; // Go through the remaining DUs waiting for uninstallation
Iterator < DeployableUnit > duIt = waitingForUninstallDUs . iterator ( ) ; while ( duIt . hasNext ( ) ) { DeployableUnit waitingDU = duIt . next ( ) ; // If it is ready for being uninstalled , follow the same procedure
if ( waitingDU . isReadyToUninstall ( ) ) { // Schedule removal
sleeContainerDeployer . getSleeSubDeployer ( ) . stop ( waitingDU . getURL ( ) , waitingDU . getDeploymentInfoShortName ( ) ) ; // Remove the DU from the waiting list . If it fails , will go back .
waitingForUninstallDUs . remove ( waitingDU ) ; // Let ' s start all over . . : )
duIt = waitingForUninstallDUs . iterator ( ) ; } }


signature:
public class DeploymentManager { /** * Method for performing the actions needed for ( un ) deployment .
 * @ param actions the array of strings containing the actions to perform .
 * @ param du the DeployableUnit from where the actions are being performed .
 * @ throws Exception */
private void sciAction ( Collection < ManagementAction > actions , DeployableUnit du ) throws Exception { } }

implementation:
// For each action , get the params . .
for ( ManagementAction action : actions ) { // Shall we skip this action ?
if ( actionsToAvoidByDU . get ( du ) != null && actionsToAvoidByDU . get ( du ) . remove ( action ) ) { // Clean if it was the last one .
if ( actionsToAvoidByDU . get ( du ) . size ( ) == 0 ) { actionsToAvoidByDU . remove ( du ) ; } continue ; } if ( logger . isTraceEnabled ( ) ) { logger . trace ( "Invoking " + action ) ; } // We are isolating each action , so it won ' t affect the whole proccess
try { // Invoke it .
action . invoke ( ) ; // We need to wait for service / entity to deactivate . . .
/* if ( action instanceof DeactivateServiceAction ) {
 waitForServiceDeactivation ( ( DeactivateServiceAction ) action ) ;
 else if ( action instanceof DeactivateResourceAdaptorEntityAction ) {
 waitForResourceAdaptorEntityDeactivation ( ( DeactivateResourceAdaptorEntityAction ) action ) ; */
} catch ( Exception e ) { // We might expect some exceptions . . .
if ( e . getCause ( ) instanceof ResourceAdaptorEntityAlreadyExistsException || ( e . getCause ( ) instanceof InvalidStateException && action instanceof ActivateResourceAdaptorEntityAction ) ) { Class < ? extends ManagementAction > actionToAvoid = null ; // If the activate / create failed then we don ' t want to deactivate / remove
if ( action instanceof ActivateResourceAdaptorEntityAction ) { actionToAvoid = DeactivateResourceAdaptorEntityAction . class ; } else if ( action instanceof CreateResourceAdaptorEntityAction ) { actionToAvoid = RemoveResourceAdaptorEntityAction . class ; } Collection < Class < ? extends ManagementAction > > actionsToAvoid ; if ( ( actionsToAvoid = actionsToAvoidByDU . get ( du ) ) == null ) { actionsToAvoid = new ArrayList < Class < ? extends ManagementAction > > ( ) ; // Add it to the list of actions to skip on undeploy
actionsToAvoid . add ( actionToAvoid ) ; // And put it to the map
actionsToAvoidByDU . put ( du , actionsToAvoid ) ; } else { // Add it to the list of actions to skip on undeploy
actionsToAvoid . add ( actionToAvoid ) ; } logger . warn ( e . getCause ( ) . getMessage ( ) ) ; } else if ( e . getCause ( ) instanceof InvalidStateException && action instanceof DeactivateServiceAction ) { logger . info ( "Delaying uninstall due to service deactivation not complete." ) ; } else if ( e . getCause ( ) instanceof InvalidStateException && action instanceof DeactivateResourceAdaptorEntityAction ) { // ignore this . . . someone has already deactivated the link .
} else if ( e . getCause ( ) instanceof UnrecognizedLinkNameException && action instanceof UnbindLinkNameAction ) { // ignore this . . . someone has already removed the link .
} else if ( action . getType ( ) == ManagementAction . Type . DEPLOY_MANAGEMENT ) { logger . error ( "Failure invoking '" + action , e ) ; } else { throw e ; } } // Wait a little while just to make sure it finishes
Thread . sleep ( waitTimeBetweenOperations ) ; }


signature:
public class DeploymentManager { /** * Method for showing current status of the Deployment Manager .
 * @ return a HTML string with the status . */
public String showStatus ( ) { } }

implementation:
// Update the currently deployed components .
updateDeployedComponents ( ) ; String output = "" ; output += "
Deployable Units Waiting For Install:
" ; for ( DeployableUnit waitingDU : waitingForInstallDUs ) { output += "+-- " + waitingDU . getDeploymentInfoShortName ( ) + "
" ; for ( String dependency : waitingDU . getExternalDependencies ( ) ) { if ( ! deployedComponents . contains ( dependency ) ) dependency += " MISSING!" ; output += "  +-- depends on " + dependency + "
" ; } } output += "
Deployable Units Waiting For Uninstall:
" ; for ( DeployableUnit waitingDU : waitingForUninstallDUs ) { output += "+-- " + waitingDU . getDeploymentInfoShortName ( ) + "
" ; } return output ;


signature:
public class DeploymentManager { /** * Callback for { @ link SleeStateJMXMonitor } , to learn when SLEE is stopping . */
public void sleeShutdown ( ) { } }

implementation:
logger . info ( "Undeploying all Deployable Units due to SLEE shutdown" ) ; // undeploy each DU in reverse order
while ( ! deployedDUs . isEmpty ( ) ) { DeployableUnit du = deployedDUs . removeLast ( ) ; try { uninstallDeployableUnit ( du ) ; } catch ( Exception e ) { logger . error ( "Failed to uninstall DU, in SLEE shutdown" , e ) ; } }


signature:
public class MobicentsLogFilter { /** * If the message should be logged , convert the JDK 1.4
 * LogRecord to a Log4J message .
 * @ return < code > false < / code > because JDK 1.4 logging should not happen
 * if this filter is active . */
public boolean isLoggable ( LogRecord record ) { } }

implementation: Logger logger = getLogger ( record ) ; if ( record . getThrown ( ) != null ) { logWithThrowable ( logger , record ) ; } else { logWithoutThrowable ( logger , record ) ; } return false ;


signature:
public class MobicentsLogFilter { /** * get the Log4J logger corresponding to the java . util . logger . LogRecord */
private Logger getLogger ( LogRecord record ) { } }

implementation: String loggerName = record . getLoggerName ( ) ; Logger logger = loggerCache . get ( loggerName ) ; if ( logger == null ) { logger = Logger . getLogger ( loggerName ) ; loggerCache . put ( loggerName , logger ) ; } return logger ;


signature:
public class ComponentRepositoryImpl { /** * Retrieves the component ids for components that refers the specified component */
public Set < SleeComponent > getReferringComponents ( SleeComponent component ) { } }

implementation: Set < SleeComponent > result = new HashSet < SleeComponent > ( ) ; for ( EventTypeComponent otherComponent : eventTypeComponents . values ( ) ) { if ( ! otherComponent . getComponentID ( ) . equals ( component . getComponentID ( ) ) ) { if ( otherComponent . getDependenciesSet ( ) . contains ( component . getComponentID ( ) ) ) { result . add ( otherComponent ) ; } } } for ( LibraryComponent otherComponent : libraryComponents . values ( ) ) { if ( ! otherComponent . getComponentID ( ) . equals ( component . getComponentID ( ) ) ) { if ( otherComponent . getDependenciesSet ( ) . contains ( component . getComponentID ( ) ) ) { result . add ( otherComponent ) ; } } } for ( ProfileSpecificationComponent otherComponent : profileSpecificationComponents . values ( ) ) { if ( ! otherComponent . getComponentID ( ) . equals ( component . getComponentID ( ) ) ) { if ( otherComponent . getDependenciesSet ( ) . contains ( component . getComponentID ( ) ) ) { result . add ( otherComponent ) ; } } } for ( ResourceAdaptorComponent otherComponent : resourceAdaptorComponents . values ( ) ) { if ( ! otherComponent . getComponentID ( ) . equals ( component . getComponentID ( ) ) ) { if ( otherComponent . getDependenciesSet ( ) . contains ( component . getComponentID ( ) ) ) { result . add ( otherComponent ) ; } } } for ( ResourceAdaptorTypeComponent otherComponent : resourceAdaptorTypeComponents . values ( ) ) { if ( ! otherComponent . getComponentID ( ) . equals ( component . getComponentID ( ) ) ) { if ( otherComponent . getDependenciesSet ( ) . contains ( component . getComponentID ( ) ) ) { result . add ( otherComponent ) ; } } } for ( SbbComponent otherComponent : sbbComponents . values ( ) ) { if ( ! otherComponent . getComponentID ( ) . equals ( component . getComponentID ( ) ) ) { if ( otherComponent . getDependenciesSet ( ) . contains ( component . getComponentID ( ) ) ) { result . add ( otherComponent ) ; } } } for ( ServiceComponent otherComponent : serviceComponents . values ( ) ) { if ( ! otherComponent . getComponentID ( ) . equals ( component . getComponentID ( ) ) ) { if ( otherComponent . getDependenciesSet ( ) . contains ( component . getComponentID ( ) ) ) { result . add ( otherComponent ) ; } } } return result ;


signature:
public class AbstractUsageCommand { /** * ( non - Javadoc )
 * @ see org . mobicents . tools . twiddle . AbstractSleeCommand # displayHelp ( ) */
@ Override public void displayHelp ( ) { } }

implementation:
PrintWriter out = context . getWriter ( ) ; out . println ( desc ) ; // out . println ( " usage : " + name +
// " < - tprofileTableName > [ - pprofileName ] < operation > < arg > * " ) ;
addHeaderDescription ( out ) ; out . println ( "'SetID' refers to SetName or SbbID and SetName." ) ; out . println ( ) ; out . println ( "operation:" ) ; out . println ( "    -l, --list                     Lists certain information about parameters sets. Requires one of options to be present:" ) ; out . println ( "           --sets                  Instructs command to list declared parameter sets. Does not require argument." ) ; out . println ( "           --parameters            Instructs command to list parameters of parameter set. Does not require argument." ) ; // TODO : make ' list ' also list notification mngr conf for resource set .
out . println ( "    -g, --get                      Fetches value of certain parameter in set. Does not take argument." ) ; out . println ( "                                   Requires '--name' option to be present. Following options are supported: " ) ; out . println ( "           --name                  Specifies name of parameter in a set for get operation. Requires parameter name as argument. This option is mandatory." ) ; out . println ( "           --rst                   If present, indicates that 'get' operation should reset parameter value. Does not require argument." ) ; out . println ( "    -r, --reset                    Resets assets in 'Usage' realm. Does not take argument. If 'SetID' is specified, reset command resets specific set, otherwise it acts on default one." ) ; out . println ( "                                   If it is not present, reset command performs operation on default set. Following option is supported:" ) ; out . println ( "           --all                   Resets ALL parameters for 'ResourceName', ignores 'SetID'." ) ; out . println ( "    -c, --create                   Creates usage parameter set for given 'SetID'. Does not require argument." ) ; out . println ( "    -d, --delete                   Deletes usage parameter set with given 'SetID'. Does not require argument." ) ; out . println ( "    -n, --notify                   This operation either turn on/off notifications for parameter or queries about state of notifications." ) ; out . println ( "                                   Does not take parameter, supports following options:" ) ; out . println ( "           --name                  Specifies name of parameter. Requires parameter name as argument. It is mandatory." ) ; out . println ( "           --value                 Specifies value of parameter. Requires boolean argument." ) ; out . println ( "           --is                    Request information about notification(if its enabled). Does not require argument." ) ; // out . println ( " - i , - - is - notify Checks if notification is on for certain parameter in set . Following options are supported : " ) ;
// out . println ( " - - name Specifies name of parameter . Requires parameter name as argument . It is mandatory . " ) ;
out . println ( "" ) ; out . println ( "Examples: " ) ; addExamples ( out ) ; out . flush ( ) ;


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

implementation:
// String sopts = " - : lgrcdni " ;
String sopts = "-:lgrcdn" ; LongOpt [ ] lopts = { new LongOpt ( "noprefix" , LongOpt . NO_ARGUMENT , null , 0x1000 ) , // operration part
new LongOpt ( "list" , LongOpt . NO_ARGUMENT , null , 'l' ) , new LongOpt ( "sets" , LongOpt . NO_ARGUMENT , null , ListOperation . sets ) , new LongOpt ( "parameters" , LongOpt . NO_ARGUMENT , null , ListOperation . parameters ) , new LongOpt ( "get" , LongOpt . NO_ARGUMENT , null , 'g' ) , new LongOpt ( "name" , LongOpt . REQUIRED_ARGUMENT , null , GetOperation . name ) , new LongOpt ( "rst" , LongOpt . NO_ARGUMENT , null , GetOperation . rst ) , new LongOpt ( "reset" , LongOpt . NO_ARGUMENT , null , 'r' ) , new LongOpt ( "all" , LongOpt . NO_ARGUMENT , null , ResetOperation . all ) , new LongOpt ( "create" , LongOpt . NO_ARGUMENT , null , 'c' ) , new LongOpt ( "delete" , LongOpt . NO_ARGUMENT , null , 'd' ) , // mgmt
new LongOpt ( "notify" , LongOpt . NO_ARGUMENT , null , 'n' ) , new LongOpt ( "value" , LongOpt . REQUIRED_ARGUMENT , null , NotifyOperation . value ) , new LongOpt ( "is-notify" , LongOpt . NO_ARGUMENT , null , NotifyOperation . is ) , } ; Getopt getopt = new Getopt ( null , args , sopts , lopts ) ; getopt . setOpterr ( false ) ; int nonOptArgIndex = 0 ; 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 0x1000 : break ; case 1 : // non opt args , table and profile name ( maybe )
switch ( nonOptArgIndex ) { case 0 : resourceName = getopt . getOptarg ( ) ; if ( resourceName . startsWith ( PREFIX_SERVICEID ) ) { try { editor . setAsText ( resourceName ) ; } catch ( Exception e ) { throw new CommandException ( "Command: \"" + getName ( ) + "\" failed to parse ServiceID." , e ) ; } this . serviceID = ( ServiceID ) editor . getValue ( ) ; this . resourceName = null ; } nonOptArgIndex ++ ; break ; case 1 : if ( this . serviceID != null ) { try { this . editor . setAsText ( getopt . getOptarg ( ) ) ; } catch ( Exception e ) { throw new CommandException ( "Command: \"" + getName ( ) + "\" failed to parse SbbID." , e ) ; } this . sbbID = ( SbbID ) this . editor . getValue ( ) ; } else { usageSetName = getopt . getOptarg ( ) ; } nonOptArgIndex ++ ; break ; case 2 : if ( this . serviceID == null ) { throw new CommandException ( "Command: \"" + getName ( ) + "\" expects at most two non opt arguments!" ) ; } usageSetName = getopt . getOptarg ( ) ; nonOptArgIndex ++ ; break ; default : throw new CommandException ( "Command: \"" + getName ( ) + "\" expects at most three non opt arguments!" ) ; } break ; case 'l' : // list
super . operation = new ListOperation ( super . context , super . log , this ) ; prepareCommand ( ) ; super . operation . buildOperation ( getopt , args ) ; break ; case 'g' : // get
super . operation = new GetOperation ( super . context , super . log , this ) ; prepareCommand ( ) ; super . operation . buildOperation ( getopt , args ) ; break ; case 'r' : // reset
super . operation = new ResetOperation ( super . context , super . log , this ) ; prepareCommand ( ) ; super . operation . buildOperation ( getopt , args ) ; break ; case 'c' : // create
super . operation = new CreateOperation ( super . context , super . log , this ) ; prepareCommand ( ) ; super . operation . buildOperation ( getopt , args ) ; break ; case 'd' : // delete
super . operation = new DeleteOperation ( super . context , super . log , this ) ; prepareCommand ( ) ; super . operation . buildOperation ( getopt , args ) ; break ; case 'n' : // notify mngr
super . operation = new NotifyOperation ( super . context , super . log , this ) ; prepareCommand ( ) ; super . operation . buildOperation ( getopt , args ) ; break ; // case ' i ' :
// / / check notify
// super . operation = new IsNotifyOperation ( super . context , super . log , this ) ;
// prepareCommand ( ) ;
// super . operation . buildOperation ( getopt , args ) ;
// break ;
default : throw new CommandException ( "Command: \"" + getName ( ) + "\", found unexpected opt: " + args [ getopt . getOptind ( ) - 1 ] ) ; } }


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

implementation: switch ( option ) { case PRESERVE_NONE : return NONE ; case PRESERVE_ALL : return ALL ; case PRESERVE_LAST : return LAST ; default : throw new IllegalArgumentException ( "Invalid preserve-missed value: " + option ) ; }


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

implementation: if ( option == null ) throw new NullPointerException ( "option is null" ) ; if ( option . equalsIgnoreCase ( NONE_STRING ) ) return NONE ; if ( option . equalsIgnoreCase ( ALL_STRING ) ) return ALL ; if ( option . equalsIgnoreCase ( LAST_STRING ) ) return LAST ; throw new IllegalArgumentException ( "Invalid preserve-missed value: " + option ) ;


signature:
public class SbbEntityFactoryCacheData { /** * Retrieves a set containing sbb entity ids in the factory
 * cache data
 * @ return */
public Set < SbbEntityID > getSbbEntities ( ) { } }

implementation: final Node node = getNode ( ) ; if ( node == null ) { return Collections . emptySet ( ) ; } HashSet < SbbEntityID > result = new HashSet < SbbEntityID > ( ) ; ServiceID serviceID = null ; for ( Object obj : node . getChildrenNames ( ) ) { serviceID = ( ServiceID ) obj ; for ( SbbEntityID sbbEntityID : getRootSbbEntityIDs ( serviceID ) ) { result . add ( sbbEntityID ) ; collectSbbEntities ( sbbEntityID , result ) ; } } return result ;


signature:
public class SbbContextImpl { /** * ( non - Javadoc )
 * @ see javax . slee . SbbContext # getActivities ( ) */
public ActivityContextInterface [ ] getActivities ( ) throws TransactionRequiredLocalException , IllegalStateException , SLEEException { } }

implementation: if ( logger . isTraceEnabled ( ) ) { logger . trace ( "getActivities() " + this . sbbObject . getState ( ) ) ; } if ( SbbObjectState . READY != this . sbbObject . getState ( ) ) { throw new IllegalStateException ( "Cannot call SbbContext.getActivities() in " + this . sbbObject . getState ( ) ) ; } ActivityContextFactory acf = sleeContainer . getActivityContextFactory ( ) ; List < ActivityContextInterface > result = new ArrayList < ActivityContextInterface > ( ) ; ActivityContext ac = null ; for ( ActivityContextHandle ach : sbbObject . getSbbEntity ( ) . getActivityContexts ( ) ) { ac = acf . getActivityContext ( ach ) ; if ( ac != null ) { result . add ( ac . getActivityContextInterface ( ) ) ; } } return result . toArray ( EMPTY_ACI_ARRAY ) ;


signature:
public class SbbContextImpl { /** * ( non - Javadoc )
 * @ see javax . slee . SbbContext # getRollbackOnly ( ) */
public boolean getRollbackOnly ( ) throws TransactionRequiredLocalException , SLEEException { } }

implementation: SleeTransactionManager txMgr = sleeContainer . getTransactionManager ( ) ; txMgr . mandateTransaction ( ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "in getRollbackOnly on " + this ) ; } try { return txMgr . getRollbackOnly ( ) ; } catch ( SystemException e ) { throw new SLEEException ( "Problem with the tx manager!" ) ; }


signature:
public class SbbContextImpl { /** * ( non - Javadoc )
 * @ see javax . slee . SbbContext # getSbbLocalObject ( ) */
public SbbLocalObject getSbbLocalObject ( ) throws TransactionRequiredLocalException , IllegalStateException , SLEEException { } }

implementation: sleeContainer . getTransactionManager ( ) . mandateTransaction ( ) ; if ( this . sbbObject . getState ( ) != SbbObjectState . READY ) throw new IllegalStateException ( "Bad state : " + this . sbbObject . getState ( ) ) ; return sbbObject . getSbbEntity ( ) . getSbbLocalObject ( ) ;


signature:
public class SbbContextImpl { /** * ( non - Javadoc )
 * @ see javax . slee . SbbContext # maskEvent ( java . lang . String [ ] ,
 * javax . slee . ActivityContextInterface ) */
public void maskEvent ( String [ ] eventNames , ActivityContextInterface aci ) throws NullPointerException , TransactionRequiredLocalException , IllegalStateException , UnrecognizedEventException , NotAttachedException , SLEEException { } }

implementation:
if ( SbbObjectState . READY != this . sbbObject . getState ( ) ) { throw new IllegalStateException ( "Cannot call SbbContext maskEvent in " + this . sbbObject . getState ( ) ) ; } if ( this . sbbObject . getSbbEntity ( ) == null ) { // this shouldnt happen since SbbObject state ready shoudl be set
// when its fully setup , but . . . .
throw new IllegalStateException ( "Wrong state! SbbEntity is not assigned" ) ; } sleeContainer . getTransactionManager ( ) . mandateTransaction ( ) ; ActivityContextHandle ach = ( ( org . mobicents . slee . container . activity . ActivityContextInterface ) aci ) . getActivityContext ( ) . getActivityContextHandle ( ) ; if ( ! sbbObject . getSbbEntity ( ) . isAttached ( ach ) ) throw new NotAttachedException ( "ACI is not attached to SBB " ) ; sbbObject . getSbbEntity ( ) . setEventMask ( ach , eventNames ) ;


signature:
public class SbbContextImpl { /** * ( non - Javadoc )
 * @ see javax . slee . SbbContext # setRollbackOnly ( ) */
public void setRollbackOnly ( ) throws TransactionRequiredLocalException , SLEEException { } }

implementation: final SleeTransactionManager sleeTransactionManager = sleeContainer . getTransactionManager ( ) ; sleeTransactionManager . mandateTransaction ( ) ; try { sleeTransactionManager . setRollbackOnly ( ) ; } catch ( SystemException e ) { throw new SLEEException ( "failed to mark tx for rollback" , e ) ; }


signature:
public class SbbContextImpl { /** * ( non - Javadoc )
 * @ see
 * org . mobicents . slee . SbbContextExt # getActivityContextInterfaceFactory ( javax
 * . slee . resource . ResourceAdaptorTypeID ) */
public Object getActivityContextInterfaceFactory ( ResourceAdaptorTypeID raTypeID ) throws NullPointerException , IllegalArgumentException { } }

implementation: if ( raTypeID == null ) { throw new NullPointerException ( "null ra type id" ) ; } if ( ! sbbObject . getSbbComponent ( ) . getDependenciesSet ( ) . contains ( raTypeID ) ) { throw new IllegalArgumentException ( "ra type " + raTypeID + " not referred by the sbb." ) ; } return sleeContainer . getComponentRepository ( ) . getComponentByID ( raTypeID ) . getActivityContextInterfaceFactory ( ) ;


signature:
public class SbbContextImpl { /** * ( non - Javadoc )
 * @ see
 * org . mobicents . slee . SbbContextExt # getResourceAdaptorInterface ( javax . slee
 * . resource . ResourceAdaptorTypeID , java . lang . String ) */
public Object getResourceAdaptorInterface ( ResourceAdaptorTypeID raTypeID , String raLink ) throws NullPointerException , IllegalArgumentException { } }

implementation: if ( raTypeID == null ) { throw new NullPointerException ( "null ra type id" ) ; } if ( raLink == null ) { throw new NullPointerException ( "null ra link" ) ; } if ( ! sbbObject . getSbbComponent ( ) . getDependenciesSet ( ) . contains ( raTypeID ) ) { throw new IllegalArgumentException ( "ra type " + raTypeID + " not referred by the sbb." ) ; } final ResourceManagement resourceManagement = sleeContainer . getResourceManagement ( ) ; String raEntityName = null ; try { raEntityName = resourceManagement . getResourceAdaptorEntityName ( raLink ) ; } catch ( UnrecognizedLinkNameException e ) { throw new IllegalArgumentException ( "ra link " + raLink + " not found." ) ; } return resourceManagement . getResourceAdaptorEntity ( raEntityName ) . getResourceAdaptorInterface ( raTypeID ) ;


signature:
public class UsageNotification { /** * special handling of serialization */
private void writeObject ( ObjectOutputStream out ) throws IOException { } }

implementation: VendorExtensionUtils . writeObject ( out , vendorDataSerializationEnabled ? vendorData : null ) ;


signature:
public class UsageNotification { /** * special handling of deserialization */
private void readObject ( ObjectInputStream in ) throws IOException , ClassNotFoundException { } }

implementation: vendorData = VendorExtensionUtils . readObject ( in , vendorDataDeserializationEnabled ) ;


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

implementation: Object jaxbPojo = buildJAXBPojo ( inputStream ) ; List < EventTypeDescriptorImpl > result = new ArrayList < EventTypeDescriptorImpl > ( ) ; boolean isSlee11 = false ; MEventJar mEventJar = null ; if ( jaxbPojo instanceof org . mobicents . slee . container . component . deployment . jaxb . slee . event . EventJar ) { mEventJar = new MEventJar ( ( org . mobicents . slee . container . component . deployment . jaxb . slee . event . EventJar ) jaxbPojo ) ; } else if ( jaxbPojo instanceof org . mobicents . slee . container . component . deployment . jaxb . slee11 . event . EventJar ) { mEventJar = new MEventJar ( ( org . mobicents . slee . container . component . deployment . jaxb . slee11 . event . EventJar ) jaxbPojo ) ; isSlee11 = true ; } else { throw new SLEEException ( "unexpected class of jaxb pojo built: " + ( jaxbPojo != null ? jaxbPojo . getClass ( ) : null ) ) ; } List < LibraryID > libraryRefs = mEventJar . getLibraryRef ( ) ; for ( MEventDefinition mEventDefinition : mEventJar . getEventDefinition ( ) ) { result . add ( new EventTypeDescriptorImpl ( mEventDefinition , libraryRefs , isSlee11 ) ) ; } return result ;


signature:
public class PolicyFileImpl { /** * generic , for all calls */
private Permissions getPermissions ( Permissions permissions , final CodeSource cs , Principal [ ] principals ) { } }

implementation:
List < PolicyHolderEntry > entries = this . currentPolicy . get ( ) . policyHolderEntries ; for ( PolicyHolderEntry phe : entries ) { // general
selectPermissions ( permissions , cs , principals , phe ) ; // FIXME : certs ?
} return permissions ;


signature:
public class PolicyFileImpl { /** * newGlobalPolicyHolder ) { */
private boolean loadPolicy ( String policyURLString , GlobalPolicyHolder newGlobalPolicyHolder ) { } }

implementation:
// System . err . println ( " Load policy : " + policyURLString ) ;
try { URI policyURI = null ; if ( policyURLString . startsWith ( _PROTOCOL_FILE ) ) { File policyFile = new File ( policyURLString . replaceFirst ( _PROTOCOL_FILE_PREFIX , "" ) ) ; if ( ! policyFile . exists ( ) || ! policyFile . isFile ( ) || ! policyFile . canRead ( ) ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Could not load file: " + policyURLString + ", exists[" + policyFile . exists ( ) + "] isFile[" + policyFile . isFile ( ) + "] canRead[" + policyFile . canRead ( ) + "] " ) ; } // Hmm . . .
return false ; } else { policyURI = policyFile . toURI ( ) . normalize ( ) ; } } else { policyURI = new URI ( policyURLString ) ; } PolicyParser pp = new PolicyParser ( true ) ; InputStream is = getStream ( policyURI ) ; InputStreamReader reader = new InputStreamReader ( is ) ; pp . read ( reader ) ; reader . close ( ) ; // KeyStore ks = . . . . . FIXME :
KeyStore ks = null ; Enumeration < PolicyParser . GrantEntry > grantEntries = pp . grantElements ( ) ; while ( grantEntries . hasMoreElements ( ) ) { parseGrantEntry ( grantEntries . nextElement ( ) , ks , newGlobalPolicyHolder ) ; } } catch ( Exception e ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Failed to read policy file due to some error." ) ; e . printStackTrace ( ) ; } return false ; } return true ;


signature:
public class PolicyFileImpl { /** * private InputStream getStream ( URL url ) throws IOException { */
private InputStream getStream ( URI uri ) throws IOException { } }

implementation:
try { if ( uri . toURL ( ) . getProtocol ( ) . equals ( _PROTOCOL_FILE ) ) { String path = uri . toURL ( ) . getFile ( ) . replace ( '\\' , File . separatorChar ) ; return new FileInputStream ( path ) ; } else { return uri . toURL ( ) . openStream ( ) ; } } catch ( java . lang . IllegalArgumentException e ) { // this happens if url is relative , meaning a file ?
return new FileInputStream ( new File ( uri ) ) ; }


signature:
public class PolicyFileImpl { /** * This function MUST convert code source passed . Meaning it must normalize
 * URL . For instance security framework may pass url that conceptualy
 * matches pat specified policy files but comparison wont match . See url
 * belowe .
 * < ul >
 * < li > < b > 1 -
 * < / b > jar : file : / D : / java / servers / jboss - 5.0.0 . GA / server / default / deploy
 * / restcomm . sar / lib / jar . jar ! / < / li >
 * < li > < b > 2 -
 * < / b > file : / D : / java / servers / jboss - 5.0.0 . GA / server / default / deploy / - < / li >
 * < / ul >
 * URL 1 is passed from security framework as source of loaded classes .
 * However it is not matched by second one ( and is should )
 * @ param cs
 * @ return */
CodeSource performUrlConversion ( CodeSource cs , boolean extractSignerCerts ) { } }

implementation:
String path = null ; CodeSource parsedCodeSource = null ; URL locationURL = cs . getLocation ( ) ; if ( locationURL != null ) { // can happen for default .
Permission urlAccessPermission = null ; try { urlAccessPermission = locationURL . openConnection ( ) . getPermission ( ) ; } catch ( IOException e ) { } if ( urlAccessPermission != null && urlAccessPermission instanceof FilePermission ) { path = ( ( FilePermission ) urlAccessPermission ) . getName ( ) ; } else if ( ( urlAccessPermission == null ) && ( locationURL . getProtocol ( ) . equals ( "file" ) ) ) { path = locationURL . getFile ( ) . replace ( "/" , File . separator ) ; // FIXME : do more ?
} else { // FIXME : ? ?
} } if ( path == null ) { if ( extractSignerCerts ) { parsedCodeSource = new CodeSource ( cs . getLocation ( ) , getSignerCertificates ( cs ) ) ; } } else { try { // Sun says it fails
if ( path . endsWith ( "*" ) ) { // remove trailing ' * ' because it causes
// canonicaization
// to fail on win32
path = path . substring ( 0 , path . length ( ) - 1 ) ; boolean removeTrailingFileSep = false ; if ( path . endsWith ( File . separator ) ) removeTrailingFileSep = true ; if ( path . equals ( "" ) ) { path = System . getProperty ( "user.dir" ) ; } File f = new File ( path ) ; path = f . getCanonicalPath ( ) ; StringBuffer sb = new StringBuffer ( path ) ; // reappend ' * ' to canonicalized filename ( note that
// canonicalization may have removed trailing file
// separator , so we have to check for that , too )
if ( ! path . endsWith ( File . separator ) && removeTrailingFileSep ) sb . append ( File . separator ) ; sb . append ( '*' ) ; path = sb . toString ( ) ; } else if ( path . endsWith ( File . separator ) ) { // this is xxxx / x . jar ! / case . . . . .
path = path . substring ( 0 , path . length ( ) - 1 ) ; if ( path . endsWith ( "!" ) ) { path = path . substring ( 0 , path . length ( ) - 1 ) ; } } else { path = new File ( path ) . getCanonicalPath ( ) ; } // FIXME : possible convert URL ? what is check this in
// rfc
locationURL = fileToEncodedURL ( new File ( path ) ) ; // locationURL = new URL ( " file " , " " , path ) ;
if ( extractSignerCerts ) { parsedCodeSource = new CodeSource ( locationURL , getSignerCertificates ( cs ) ) ; } else { parsedCodeSource = new CodeSource ( locationURL , cs . getCertificates ( ) ) ; } } catch ( IOException ioe ) { // leave codesource as it is , unless we have to extract
// its
// signer certificates
if ( extractSignerCerts ) { parsedCodeSource = new CodeSource ( cs . getLocation ( ) , getSignerCertificates ( cs ) ) ; } } } return parsedCodeSource ; // CodeSource o = AccessController . doPrivileged ( new
// PerformURLConversionAction ( extractSignerCerts , cs ) ) ;
// return o ;


signature:
public class PolicyFileImpl { /** * Some methods to expose info about what is goign on . */
public String getCodeSources ( ) { } }

implementation: List < String > css = new ArrayList < String > ( ) ; for ( PolicyHolderEntry phe : this . currentPolicy . get ( ) . policyHolderEntries ) { css . add ( phe . getCodeSource ( ) . getLocation ( ) == null ? "default" : phe . getCodeSource ( ) . getLocation ( ) . toString ( ) ) ; } return Arrays . toString ( css . toArray ( ) ) ;


signature:
public class DataRemovalListener { /** * ( non - Javadoc )
 * @ see org . restcomm . cluster . DataRemovalListener # dataRemoved ( org . infinispan . tree . Fqn ) */
@ SuppressWarnings ( "unchecked" ) public void dataRemoved ( FqnWrapper fqnWrapper ) { } }

implementation: final Fqn fqn = fqnWrapper . getFqn ( ) ; ra . dataRemoved ( ( K ) fqn . getLastElement ( ) ) ;


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

implementation: SbbObject retval ; if ( doTraceLogs ) { logger . trace ( "makeObject() for " + serviceID + " and " + sbbComponent ) ; } final ClassLoader oldClassLoader = SleeContainerUtils . getCurrentThreadClassLoader ( ) ; try { final ClassLoader cl = sbbComponent . getClassLoader ( ) ; if ( System . getSecurityManager ( ) != null ) AccessController . doPrivileged ( new PrivilegedAction < Object > ( ) { public Object run ( ) { Thread . currentThread ( ) . setContextClassLoader ( cl ) ; return null ; } } ) ; else Thread . currentThread ( ) . setContextClassLoader ( cl ) ; retval = new SbbObjectImpl ( serviceID , sbbComponent ) ; } finally { if ( System . getSecurityManager ( ) != null ) AccessController . doPrivileged ( new PrivilegedAction < Object > ( ) { public Object run ( ) { Thread . currentThread ( ) . setContextClassLoader ( oldClassLoader ) ; return null ; } } ) ; else Thread . currentThread ( ) . setContextClassLoader ( oldClassLoader ) ; } retval . setState ( SbbObjectState . POOLED ) ; return retval ;


signature:
public class ProfileTableImpl { /** * ( non - Javadoc )
 * @ see javax . slee . profile . ProfileTable # create ( java . lang . String ) */
public ProfileLocalObject create ( String profileName ) throws NullPointerException , IllegalArgumentException , TransactionRequiredLocalException , ReadOnlyProfileException , ProfileAlreadyExistsException , CreateException , SLEEException { } }

implementation: sleeContainer . getTransactionManager ( ) . mandateTransaction ( ) ; checkProfileSpecIsNotReadOnly ( ) ; ProfileObjectImpl profileObject = createProfile ( profileName ) ; profileObject . profilePersist ( ) ; return profileObject . getProfileLocalObject ( ) ;


signature:
public class ProfileTableImpl { /** * ( non - Javadoc )
 * @ see javax . slee . profile . ProfileTable # find ( java . lang . String ) */
public ProfileLocalObject find ( String profileName ) throws NullPointerException , TransactionRequiredLocalException , SLEEException { } }

implementation: if ( profileName == null ) { throw new NullPointerException ( ) ; } ProfileObjectImpl profileObject = getProfile ( profileName ) ; return profileObject == null ? null : profileObject . getProfileLocalObject ( ) ;


signature:
public class ProfileTableImpl { /** * ( non - Javadoc )
 * @ see javax . slee . profile . ProfileTable # findAll ( ) */
public Collection < ProfileLocalObject > findAll ( ) throws TransactionRequiredLocalException , SLEEException { } }

implementation: sleeContainer . getTransactionManager ( ) . mandateTransaction ( ) ; Collection < ProfileLocalObject > result = new ArrayList < ProfileLocalObject > ( ) ; for ( ProfileEntity profileEntity : component . getProfileEntityFramework ( ) . findAll ( this . getProfileTableName ( ) ) ) { result . add ( transactionView . getProfile ( profileEntity ) . getProfileLocalObject ( ) ) ; } return Collections . unmodifiableCollection ( result ) ;


signature:
public class ProfileTableImpl { /** * ( non - Javadoc )
 * @ see javax . slee . profile . ProfileTable # remove ( java . lang . String ) */
public boolean remove ( String profileName ) throws NullPointerException , ReadOnlyProfileException , TransactionRequiredLocalException , SLEEException { } }

implementation: if ( profileName == null ) { throw new NullPointerException ( "Profile name must not be null" ) ; } checkProfileSpecIsNotReadOnly ( ) ; return this . removeProfile ( profileName , true , false ) ;


signature:
public class ProfileTableImpl { /** * ( non - Javadoc )
 * @ see javax . slee . profile . ProfileTable # findProfileByAttribute ( java . lang . String , java . lang . Object ) */
public ProfileLocalObject findProfileByAttribute ( String attributeName , Object attributeValue ) throws NullPointerException , IllegalArgumentException , TransactionRequiredLocalException , SLEEException { } }

implementation: if ( logger . isDebugEnabled ( ) ) { logger . debug ( "findProfileByAttribute( attributeName = " + attributeName + " , attributeValue = " + attributeValue + " )" ) ; } Collection < ProfileLocalObject > plocs = findProfilesByAttribute ( attributeName , attributeValue ) ; if ( plocs . size ( ) == 0 ) { return null ; } else { return plocs . iterator ( ) . next ( ) ; }


signature:
public class ProfileTableImpl { /** * ( non - Javadoc )
 * @ see javax . slee . profile . ProfileTable # findProfilesByAttribute ( java . lang . String , java . lang . Object ) */
public Collection < ProfileLocalObject > findProfilesByAttribute ( String attributeName , Object attributeValue ) throws NullPointerException , IllegalArgumentException , TransactionRequiredLocalException , SLEEException { } }

implementation:
if ( logger . isDebugEnabled ( ) ) { logger . debug ( "findProfilesByAttribute( attributeName = " + attributeName + " , attributeValue = " + attributeValue + " )" ) ; } sleeContainer . getTransactionManager ( ) . mandateTransaction ( ) ; // We get profile entities
Collection < ProfileEntity > profileEntities = null ; try { profileEntities = getProfileEntitiesByAttribute ( attributeName , attributeValue , true ) ; } catch ( AttributeNotIndexedException e ) { throw new SLEEException ( e . getMessage ( ) , e ) ; } catch ( UnrecognizedAttributeException e ) { throw new IllegalArgumentException ( e ) ; } catch ( AttributeTypeMismatchException e ) { throw new IllegalArgumentException ( e ) ; } // We need ProfileLocalObjects
ArrayList < ProfileLocalObject > plocs = new ArrayList < ProfileLocalObject > ( ) ; for ( ProfileEntity profileEntity : profileEntities ) { plocs . add ( transactionView . getProfile ( profileEntity ) . getProfileLocalObject ( ) ) ; } return Collections . unmodifiableCollection ( plocs ) ;


signature: public class ProfileTableImpl { public Collection < ProfileID > getProfilesByAttribute ( String attributeName , Object attributeValue , boolean isSlee11 ) throws UnrecognizedAttributeException , AttributeNotIndexedException , AttributeTypeMismatchException , SLEEException { } }

implementation:
if ( logger . isDebugEnabled ( ) ) { logger . debug ( "getProfilesByAttribute( attributeName = " + attributeName + " , attributeValue = " + attributeValue + " , isSlee11 = " + isSlee11 + " )" ) ; } // We get profile entities
Collection < ProfileEntity > profileEntities = getProfileEntitiesByAttribute ( attributeName , attributeValue , isSlee11 ) ; // We need ProfileIDs
Collection < ProfileID > profileIDs = new ArrayList < ProfileID > ( ) ; for ( ProfileEntity profileEntity : profileEntities ) { profileIDs . add ( new ProfileID ( profileEntity . getTableName ( ) , profileEntity . getProfileName ( ) ) ) ; } return Collections . unmodifiableCollection ( profileIDs ) ;


signature:
public class ProfileTableImpl { /** * Retrieves the { @ link ProfileEntity } s from the persistent store , matching specified attribute name and value type
 * @ param attributeName
 * @ param attributeValue
 * @ param isSlee11
 * @ return
 * @ throws UnrecognizedAttributeException
 * @ throws AttributeNotIndexedException
 * @ throws AttributeTypeMismatchException
 * @ throws SLEEException */
private Collection < ProfileEntity > getProfileEntitiesByAttribute ( String attributeName , Object attributeValue , boolean isSlee11 ) throws UnrecognizedAttributeException , AttributeNotIndexedException , AttributeTypeMismatchException , SLEEException { } }

implementation:
if ( logger . isDebugEnabled ( ) ) { logger . debug ( "getProfileEntitiesByAttribute( attributeName = " + attributeName + " , attributeValue = " + attributeValue + " , isSlee11 = " + isSlee11 + " )" ) ; } ProfileAttribute profileAttribute = getProfileAttribute ( attributeName , attributeValue ) ; if ( isSlee11 ) { // validate attr value type
if ( ! ProfileTableImpl . PROFILE_ATTR_ALLOWED_TYPES . contains ( attributeValue . getClass ( ) . getName ( ) ) ) { throw new AttributeTypeMismatchException ( attributeValue . getClass ( ) + " is not a valid profile attribute value type" ) ; } } else { if ( ! profileAttribute . isIndex ( ) ) { throw new AttributeNotIndexedException ( component . toString ( ) + " defines an attribute named " + attributeName + " but not indexed" ) ; } } return component . getProfileEntityFramework ( ) . findProfilesByAttribute ( this . getProfileTableName ( ) , profileAttribute , attributeValue ) ;


signature:
public class ProfileTableImpl { /** * Retrieves the { @ link ProfileAttribute } from the component , matching specified attribute name and value type
 * @ param attributeName
 * @ param attributeValue
 * @ return
 * @ throws NullPointerException
 * @ throws UnrecognizedAttributeException
 * @ throws AttributeTypeMismatchException */
private ProfileAttribute getProfileAttribute ( String attributeName , Object attributeValue ) throws NullPointerException , UnrecognizedAttributeException , AttributeTypeMismatchException { } }

implementation: if ( attributeName == null ) { throw new NullPointerException ( "attribute name is null" ) ; } if ( attributeValue == null ) { throw new NullPointerException ( "attribute value is null" ) ; } ProfileAttribute profileAttribute = component . getProfileAttributes ( ) . get ( attributeName ) ; if ( profileAttribute == null ) { throw new UnrecognizedAttributeException ( component . toString ( ) + " does not defines an attribute named " + attributeName ) ; } else { Class < ? > allowedProfileAttributeType = profileAttribute . getNonPrimitiveType ( ) . isArray ( ) ? profileAttribute . getNonPrimitiveType ( ) . getComponentType ( ) : profileAttribute . getNonPrimitiveType ( ) ; if ( ! allowedProfileAttributeType . getName ( ) . equals ( attributeValue . getClass ( ) . getName ( ) ) ) { throw new AttributeTypeMismatchException ( component . toString ( ) + " defines an attribute named " + attributeName + " with value type " + profileAttribute . getType ( ) + ", the specified value is of type " + attributeValue . getClass ( ) ) ; } else { return profileAttribute ; } }


signature:
public class ProfileTableImpl { /** * Determines if profile is in back end storage = = visible to other
 * compoenents than MBean , if null is passed as argumetn it must check for
 * any other than defualt ? */
public boolean profileExists ( String profileName ) { } }

implementation: boolean result = component . getProfileEntityFramework ( ) . findProfile ( this . getProfileTableName ( ) , profileName ) != null ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Profile named " + profileName + ( result ? "" : " does not" ) + " exists on table named " + this . getProfileTableName ( ) ) ; } return result ;


signature:
public class ProfileTableImpl { /** * This method renames Profile Table in backend storage . NOTE : It should not be called directly , use SleeProfileTableManager instead !
 * @ param newProfileTableName */
public void rename ( String newProfileTableName ) { } }

implementation:
// we have to do this like that cause once JPA is done , those profiles wont exist , since we do UPDATE of a table name , not a copy
// thus no profiles will be returned on this call later on . ouch : )
Collection < ProfileID > profileIDs = this . getProfiles ( ) ; component . getProfileEntityFramework ( ) . renameProfileTable ( this . profileTableName , newProfileTableName ) ; // here we remove beans .
for ( ProfileID pid : profileIDs ) { try { AbstractProfileMBeanImpl . close ( pid . getProfileTableName ( ) , pid . getProfileName ( ) ) ; } catch ( Exception e ) { if ( logger . isEnabledFor ( Level . WARN ) ) { logger . warn ( "Unexpected behaviour on MBean deregistration." , e ) ; } } }


signature:
public class ProfileTableImpl { /** * Triggers remove operation on this profile table .
 * @ throws UnrecognizedProfileTableNameException */
public void remove ( boolean isUninstall ) throws SLEEException { } }

implementation:
if ( logger . isTraceEnabled ( ) ) { logger . trace ( "removeProfileTable: removing profileTable=" + profileTableName ) ; } // remove the table profiles , at this stage they may use notification source , lets leave it .
for ( ProfileID profileID : getProfiles ( ) ) { // don ' t invoke the profile concrete object , to avoid evil profile lifecycle impls
// that rollbacks tx , as Test1110251Test
this . removeProfile ( profileID . getProfileName ( ) , false , isUninstall ) ; } // remove default profile
if ( getDefaultProfileEntity ( ) != null ) { this . removeProfile ( null , false , false ) ; } // add action after commit to remove tracer and close uncommitted mbeans
TransactionalAction commitAction = new TransactionalAction ( ) { public void execute ( ) { // remove notification sources for profile table
final TraceManagement traceMBeanImpl = sleeContainer . getTraceManagement ( ) ; traceMBeanImpl . deregisterNotificationSource ( new ProfileTableNotification ( profileTableName ) ) ; // close uncommitted mbeans
closeUncommittedProfileMBeans ( ) ; } } ; sleeContainer . getTransactionManager ( ) . getTransactionContext ( ) . getAfterCommitActions ( ) . add ( commitAction ) ; if ( sleeContainer . getSleeState ( ) == SleeState . RUNNING ) { endActivity ( ) ; } // unregister mbean
unregisterUsageMBean ( ) ; // remove object pool
profileManagement . getObjectPoolManagement ( ) . removeObjectPool ( this , sleeContainer . getTransactionManager ( ) ) ;