signature:
public class JPAProfileEntityFramework { /** * ( non - Javadoc )
 * @ see
 * org . mobicents . slee . container . component . profile . ProfileEntityFramework
 * # uninstall ( ) */
public void uninstall ( ) { } }

implementation:
synchronized ( this ) { Transaction tx = null ; try { tx = sleeTransactionManager . suspend ( ) ; } catch ( Throwable e ) { throw new SLEEException ( e . getMessage ( ) , e ) ; } if ( entityManagerFactory != null ) { entityManagerFactory . close ( ) ; } try { sleeTransactionManager . resume ( tx ) ; } catch ( Throwable e ) { throw new SLEEException ( e . getMessage ( ) , e ) ; } // component . setProfileEntityFramework ( null ) ;
}


signature:
public class JPAProfileEntityFramework { /** * Retrieves the entity manager for the current tx and the framework profile
 * spec
 * @ return */
@ SuppressWarnings ( "unchecked" ) private EntityManager getEntityManager ( ) { } }

implementation:
if ( txDataKey == null ) { txDataKey = new StringBuilder ( "jpapef.em." ) . append ( component . getProfileSpecificationID ( ) ) . toString ( ) ; } final TransactionContext txContext = sleeTransactionManager . getTransactionContext ( ) ; // look in tx
Map transactionContextData = txContext . getData ( ) ; EntityManager result = ( EntityManager ) transactionContextData . get ( txDataKey ) ; if ( result == null ) { // create using factory
result = entityManagerFactory . createEntityManager ( ) ; // store in tx context data
transactionContextData . put ( txDataKey , result ) ; // add a tx action to close it before tx commits
// FIXME : Do we need this after - rollback action here
/* final EntityManager em = result ;
 TransactionalAction action = new TransactionalAction ( ) {
 public void execute ( ) {
 try {
 em . close ( ) ;
 } catch ( Throwable e ) {
 logger . error ( e . getMessage ( ) , e ) ;
 txContext . getAfterRollbackActions ( ) . add ( action ) ; */
} return result ;


signature:
public class SleeManagementMBeanImpl { /** * Start the SLEE container
 * @ see javax . slee . management . SleeManagementMBean # start ( ) */
public void start ( ) throws InvalidStateException , ManagementException { } }

implementation:
try { // request to change to STARTING
final SleeStateChangeRequest startingRequest = new SleeStateChangeRequest ( ) { @ Override public void stateChanged ( SleeState oldState ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( generateMessageWithLogo ( "starting" ) ) ; } notifyStateChange ( oldState , getNewState ( ) ) ; } @ Override public void requestCompleted ( ) { // inner request , executed when the parent completes , to change to RUNNING
final SleeStateChangeRequest runningRequest = new SleeStateChangeRequest ( ) { private SleeState oldState ; @ Override public void stateChanged ( SleeState oldState ) { logger . info ( generateMessageWithLogo ( "started" ) ) ; this . oldState = oldState ; } @ Override public void requestCompleted ( ) { notifyStateChange ( oldState , getNewState ( ) ) ; } @ Override public boolean isBlockingRequest ( ) { return true ; } @ Override public SleeState getNewState ( ) { return SleeState . RUNNING ; } } ; try { sleeContainer . setSleeState ( runningRequest ) ; } catch ( Throwable e ) { logger . error ( "Failed to set container in RUNNING state" , e ) ; try { stop ( false ) ; } catch ( Throwable f ) { logger . error ( "Failed to set container in STOPPED state, after failure to set in RUNNING state" , e ) ; } } } @ Override public boolean isBlockingRequest ( ) { // should be false , but the tck doesn ' t like it
return true ; } @ Override public SleeState getNewState ( ) { return SleeState . STARTING ; } } ; sleeContainer . setSleeState ( startingRequest ) ; } catch ( InvalidStateException ex ) { throw ex ; } catch ( Exception ex ) { throw new ManagementException ( ex . getMessage ( ) , ex ) ; }


signature:
public class SleeManagementMBeanImpl { /** * Shutdown the SLEE processes . The spec requires that System . exit ( ) be
 * called before this methods returns . We are not convinced this is
 * necessary yet . A trivial implementation would be to make a call to the
 * JBoss server shutdown ( )
 * @ see javax . slee . management . SleeManagementMBean # shutdown ( ) */
public void shutdown ( ) throws InvalidStateException , ManagementException { } }

implementation: logger . info ( generateMessageWithLogo ( "shutdown" ) ) ; try { sleeContainer . shutdownSlee ( ) ; } catch ( InvalidStateException ex ) { throw ex ; } catch ( Exception ex ) { throw new ManagementException ( ex . getMessage ( ) ) ; }


signature:
public class SleeManagementMBeanImpl { /** * ( non - Javadoc )
 * @ see
 * javax . management . NotificationBroadcaster # addNotificationListener ( javax
 * . management . NotificationListener , javax . management . NotificationFilter ,
 * java . lang . Object ) */
public void addNotificationListener ( NotificationListener listener , NotificationFilter filter , Object handback ) throws IllegalArgumentException { } }

implementation: notificationBroadcaster . addNotificationListener ( listener , filter , handback ) ;


signature:
public class ServiceValidator { /** * See section 1.3 of jslee 1.1 specs
 * @ return */
boolean validateCompatibilityReferenceConstraints ( ) { } }

implementation:
boolean passed = true ; String errorBuffer = new String ( "" ) ; try { if ( ! this . component . isSlee11 ( ) ) { // A 1.0 SBB must not reference or use a 1.1 Profile
// Specification . This must be enforced by a 1.1
// JAIN SLEE .
ServiceComponent specComponent = this . repository . getComponentByID ( this . component . getServiceID ( ) ) ; if ( specComponent == null ) { // should not happen
passed = false ; errorBuffer = appendToBuffer ( "Referenced " + this . component . getServiceID ( ) + " was not found in component repository, this should not happen since dependencies were already verified" , "1.3" , errorBuffer ) ; } else { if ( specComponent . isSlee11 ( ) ) { passed = false ; errorBuffer = appendToBuffer ( "Service is following 1.0 JSLEE contract, it must not reference 1.1 Sbb as root: " + this . component . getServiceID ( ) , "1.3" , errorBuffer ) ; } } } } finally { if ( ! passed ) { if ( logger . isEnabledFor ( Level . ERROR ) ) { logger . error ( errorBuffer ) ; } } } return passed ;


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

implementation:
String sopts = ":bu:a:d:cr:plg" ; LongOpt [ ] lopts = { new LongOpt ( "bind" , LongOpt . NO_ARGUMENT , null , 'b' ) , // common options
new LongOpt ( "link-name" , LongOpt . REQUIRED_ARGUMENT , null , BindOperation . ra_link_name ) , new LongOpt ( "entity-name" , LongOpt . REQUIRED_ARGUMENT , null , BindOperation . ra_entity_name ) , new LongOpt ( "unbind" , LongOpt . REQUIRED_ARGUMENT , null , 'u' ) , new LongOpt ( "activate" , LongOpt . REQUIRED_ARGUMENT , null , 'a' ) , new LongOpt ( "deactivate" , LongOpt . REQUIRED_ARGUMENT , null , 'd' ) , new LongOpt ( "create" , LongOpt . NO_ARGUMENT , null , 'c' ) , // entity - name is covered
new LongOpt ( "ra-id" , LongOpt . REQUIRED_ARGUMENT , null , CreateOperation . ra_id ) , new LongOpt ( "config" , LongOpt . REQUIRED_ARGUMENT , null , CreateOperation . config ) , new LongOpt ( "remove" , LongOpt . REQUIRED_ARGUMENT , null , 'r' ) , new LongOpt ( "update-config" , LongOpt . NO_ARGUMENT , null , 'p' ) , // entity - name and config are already covered
new LongOpt ( "list" , LongOpt . NO_ARGUMENT , null , 'l' ) , new LongOpt ( "ra-entities" , LongOpt . OPTIONAL_ARGUMENT , null , ListOperation . ra_entities ) , new LongOpt ( "ra-entities-in-state" , LongOpt . REQUIRED_ARGUMENT , null , ListOperation . ra_entities_in_state ) , new LongOpt ( "ra-entities-by-link" , LongOpt . REQUIRED_ARGUMENT , null , ListOperation . ra_entities_by_link ) , new LongOpt ( "links" , LongOpt . OPTIONAL_ARGUMENT , null , ListOperation . links ) , new LongOpt ( "sbbs" , LongOpt . REQUIRED_ARGUMENT , null , ListOperation . sbbs ) , new LongOpt ( "get" , LongOpt . NO_ARGUMENT , null , 'g' ) , // ra - id is covered
new LongOpt ( "state" , LongOpt . REQUIRED_ARGUMENT , null , GetOperation . state ) , new LongOpt ( "config-by-id" , LongOpt . REQUIRED_ARGUMENT , null , GetOperation . config_by_id ) , new LongOpt ( "config-by-name" , LongOpt . REQUIRED_ARGUMENT , null , GetOperation . config_by_name ) , // new LongOpt ( " usage - mbean " , LongOpt . REQUIRED _ ARGUMENT , null , GetOperation . usage _ mbean ) ,
} ; 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 'b' : super . operation = new BindOperation ( super . context , super . log , this ) ; super . operation . buildOperation ( getopt , args ) ; break ; case 'u' : super . operation = new UnBindOperation ( super . context , super . log , this ) ; super . operation . buildOperation ( getopt , args ) ; break ; case 'a' : super . operation = new ActivateOperation ( super . context , super . log , this ) ; super . operation . buildOperation ( getopt , args ) ; break ; case 'd' : super . operation = new DeactivateOperation ( 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 'p' : super . operation = new UpdateConfigOperation ( super . context , super . log , this ) ; super . operation . buildOperation ( getopt , args ) ; break ; case 'l' : super . operation = new ListOperation ( 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 Utility { /** * This method depending if SecurityManger is present switches class loader using priviledged action ,
 * this is requried as some action may be initiated by unsecure domains .
 * @ param cl
 * @ param po
 * @ return */
public static ClassLoader switchSafelyClassLoader ( final ClassLoader cl , final ProfileObject po ) { } }

implementation: ClassLoader _cl = null ; if ( System . getSecurityManager ( ) != null ) { _cl = ( ClassLoader ) AccessController . doPrivileged ( new PrivilegedAction ( ) { public Object run ( ) { return _switchSafelyClassLoader ( cl , po ) ; } } ) ; } else { _cl = _switchSafelyClassLoader ( cl , po ) ; } return _cl ;


signature:
public class Utility { /** * Its used to embed calls in AccessController in case of insturmented code , cause javassist does not support anonmous inner class .
 * @ param proxy
 * @ param methodToCallname
 * @ param signature
 * @ param values
 * @ return */
public static Object makeSafeProxyCall ( final Object proxy , final String methodToCallname , final Class [ ] signature , final Object [ ] values ) throws PrivilegedActionException { } }

implementation:
// Here we execute in sbb / profile or any other slee component domain
// so no security calls can be made
try { // AccessControlContext acc = new AccessControlContext ( new ProtectionDomain [ ] { proxy . getClass ( ) . getProtectionDomain ( ) } ) ;
return AccessController . doPrivileged ( new PrivilegedExceptionAction ( ) { public Object run ( ) throws Exception { final Method m = proxy . getClass ( ) . getMethod ( methodToCallname , signature ) ; // Here we cross to org . mobicents domain , with all perms , once m . invoke is called , we go into proxy object domain , effective rightsd are cross section of All + proxy object domain permissions
// This is used when isolate security permissions is set to true ;
return m . invoke ( proxy , values ) ; // } } , acc ) ;
} } ) ; } catch ( SecurityException e ) { // TODO Auto - generated catch block
e . printStackTrace ( ) ; } catch ( PrivilegedActionException e ) { e . printStackTrace ( ) ; } return null ;


signature:
public class ProfileLocalObjectImpl { /** * ( non - Javadoc )
 * @ see
 * javax . slee . profile . ProfileLocalObject # isIdentical ( javax . slee . profile .
 * ProfileLocalObject ) */
public boolean isIdentical ( javax . slee . profile . ProfileLocalObject other ) throws SLEEException { } }

implementation: if ( ! ( other instanceof ProfileLocalObjectImpl ) ) { return false ; } return this . _equals ( other ) ;


signature:
public class ProfileLocalObjectImpl { /** * ( non - Javadoc )
 * @ see javax . slee . profile . ProfileLocalObject # remove ( ) */
public void remove ( ) throws TransactionRequiredLocalException , TransactionRolledbackLocalException , SLEEException { } }

implementation:
if ( logger . isDebugEnabled ( ) ) { logger . debug ( "removing profile with name " + getProfileName ( ) + " from table with name " + getProfileTableName ( ) ) ; } sleeContainer . getTransactionManager ( ) . mandateTransaction ( ) ; try { ProfileEntity profileEntity = profileObject . getProfileEntity ( ) ; if ( profileEntity != null ) { // confirm it is still the same tx
checkTransaction ( ) ; // remove
profileEntity . remove ( ) ; } else { // there is no profile assigned to the object
if ( getProfileTable ( ) . find ( getProfileName ( ) ) == null ) { // this exception has priority
throw new NoSuchObjectLocalException ( "the profile with name " + getProfileName ( ) + " was not found on table with name " + getProfileTableName ( ) ) ; } else { throw new IllegalStateException ( "the profile object is no longer valid" ) ; } } } catch ( RuntimeException e ) { try { profileObject . invalidateObject ( ) ; sleeContainer . getTransactionManager ( ) . setRollbackOnly ( ) ; } catch ( SystemException e1 ) { throw new SLEEException ( e1 . getMessage ( ) , e1 ) ; } ; throw new TransactionRolledbackLocalException ( e . getMessage ( ) , e ) ; }


signature:
public class ProfileLocalObjectImpl { /** * Verifies that the current transaction is still the one used to create the object
 * @ throws IllegalStateException */
protected void checkTransaction ( ) throws IllegalStateException { } }

implementation: try { if ( ! sleeContainer . getTransactionManager ( ) . getTransaction ( ) . equals ( this . transaction ) ) { throw new IllegalStateException ( ) ; } } catch ( SystemException e ) { throw new IllegalStateException ( ) ; }


signature:
public class ProfileLocalObjectImpl { /** * Process a { @ link RuntimeException } occurred when invoking a method in the custom local object interface .
 * @ param e
 * @ throws SLEEException
 * @ throws TransactionRolledbackLocalException */
protected void processRuntimeException ( RuntimeException e ) throws SLEEException , TransactionRolledbackLocalException { } }

implementation: try { profileObject . invalidateObject ( ) ; sleeContainer . getTransactionManager ( ) . setRollbackOnly ( ) ; } catch ( SystemException e1 ) { throw new SLEEException ( e1 . getMessage ( ) , e1 ) ; } throw new TransactionRolledbackLocalException ( e . getMessage ( ) , e ) ;


signature:
public class ProfileLocalObjectImpl { /** * Process a { @ link PrivilegedActionException } occurred when invoking a method in the custom local object interface .
 * @ param e
 * @ throws Exception
 * @ throws TransactionRolledbackLocalException */
protected void processPrivilegedActionException ( PrivilegedActionException e ) throws Exception , TransactionRolledbackLocalException { } }

implementation: if ( e . getCause ( ) instanceof RuntimeException ) { processRuntimeException ( ( RuntimeException ) e . getCause ( ) ) ; } else if ( e . getCause ( ) instanceof Exception ) { throw ( Exception ) e . getCause ( ) ; } else { throw new SLEEException ( "unexpected type of cause" , e . getCause ( ) ) ; }


signature:
public class ActivityServiceImpl { /** * Calculates the Activity TTL
 * @ param lastAccess time of last access to activity ( in milliseconds )
 * @ param timeout activity max idle time ( in seconds )
 * @ return a String with TTL value ( in seconds ) */
private static String toTTL ( String lastAccess , long timeout ) { } }

implementation: Long ttl = timeout - ( ( System . currentTimeMillis ( ) - Long . parseLong ( lastAccess ) ) / 1000 ) ; return ttl . toString ( ) ;


signature:
public class AbstractProfileEvent { /** * Verifies if the specified class can be loaded by current thread class loader
 * @ return */
boolean isProfileClassVisible ( ) { } }

implementation: try { Thread . currentThread ( ) . getContextClassLoader ( ) . loadClass ( profileAfterAction . getClass ( ) . getName ( ) ) ; return true ; } catch ( Throwable e ) { return false ; }


signature:
public class AbstractProfileEvent { /** * Retrieves a local object valid for thus current transaction .
 * @ param profilePojo
 * @ return
 * @ throws TransactionRequiredLocalException */
ProfileObjectImpl getProfileObjectValidInCurrentTransaction ( ProfileEntity profileEntity ) throws TransactionRequiredLocalException { } }

implementation:
// check tx
final SleeTransactionManager txManager = profileManagement . getSleeContainer ( ) . getTransactionManager ( ) ; txManager . mandateTransaction ( ) ; // look for an assigned object in local map
if ( txData == null ) { txData = new HashMap < ProfileEntity , ProfileObjectImpl > ( ) ; } ProfileObjectImpl profileObject = ( ProfileObjectImpl ) txData . get ( profileEntity ) ; if ( profileObject == null ) { // get an object from the table
profileEntity . setReadOnly ( true ) ; profileEntity . setDirty ( false ) ; ProfileObjectPool pool = profileManagement . getObjectPoolManagement ( ) . getObjectPool ( profileEntity . getTableName ( ) ) ; profileObject = pool . borrowObject ( ) ; profileObject . profileActivate ( profileEntity ) ; ProfileTableTransactionView . passivateProfileObjectOnTxEnd ( txManager , profileObject , pool ) ; txData . put ( profileEntity , profileObject ) ; } return profileObject ;


signature:
public class LogManagementMBeanUtils { /** * SImilar to LoggingMXBean , return list of available loggers . Filter is string that has to occur in loggers name .
 * @ param - specifies string that has to occur in loggers name , if null - all names are returned . ( Simply regex )
 * @ return */
public List < String > getLoggerNames ( String regex ) throws ManagementConsoleException { } }

implementation: try { return ( List < String > ) this . mbeanServer . invoke ( logMgmtMBeanName , "getLoggerNames" , new Object [ ] { regex } , new String [ ] { "java.lang.String" } ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; throw new ManagementConsoleException ( SleeManagementMBeanUtils . doMessage ( e ) ) ; }


signature:
public class LogManagementMBeanUtils { /** * Resets all loggers level to default one */
public void resetLoggerLevels ( ) throws ManagementConsoleException { } }

implementation: try { this . mbeanServer . invoke ( logMgmtMBeanName , "resetLoggerLevels" , null , null ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; throw new ManagementConsoleException ( SleeManagementMBeanUtils . doMessage ( e ) ) ; }


signature:
public class LogManagementMBeanUtils { /** * Removes all loggers under certain branch .
 * @ param name
 * - logger name ( branch name ) */
public void clearLoggers ( String name ) throws ManagementConsoleException { } }

implementation: try { this . mbeanServer . invoke ( logMgmtMBeanName , "clearLoggers" , new Object [ ] { name } , new String [ ] { "java.lang.String" } ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; throw new ManagementConsoleException ( SleeManagementMBeanUtils . doMessage ( e ) ) ; }


signature:
public class LogManagementMBeanUtils { /** * Tries to add logger if it doesnt exist
 * @ param name
 * - name of logger
 * @ param level
 * - level for this logger , if < b > null < / b > than default level for logger is used
 * @ return < ul >
 * < li > < b > true < / b > - if logger didnt exist and it was created < / li >
 * < li > < b > false < / b > - if logger did exist and it was not created < / li >
 * < / ul >
 * @ throws NullPointerException
 * - when arg is null { } */
public boolean addLogger ( String name , Level level ) throws NullPointerException , ManagementConsoleException { } }

implementation: try { return ( ( Boolean ) this . mbeanServer . invoke ( logMgmtMBeanName , "addLogger" , new Object [ ] { name , level } , new String [ ] { "java.lang.String" , "java.util.logging.Level" } ) ) . booleanValue ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; throw new ManagementConsoleException ( SleeManagementMBeanUtils . doMessage ( e ) ) ; }


signature:
public class LogManagementMBeanUtils { /** * Adds SocketHandler to certain logger , this logger must exist prior this function is called
 * @ param loggerName
 * - name of the logger , cant be null
 * @ param handlerLevel
 * - level for this handler , if its null default level for handlers will be used
 * @ param handlerName
 * - name for this handler , cant be duplicate .
 * @ param formaterClassName
 * - name of formater class for this handler , can be null .
 * @ param filterClassName
 * - name of filter class for this handler , can be null .
 * @ param host
 * - host address
 * @ param port
 * - port address
 * @ throws IllegalArgumentException
 * - thrown when :
 * < ul >
 * < li > host is not a valid inet address < / li >
 * < li > port < 0 < / li >
 * < / ul >
 * @ throws NullPointerException
 * - if arg other than :
 * < ul >
 * < li > formaterClassName < / li >
 * < li > filterClassName < / li >
 * < li > handlerLevel < / li >
 * < / ul >
 * is null .
 * @ throws IllegalStateException
 * : - thrown when :
 * < ul >
 * < li > Logger under certain name doesnt exist < / li >
 * < li > handler name is duplicate of another handler for this logger or is reserved one - > NOTIFICATION < / li >
 * < / ul >
 * @ throw IOException - when host cant be reached */
public void addSocketHandler ( String loggerName , Level handlerLevel , String handlerName , String formaterClassName , String filterClassName , String host , int port ) throws ManagementConsoleException { } }

implementation: try { this . mbeanServer . invoke ( logMgmtMBeanName , "addSocketHandler" , new Object [ ] { loggerName , handlerLevel , handlerName , formaterClassName , filterClassName , host , port } , new String [ ] { "java.lang.String" , "java.util.logging.Level" , "java.lang.String" , "java.lang.String" , "java.lang.String" , "java.lang.String" , "int" } ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; throw new ManagementConsoleException ( SleeManagementMBeanUtils . doMessage ( e ) ) ; }


signature:
public class LogManagementMBeanUtils { /** * Tries to remove handler from logger .
 * @ param loggerName
 * - name of the logger
 * @ param handlerName
 * - handler name that has been added by this MBean
 * @ return < ul >
 * < li > < b > true < / b > - if logger exists , and it was removed < / li >
 * < li > < b > false < / b > - otherwise < / li >
 * < / ul > */
public boolean removeHandler ( String loggerName , String handlerName ) throws ManagementConsoleException { } }

implementation: try { return ( ( Boolean ) this . mbeanServer . invoke ( logMgmtMBeanName , "removeHandler" , new Object [ ] { loggerName , handlerName } , new String [ ] { "java.lang.String" , "java.lang.String" } ) ) . booleanValue ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; throw new ManagementConsoleException ( SleeManagementMBeanUtils . doMessage ( e ) ) ; }


signature:
public class LogManagementMBeanUtils { /** * Adds notification handler to logger if it exists . Its name is set to < b > NOTIFICATION < / b > . There can be only one notification handler .
 * This handler holds reference to up to numberOfEntries log entries and fires notification . Notification can be triggered prematurely in
 * case when someone calls fetchLogContent function , this will cause notification to be fired along with log entries return as outcome of
 * invocation .
 * @ param loggerName
 * - name of the logger , it must exists prior this function call
 * @ param numberOfEntries
 * - number of log entries after notification is sent . If < = 0 default value is used
 * @ param level
 * - level for this handler , if null , default value is used
 * @ param formaterClassName
 * - name of formater class for this handler , can be null .
 * @ param filterClassName
 * - name of filter class for this handler , can be null .
 * @ throws IllegalArgumentException
 * thrown when :
 * < ul >
 * < li > logger under certain name does not exist < / li >
 * < li > formaterClassName is not valid formater class < / li >
 * < li > filterClassName is not valid filter class < / li >
 * < / ul >
 * @ throws IllegalStateException
 * - logger under that name already has notification handler
 * @ throws NullPointerException
 * - loggerName is null */
public void addNotificationHandler ( String loggerName , int numberOfEntries , Level level , String formaterClassName , String filterClassName ) throws IllegalArgumentException , IllegalStateException , NullPointerException , ManagementConsoleException { } }

implementation: try { this . mbeanServer . invoke ( logMgmtMBeanName , "addNotificationHandler" , new Object [ ] { loggerName , numberOfEntries , level , formaterClassName , filterClassName } , new String [ ] { "java.lang.String" , "int" , "java.util.logging.Logger" , "java.lang.String" , "java.lang.String" } ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; throw new ManagementConsoleException ( SleeManagementMBeanUtils . doMessage ( e ) ) ; }


signature:
public class DefaultOperationsPanel { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . container . management . console . client . common . CommonControl # onShow ( ) */
public void onShow ( ) { } }

implementation:
ListPanel operations = new ListPanel ( ) ; operations . setWidth ( "100%" ) ; this . display . setHorizontalAlignment ( DockPanel . ALIGN_CENTER ) ; this . display . setVerticalAlignment ( DockPanel . ALIGN_TOP ) ; this . display . add ( operations , DockPanel . CENTER ) ; this . display . setCellHeight ( operations , "100%" ) ; this . display . setCellWidth ( operations , "100%" ) ; operations . setHeader ( 0 , "Operation name" ) ; operations . setHeader ( 1 , "Parameters" ) ; operations . setHeader ( 2 , "Operation trigger" ) ; // operations . setHeader ( 3 , " Operation detials " ) ;
operations . setColumnWidth ( 0 , "33%" ) ; operations . setColumnWidth ( 1 , "33%" ) ; operations . setColumnWidth ( 2 , "33%" ) ; // operations . setColumnWidth ( 3 , " 55 % " ) ;
// Operations
// Set degault logger level
operations . setCellText ( 1 , 0 , "Default logger level" ) ; operations . setCell ( 1 , 1 , null ) ; operations . setCell ( 1 , 2 , _defaultLoggerLevel ) ; // operations . setCellText ( 1 , 3 , _ ll _ Explanation ) ;
_defaultLoggerLevel . setTitle ( _ll_Explanation ) ; // Set default handler level
operations . setCellText ( 2 , 0 , "Default handler level" ) ; operations . setCell ( 2 , 1 , null ) ; operations . setCell ( 2 , 2 , _defaultHandlerLevel ) ; // operations . setCell ( 2 , 3 , new Label ( _ hl _ Explanation , true ) ) ;
_defaultHandlerLevel . setTitle ( _hl_Explanation ) ; // read cfg
Hyperlink readLink = new Hyperlink ( "Trigger" , null ) ; // final TextBox uri = new TextBox ( ) ;
operations . setCellText ( 3 , 0 , "Read logger cfg" ) ; operations . setCell ( 3 , 1 , _readUri ) ; operations . setCell ( 3 , 2 , readLink ) ; // operations . setCellText ( 3 , 3 , _ cfg _ Explanation ) ;
readLink . setTitle ( _cfg_Explanation ) ; // reset loggers
Hyperlink resetLink = new Hyperlink ( "Trigger" , null ) ; // final TextBox resetRegex = new TextBox ( ) ;
operations . setCellText ( 4 , 0 , "Reset loggers level" ) ; operations . setCell ( 4 , 1 , _resetLoggerList ) ; operations . setCell ( 4 , 2 , resetLink ) ; resetLink . setTitle ( _reset_Explanation ) ; // clear loggers loggers
Hyperlink clearLink = new Hyperlink ( "Trigger" , null ) ; // final TextBox clearRegex = new TextBox ( ) ;
operations . setCellText ( 5 , 0 , "Turns off loggers" ) ; operations . setCell ( 5 , 1 , _clearLoggerList ) ; operations . setCell ( 5 , 2 , clearLink ) ; clearLink . setTitle ( _cclear_Explanation ) ; // clear loggers loggers
Hyperlink addLogger = new Hyperlink ( "Trigger" , null ) ; // final TextBox clearRegex = new TextBox ( ) ;
operations . setCellText ( 6 , 0 , "Add logger" ) ; operations . setCell ( 6 , 1 , _newLoggerName ) ; operations . setCell ( 6 , 2 , addLogger ) ; addLogger . setTitle ( _add_Logger_Explanation ) ; Hyperlink setInterval = new Hyperlink ( "Trigger" , null ) ; // final TextBox clearRegex = new TextBox ( ) ;
operations . setCellText ( 7 , 0 , "Default notification" ) ; operations . setCell ( 7 , 1 , _defaultNotificationInterval ) ; operations . setCell ( 7 , 2 , setInterval ) ; // clearLink . setTitle ( _ add _ Logger _ Explanation ) ;
// Click listeners
_defaultLoggerLevel . addClickListener ( new ClickListener ( ) { public void onClick ( Widget arg0 ) { ServerConnection . logServiceAsync . setDefaultLoggerLevel ( _defaultLoggerLevel . getItemText ( _defaultLoggerLevel . getSelectedIndex ( ) ) , new AsyncCallback ( ) { public void onFailure ( Throwable t ) { UserInterface . getLogPanel ( ) . error ( "Failed to set value due to:" + t . getMessage ( ) ) ; } public void onSuccess ( Object arg0 ) { // TODO Auto - generated method stub
} } ) ; } } ) ; _defaultHandlerLevel . addClickListener ( new ClickListener ( ) { public void onClick ( Widget arg0 ) { ServerConnection . logServiceAsync . setDefaultHandlerLevel ( _defaultHandlerLevel . getItemText ( _defaultHandlerLevel . getSelectedIndex ( ) ) , new AsyncCallback ( ) { public void onFailure ( Throwable t ) { UserInterface . getLogPanel ( ) . error ( "Failed to set value due to:" + t . getMessage ( ) ) ; } public void onSuccess ( Object arg0 ) { // TODO Auto - generated method stub
} } ) ; } } ) ; readLink . addClickListener ( new ClickListener ( ) { public void onClick ( Widget arg0 ) { ServerConnection . logServiceAsync . reReadConf ( _readUri . getText ( ) , new AsyncCallback ( ) { public void onFailure ( Throwable t ) { UserInterface . getLogPanel ( ) . error ( "Failed to set value due to:" + t . getMessage ( ) ) ; } public void onSuccess ( Object arg0 ) { logStructureTreePanel . refreshData ( ) ; } } ) ; } } ) ; resetLink . addClickListener ( new ClickListener ( ) { public void onClick ( Widget arg0 ) { ServerConnection . logServiceAsync . resetLoggerLevel ( _resetLoggerList . getText ( ) , new AsyncCallback ( ) { public void onFailure ( Throwable t ) { UserInterface . getLogPanel ( ) . error ( "Failed to set value due to:" + t . getMessage ( ) ) ; } public void onSuccess ( Object arg0 ) { logStructureTreePanel . refreshData ( ) ; } } ) ; } } ) ; clearLink . addClickListener ( new ClickListener ( ) { public void onClick ( Widget arg0 ) { ServerConnection . logServiceAsync . clearLoggers ( _clearLoggerList . getText ( ) , new AsyncCallback ( ) { public void onFailure ( Throwable t ) { UserInterface . getLogPanel ( ) . error ( "Failed to set value due to:" + t . getMessage ( ) ) ; } public void onSuccess ( Object arg0 ) { logStructureTreePanel . refreshData ( ) ; } } ) ; } } ) ; addLogger . addClickListener ( new ClickListener ( ) { public void onClick ( Widget arg0 ) { ServerConnection . logServiceAsync . addLogger ( _newLoggerName . getText ( ) , _defaultLoggerLevel . getItemText ( _defaultLoggerLevel . getSelectedIndex ( ) ) , new AsyncCallback ( ) { public void onFailure ( Throwable t ) { UserInterface . getLogPanel ( ) . error ( "Failed to set value due to:" + t . getMessage ( ) ) ; } public void onSuccess ( Object arg0 ) { logStructureTreePanel . refreshData ( ) ; } } ) ; } } ) ; setInterval . addClickListener ( new ClickListener ( ) { public void onClick ( Widget arg0 ) { int di = - 1 ; try { di = Integer . valueOf ( _defaultNotificationInterval . getText ( ) ) . intValue ( ) ; } catch ( Exception e ) { UserInterface . getLogPanel ( ) . error ( "Failed to parse due:" + e . getMessage ( ) ) ; return ; } ServerConnection . logServiceAsync . setDefaultNotificationInterval ( di , new AsyncCallback ( ) { public void onFailure ( Throwable t ) { UserInterface . getLogPanel ( ) . error ( "Failed to set value due to:" + t . getMessage ( ) ) ; } public void onSuccess ( Object arg0 ) { // TODO Auto - generated method stub
} } ) ; } } ) ; // Some fetches :
ServerConnection . logServiceAsync . getDefaultNotificationInterval ( new AsyncCallback ( ) { public void onFailure ( Throwable t ) { UserInterface . getLogPanel ( ) . error ( "Failed to get value of default notification interval due to:" + t . getMessage ( ) ) ; } public void onSuccess ( Object o ) { _defaultNotificationInterval . setText ( o + "" ) ; } } ) ; ServerConnection . logServiceAsync . getDefaultHandlerLevel ( new AsyncCallback ( ) { public void onFailure ( Throwable t ) { UserInterface . getLogPanel ( ) . error ( "Failed to get value of default handler level due to:" + t . getMessage ( ) ) ; } public void onSuccess ( Object arg0 ) { setValue ( ( String ) arg0 , _defaultHandlerLevel ) ; } } ) ; ServerConnection . logServiceAsync . getDefaultLoggerLevel ( new AsyncCallback ( ) { public void onFailure ( Throwable t ) { UserInterface . getLogPanel ( ) . error ( "Failed to get value of default handler level due to:" + t . getMessage ( ) ) ; } public void onSuccess ( Object arg0 ) { setValue ( ( String ) arg0 , _defaultLoggerLevel ) ; } } ) ;


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

implementation: switch ( value ) { case ADDRESS_SCREENING_UNDEFINED : return UNDEFINED ; case ADDRESS_SCREENING_USER_NOT_VERIFIED : return USER_NOT_VERIFIED ; case ADDRESS_SCREENING_USER_VERIFIED_PASSED : return USER_VERIFIED_PASSED ; case ADDRESS_SCREENING_USER_VERIFIED_FAILED : return USER_VERIFIED_FAILED ; case ADDRESS_SCREENING_NETWORK : return NETWORK ; default : throw new IllegalArgumentException ( "Invalid value: " + value ) ; }


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

implementation: if ( value == null ) throw new NullPointerException ( "value is null" ) ; if ( value . equalsIgnoreCase ( UNDEFINED_STRING ) ) return UNDEFINED ; if ( value . equalsIgnoreCase ( USER_NOT_VERIFIED_STRING ) ) return USER_NOT_VERIFIED ; if ( value . equalsIgnoreCase ( USER_VERIFIED_PASSED_STRING ) ) return USER_VERIFIED_PASSED ; if ( value . equalsIgnoreCase ( USER_VERIFIED_FAILED_STRING ) ) return USER_VERIFIED_FAILED ; if ( value . equalsIgnoreCase ( NETWORK_STRING ) ) return NETWORK ; throw new IllegalArgumentException ( "Invalid value: " + value ) ;


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

implementation: Object jaxbPojo = buildJAXBPojo ( inputStream ) ; List < ResourceAdaptorTypeDescriptorImpl > result = new ArrayList < ResourceAdaptorTypeDescriptorImpl > ( ) ; boolean isSlee11 = false ; MResourceAdaptorTypeJar mResourceAdaptorTypeJar = null ; if ( jaxbPojo instanceof org . mobicents . slee . container . component . deployment . jaxb . slee . ratype . ResourceAdaptorTypeJar ) { mResourceAdaptorTypeJar = new MResourceAdaptorTypeJar ( ( org . mobicents . slee . container . component . deployment . jaxb . slee . ratype . ResourceAdaptorTypeJar ) jaxbPojo ) ; } else if ( jaxbPojo instanceof org . mobicents . slee . container . component . deployment . jaxb . slee11 . ratype . ResourceAdaptorTypeJar ) { mResourceAdaptorTypeJar = new MResourceAdaptorTypeJar ( ( org . mobicents . slee . container . component . deployment . jaxb . slee11 . ratype . ResourceAdaptorTypeJar ) jaxbPojo ) ; isSlee11 = true ; } else { throw new SLEEException ( "unexpected class of jaxb pojo built: " + ( jaxbPojo != null ? jaxbPojo . getClass ( ) : null ) ) ; } for ( MResourceAdaptorType mResourceAdaptorType : mResourceAdaptorTypeJar . getResourceAdaptorType ( ) ) { result . add ( new ResourceAdaptorTypeDescriptorImpl ( mResourceAdaptorType , isSlee11 ) ) ; } return result ;


signature:
public class SbbEntityImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . container . sbbentity . SbbEntity # getCMPField ( java . lang . String ) */
public Object getCMPField ( String cmpFieldName ) { } }

implementation: if ( log . isDebugEnabled ( ) ) { log . debug ( "Sbb entity " + getSbbEntityId ( ) + " getting cmp field " + cmpFieldName ) ; } sleeContainer . getTransactionManager ( ) . mandateTransaction ( ) ; return cacheData . getCmpField ( cmpFieldName ) ;


signature:
public class SbbEntityImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . container . sbbentity . SbbEntity # setCMPField ( java . lang . String , java . lang . Object ) */
public void setCMPField ( String cmpFieldName , Object cmpFieldValue ) { } }

implementation: if ( log . isDebugEnabled ( ) ) { log . debug ( "Sbb entity " + getSbbEntityId ( ) + " setting cmp field " + cmpFieldName + " to value " + cmpFieldValue ) ; } sleeContainer . getTransactionManager ( ) . mandateTransaction ( ) ; cacheData . setCmpField ( cmpFieldName , cmpFieldValue ) ;


signature:
public class SbbEntityImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . runtime . sbbentity . SbbEntity # afterACAttach ( org . mobicents . slee . runtime . activity . ActivityContextHandle ) */
public void afterACAttach ( ActivityContextHandle ach ) { } }

implementation:
// add to cache
cacheData . attachActivityContext ( ach ) ; // update event mask
Set < EventTypeID > maskedEvents = getSbbComponent ( ) . getDescriptor ( ) . getDefaultEventMask ( ) ; if ( maskedEvents != null && ! maskedEvents . isEmpty ( ) ) { cacheData . updateEventMask ( ach , new HashSet < EventTypeID > ( maskedEvents ) ) ; } if ( log . isDebugEnabled ( ) ) { log . debug ( "Sbb entity " + getSbbEntityId ( ) + " attached to AC with handle " + ach + " , events added to current mask: " + maskedEvents ) ; }


signature:
public class SbbEntityImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . runtime . sbbentity . SbbEntity # afterACDetach ( org . mobicents . slee . runtime . activity . ActivityContextHandle ) */
public void afterACDetach ( ActivityContextHandle ach ) { } }

implementation:
// remove from cache
cacheData . detachActivityContext ( ach ) ; if ( log . isDebugEnabled ( ) ) { log . debug ( "Sbb entity " + getSbbEntityId ( ) + " detached from AC with handle " + ach ) ; }


signature:
public class SbbEntityImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . runtime . sbbentity . SbbEntity # getPriority ( ) */
public byte getPriority ( ) { } }

implementation:
if ( priority == null ) { priority = cacheData . getPriority ( ) ; } if ( priority == null ) { // TODO check if alternative to fetch default priority and have non null only for custom performs good
return 0 ; } return priority . byteValue ( ) ;


signature:
public class SbbEntityImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . runtime . sbbentity . SbbEntity # setPriority ( byte ) */
public void setPriority ( byte value ) { } }

implementation: priority = Byte . valueOf ( value ) ; cacheData . setPriority ( priority ) ; if ( log . isDebugEnabled ( ) ) { log . debug ( "Sbb entity " + getSbbEntityId ( ) + " priority set to " + priority ) ; }


signature:
public class SbbEntityImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . runtime . sbbentity . SbbEntity # remove ( ) */
public void remove ( ) { } }

implementation:
if ( doTraceLogs ) { log . trace ( "remove()" ) ; } // removes the SBB entity from all Activity Contexts .
for ( Iterator < ActivityContextHandle > i = this . getActivityContexts ( ) . iterator ( ) ; i . hasNext ( ) ; ) { ActivityContextHandle ach = i . next ( ) ; // get ac
ActivityContext ac = sleeContainer . getActivityContextFactory ( ) . getActivityContext ( ach ) ; // remove the sbb entity from the attachment set .
if ( ac != null && ! ac . isEnding ( ) ) { ac . detachSbbEntity ( this . sbbeId ) ; } // no need to remove ac from entity because the entity is being
// removed
} // It invokes the appropriate life cycle methods ( see Section 6.3 ) of an
// SBB object that caches the SBB entity state .
boolean invokingServiceSet = SleeThreadLocals . getInvokingService ( ) != null ; if ( ! invokingServiceSet ) { SleeThreadLocals . setInvokingService ( getServiceId ( ) ) ; } try { if ( this . sbbObject == null ) { this . assignSbbObject ( ) ; } removeAndReleaseSbbObject ( ) ; } catch ( Exception e ) { try { sleeContainer . getTransactionManager ( ) . setRollbackOnly ( ) ; this . trashObject ( ) ; } catch ( Exception e2 ) { throw new RuntimeException ( "Transaction Failure." , e2 ) ; } } finally { if ( ! invokingServiceSet ) { SleeThreadLocals . setInvokingService ( null ) ; } } // remove children
for ( SbbEntityID childSbbEntityId : cacheData . getAllChildSbbEntities ( ) ) { SbbEntity childSbbEntity = sbbEntityFactory . getSbbEntity ( childSbbEntityId , false ) ; if ( childSbbEntity != null ) { // recreate the sbb entity and remove it
sbbEntityFactory . removeSbbEntity ( childSbbEntity , false ) ; } } cacheData . remove ( ) ; if ( log . isDebugEnabled ( ) ) { log . debug ( "Removed sbb entity " + getSbbEntityId ( ) ) ; }


signature:
public class SbbEntityImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . runtime . sbbentity . SbbEntity # trashObject ( ) */
public void trashObject ( ) { } }

implementation:
try { // FIXME shouldn ' t just return the object to the pool ?
getObjectPool ( ) . returnObject ( sbbObject ) ; this . sbbObject = null ; } catch ( Exception e ) { throw new RuntimeException ( "Unexpected exception " , e ) ; }


signature:
public class SbbEntityImpl { /** * / * ( non - Javadoc )
 * @ see org . mobicents . slee . runtime . sbbentity . SbbEntity # sbbRolledBack ( java . lang . Object , javax . slee . ActivityContextInterface , boolean ) */
public void sbbRolledBack ( Object event , ActivityContextInterface activityContextInterface , boolean removeRollback ) { } }

implementation: if ( sbbObject != null ) { sbbObject . sbbRolledBack ( event , activityContextInterface , removeRollback ) ; passivateAndReleaseSbbObject ( ) ; }


signature:
public class SbbEntityImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . runtime . sbbentity . SbbEntity # getSbbId ( ) */
public SbbID getSbbId ( ) { } }

implementation:
if ( _sbbID == null ) { ServiceComponent serviceComponent = sleeContainer . getComponentRepository ( ) . getComponentByID ( getServiceId ( ) ) ; SbbComponent sbbComponent = null ; if ( sbbeId . isRootSbbEntity ( ) ) { _sbbID = serviceComponent . getRootSbbComponent ( ) . getSbbID ( ) ; } else { // put chain of parent sbb entity ids in a stack
final LinkedList < SbbEntityID > stack = new LinkedList < SbbEntityID > ( ) ; SbbEntityID sbbEntityID = sbbeId . getParentSBBEntityID ( ) ; while ( ! sbbEntityID . isRootSbbEntity ( ) ) { stack . push ( sbbEntityID ) ; sbbEntityID = sbbEntityID . getParentSBBEntityID ( ) ; } // now find out the sbb component of the parent
sbbComponent = serviceComponent . getRootSbbComponent ( ) ; GetChildRelationMethodDescriptor getChildRelationMethodDescriptor = null ; while ( ! stack . isEmpty ( ) ) { sbbEntityID = stack . pop ( ) ; getChildRelationMethodDescriptor = sbbComponent . getDescriptor ( ) . getGetChildRelationMethodsMap ( ) . get ( sbbEntityID . getParentChildRelation ( ) ) ; sbbComponent = sleeContainer . getComponentRepository ( ) . getComponentByID ( getChildRelationMethodDescriptor . getSbbID ( ) ) ; } getChildRelationMethodDescriptor = sbbComponent . getDescriptor ( ) . getGetChildRelationMethodsMap ( ) . get ( sbbeId . getParentChildRelation ( ) ) ; _sbbID = getChildRelationMethodDescriptor . getSbbID ( ) ; } } return _sbbID ;


signature:
public class SbbEntityImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . runtime . sbbentity . SbbEntity # invokeEventHandler ( org . mobicents . slee . core . event . SleeEvent , org . mobicents . slee . runtime . activity . ActivityContext , org . mobicents . slee . core . event . EventContext ) */
public void invokeEventHandler ( EventContext sleeEvent , ActivityContext ac , EventContext eventContextImpl ) throws Exception { } }

implementation:
// get event handler method
final SbbComponent sbbComponent = getSbbComponent ( ) ; final EventHandlerMethod eventHandlerMethod = sbbComponent . getEventHandlerMethods ( ) . get ( sleeEvent . getEventTypeId ( ) ) ; // build aci
ActivityContextInterface aci = asSbbActivityContextInterface ( ac . getActivityContextInterface ( ) ) ; // now build the param array
final Object [ ] parameters ; if ( eventHandlerMethod . getHasEventContextParam ( ) ) { parameters = new Object [ ] { sleeEvent . getEvent ( ) , aci , eventContextImpl } ; } else { parameters = new Object [ ] { sleeEvent . getEvent ( ) , aci } ; } // store some info about the invocation in the tx context
final EventRoutingTransactionData data = new EventRoutingTransactionDataImpl ( sleeEvent , aci ) ; final TransactionContext txContext = sleeContainer . getTransactionManager ( ) . getTransactionContext ( ) ; txContext . setEventRoutingTransactionData ( data ) ; // track sbb entity invocations if reentrant
Set < SbbEntityID > invokedSbbentities = null ; if ( ! isReentrant ( ) ) { invokedSbbentities = txContext . getInvokedNonReentrantSbbEntities ( ) ; invokedSbbentities . add ( sbbeId ) ; } final JndiManagement jndiManagement = sleeContainer . getJndiManagement ( ) ; jndiManagement . pushJndiContext ( sbbComponent ) ; // invoke method
try { // This is required . Since domain chain may indicate RA for instance , or SLEE deployer . If we dont do that test : tests / runtime / security / Test1112012Test . xml and second one , w
// will fail because domain of SLEE tck ra is too restrictive ( or we have bad desgin taht allows this to happen ? )
if ( System . getSecurityManager ( ) != null ) { AccessController . doPrivileged ( new PrivilegedExceptionAction < Object > ( ) { public Object run ( ) throws IllegalAccessException , InvocationTargetException { eventHandlerMethod . getEventHandlerMethod ( ) . invoke ( sbbObject . getSbbConcrete ( ) , parameters ) ; return null ; } } ) ; } else { eventHandlerMethod . getEventHandlerMethod ( ) . invoke ( sbbObject . getSbbConcrete ( ) , parameters ) ; } } catch ( PrivilegedActionException pae ) { Throwable cause = pae . getException ( ) ; if ( cause instanceof IllegalAccessException ) { throw new RuntimeException ( cause ) ; } else if ( cause instanceof InvocationTargetException ) { // Remember the actual exception is hidden inside the
// InvocationTarget exception when you use reflection !
Throwable realException = cause . getCause ( ) ; if ( realException instanceof RuntimeException ) { throw ( RuntimeException ) realException ; } else if ( realException instanceof Error ) { throw ( Error ) realException ; } else if ( realException instanceof Exception ) { throw ( Exception ) realException ; } } else { pae . printStackTrace ( ) ; } } catch ( IllegalAccessException iae ) { throw new RuntimeException ( iae ) ; } catch ( InvocationTargetException ite ) { Throwable realException = ite . getCause ( ) ; if ( realException instanceof RuntimeException ) { throw ( RuntimeException ) realException ; } else if ( realException instanceof Error ) { throw ( Error ) realException ; } else if ( realException instanceof Exception ) { throw ( Exception ) realException ; } } catch ( Exception e ) { log . error ( e . getMessage ( ) , e ) ; } finally { jndiManagement . popJndiContext ( ) ; if ( invokedSbbentities != null ) { invokedSbbentities . remove ( sbbeId ) ; } } // remove data from tx context
txContext . setEventRoutingTransactionData ( null ) ;


signature:
public class SbbEntityImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . runtime . sbbentity . SbbEntity # passivateAndReleaseSbbObject ( ) */
public void passivateAndReleaseSbbObject ( ) { } }

implementation: this . sbbObject . sbbStore ( ) ; this . sbbObject . sbbPassivate ( ) ; this . sbbObject . setState ( SbbObjectState . POOLED ) ; this . sbbObject . setSbbEntity ( null ) ; try { getObjectPool ( ) . returnObject ( this . sbbObject ) ; } catch ( Exception e ) { log . error ( "failed to return sbb object " + sbbObject + " to pool" , e ) ; } this . sbbObject = null ; if ( childsWithSbbObjects != null ) { for ( Iterator < SbbEntity > i = childsWithSbbObjects . iterator ( ) ; i . hasNext ( ) ; ) { SbbEntity childSbbEntity = i . next ( ) ; if ( childSbbEntity . getSbbObject ( ) != null ) { Thread t = Thread . currentThread ( ) ; ClassLoader cl = t . getContextClassLoader ( ) ; t . setContextClassLoader ( childSbbEntity . getSbbComponent ( ) . getClassLoader ( ) ) ; try { childSbbEntity . passivateAndReleaseSbbObject ( ) ; } finally { t . setContextClassLoader ( cl ) ; } } i . remove ( ) ; } }


signature:
public class SbbEntityImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . runtime . sbbentity . SbbEntity # getObjectPool ( ) */
public SbbObjectPool getObjectPool ( ) { } }

implementation: if ( _pool == null ) { _pool = sleeContainer . getSbbManagement ( ) . getObjectPool ( getServiceId ( ) , getSbbId ( ) ) ; } return this . _pool ;


signature:
public class SbbEntityImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . runtime . sbbentity . SbbEntity # getChildRelation ( java . lang . String ) */
public ChildRelationImpl getChildRelation ( String accessorName ) { } }

implementation: return new ChildRelationImpl ( this . getSbbComponent ( ) . getDescriptor ( ) . getGetChildRelationMethodsMap ( ) . get ( accessorName ) , this ) ;


signature:
public class SbbEntityImpl { /** * TODO improve with sbb local object storage
 * @ return */
public SbbLocalObjectImpl getSbbLocalObject ( ) { } }

implementation:
if ( doTraceLogs ) log . trace ( "getSbbLocalObject()" ) ; // The concrete class generated in ConcreteLocalObjectGenerator
final Class < ? > sbbLocalClass = getSbbComponent ( ) . getSbbLocalInterfaceConcreteClass ( ) ; if ( sbbLocalClass != null ) { Object [ ] objs = { this } ; Constructor < ? > constructor = getSbbComponent ( ) . getSbbLocalObjectClassConstructor ( ) ; if ( constructor == null ) { final Class < ? > [ ] types = { SbbEntityImpl . class } ; try { constructor = sbbLocalClass . getConstructor ( types ) ; } catch ( Throwable e ) { throw new SLEEException ( "Unable to retrieve sbb local object generated class constructor" , e ) ; } getSbbComponent ( ) . setSbbLocalObjectClassConstructor ( constructor ) ; } try { return ( SbbLocalObjectImpl ) constructor . newInstance ( objs ) ; } catch ( Throwable e ) { throw new SLEEException ( "Failed to create Sbb Local Interface." , e ) ; } } else { return new SbbLocalObjectImpl ( this ) ; }


signature:
public class SbbEntityImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . runtime . sbbentity . SbbEntity # assignSbbObject ( ) */
public void assignSbbObject ( ) throws Exception { } }

implementation:
try { // get one object from the pool
this . sbbObject = getObjectPool ( ) . borrowObject ( ) ; // invoke the appropriate sbb life - cycle methods
this . sbbObject . setSbbEntity ( this ) ; if ( created ) { this . sbbObject . sbbCreate ( ) ; this . sbbObject . setState ( SbbObjectState . READY ) ; this . sbbObject . sbbPostCreate ( ) ; } else { this . sbbObject . sbbActivate ( ) ; this . sbbObject . setState ( SbbObjectState . READY ) ; } this . sbbObject . sbbLoad ( ) ; } catch ( Exception e ) { log . error ( "Failed to assign and create sbb object" , e ) ; if ( created ) { removeFromCache ( ) ; } throw e ; }


signature:
public class RoundRobinEventRouterExecutorMapper { /** * Computes the index of the next executor to retrieve . Adaptation of the { @ link AtomicInteger } incrementAndGet ( ) code .
 * @ return */
private int getNextIndex ( ) { } }

implementation: for ( ; ; ) { int current = index . get ( ) ; int next = ( current == executors . length ? 1 : current + 1 ) ; if ( index . compareAndSet ( current , next ) ) return next - 1 ; }


signature:
public class ProfileUsageCommand { /** * / * ( non - Javadoc )
 * @ see org . mobicents . tools . twiddle . jslee . AbstractUsageCommand # addExamples ( ) */
@ Override protected void addExamples ( PrintWriter out ) { } }

implementation: out . println ( "" ) ; out . println ( "     1. List usage parameters type for profile table:" ) ; out . println ( "" + name + " CallControlTableName -l --parameters" ) ; out . println ( "" ) ; out . println ( "     2. List existing usage parameters sets:" ) ; out . println ( "" + name + " CallControlTableName -l --sets" ) ; out . println ( "" ) ; out . println ( "     3. Get value of parameter in certain set:" ) ; out . println ( "" + name + " CallControlTableName CertainSetWithValue -g --name=CookiesCount" ) ; out . println ( "" ) ; out . println ( "     4. Get value of parameter in certain set and reset value:" ) ; out . println ( "" + name + " CallControlTableName CertainSetWithValue -g --name=CookiesCount --rst" ) ; out . println ( "" ) ; out . println ( "     5. Reset all parameters in default parameter set of table:" ) ; out . println ( "" + name + " CallControlTableName --reset" ) ; out . println ( "" ) ; out . println ( "     6. Create parameter set:" ) ; out . println ( "" + name + " CallControlTableName NewSet --create" ) ; out . println ( "" ) ; out . println ( "     7. Enable notification generation for parameter:" ) ; out . println ( "" + name + " CallControlTableName -n --name=CookiesCount --value=true" ) ;


signature:
public class TracerImpl { /** * Generates the log4j logger name for the tracer with specified named and notification source .
 * @ param tracerName
 * @ param notificationSource
 * @ return */
private String tracerNameToLog4JLoggerName ( String tracerName , NotificationSource notificationSource ) { } }

implementation: final StringBuilder sb = new StringBuilder ( "javax.slee." ) . append ( notificationSource . toString ( ) ) ; if ( ! tracerName . equals ( ROOT_TRACER_NAME ) ) { sb . append ( '.' ) . append ( tracerName ) ; } return sb . toString ( ) ;


signature:
public class TracerImpl { /** * syncs the slee tracer level with the one that related logger has in log4j */
void syncLevelWithLog4j ( ) { } }

implementation:
// get the level from log4j , only the root one uses effective level
Level log4jLevel = parent == null ? logger . getEffectiveLevel ( ) : logger . getLevel ( ) ; if ( level == null ) { // set the level
assignLog4JLevel ( log4jLevel ) ; } else { // set the level only if differs , otherwise we may loose levels not present in log4j
if ( tracerToLog4JLevel ( level ) != log4jLevel ) { assignLog4JLevel ( log4jLevel ) ; } } // the root must always have a level
if ( parent == null && level == null ) { // defaults to INFO
logger . setLevel ( Level . INFO ) ; level = TraceLevel . INFO ; } // reset the flags
resetCacheFlags ( false ) ;


signature:
public class TracerImpl { /** * assigns the equiv log4j level to the tracer
 * @ param log4jLevel */
private void assignLog4JLevel ( Level log4jLevel ) { } }

implementation: if ( log4jLevel == null ) { return ; } if ( log4jLevel == Level . DEBUG ) { level = TraceLevel . FINE ; } else if ( log4jLevel == Level . INFO ) { level = TraceLevel . INFO ; } else if ( log4jLevel == Level . WARN ) { level = TraceLevel . WARNING ; } else if ( log4jLevel == Level . ERROR ) { level = TraceLevel . SEVERE ; } else if ( log4jLevel == Level . TRACE ) { level = TraceLevel . FINEST ; } else if ( log4jLevel == Level . OFF ) { level = TraceLevel . OFF ; }


signature:
public class TracerImpl { /** * manages the flags which cache if levels are enabled */
void resetCacheFlags ( boolean resetChilds ) { } }

implementation:
if ( isTraceable ( TraceLevel . FINEST ) ) { finestEnabled = true ; finerEnabled = true ; fineEnabled = true ; configEnabled = true ; infoEnabled = true ; warningEnabled = true ; severeEnabled = true ; } else { finestEnabled = false ; if ( isTraceable ( TraceLevel . FINER ) ) { finerEnabled = true ; fineEnabled = true ; configEnabled = true ; infoEnabled = true ; warningEnabled = true ; severeEnabled = true ; } else { finerEnabled = false ; if ( isTraceable ( TraceLevel . FINE ) ) { fineEnabled = true ; configEnabled = true ; infoEnabled = true ; warningEnabled = true ; severeEnabled = true ; } else { fineEnabled = false ; if ( isTraceable ( TraceLevel . CONFIG ) ) { configEnabled = true ; infoEnabled = true ; warningEnabled = true ; severeEnabled = true ; } else { if ( isTraceable ( TraceLevel . INFO ) ) { infoEnabled = true ; warningEnabled = true ; severeEnabled = true ; } else { infoEnabled = false ; if ( isTraceable ( TraceLevel . WARNING ) ) { warningEnabled = true ; severeEnabled = true ; } else { warningEnabled = false ; if ( isTraceable ( TraceLevel . SEVERE ) ) { severeEnabled = true ; } else { severeEnabled = false ; } } } } } } } if ( resetChilds ) { // implicit change of level demands that we update reset flags on childs without level
for ( TracerImpl child : childs ) { if ( child . level == null ) { child . resetCacheFlags ( true ) ; } } }


signature:
public class TracerImpl { /** * / * ( non - Javadoc )
 * @ see javax . slee . facilities . Tracer # config ( java . lang . String ) */
public void config ( String message ) throws NullPointerException , FacilityException { } }

implementation: sendNotification ( TraceLevel . CONFIG , message , null ) ; logger . info ( message ) ;


signature:
public class TracerImpl { /** * / * ( non - Javadoc )
 * @ see javax . slee . facilities . Tracer # config ( java . lang . String , java . lang . Throwable ) */
public void config ( String message , Throwable t ) throws NullPointerException , FacilityException { } }

implementation: sendNotification ( TraceLevel . CONFIG , message , t ) ; logger . info ( message , t ) ;


signature:
public class TracerImpl { /** * / * ( non - Javadoc )
 * @ see javax . slee . facilities . Tracer # fine ( java . lang . String ) */
public void fine ( String message ) throws NullPointerException , FacilityException { } }

implementation: sendNotification ( TraceLevel . FINE , message , null ) ; logger . debug ( message ) ;


signature:
public class TracerImpl { /** * / * ( non - Javadoc )
 * @ see javax . slee . facilities . Tracer # fine ( java . lang . String , java . lang . Throwable ) */
public void fine ( String message , Throwable t ) throws NullPointerException , FacilityException { } }

implementation: sendNotification ( TraceLevel . FINE , message , t ) ; logger . debug ( message , t ) ;


signature:
public class TracerImpl { /** * / * ( non - Javadoc )
 * @ see javax . slee . facilities . Tracer # finer ( java . lang . String ) */
public void finer ( String message ) throws NullPointerException , FacilityException { } }

implementation: sendNotification ( TraceLevel . FINER , message , null ) ; logger . debug ( message ) ;


signature:
public class TracerImpl { /** * / * ( non - Javadoc )
 * @ see javax . slee . facilities . Tracer # finer ( java . lang . String , java . lang . Throwable ) */
public void finer ( String message , Throwable t ) throws NullPointerException , FacilityException { } }

implementation: sendNotification ( TraceLevel . FINER , message , t ) ; logger . debug ( message , t ) ;


signature:
public class TracerImpl { /** * / * ( non - Javadoc )
 * @ see javax . slee . facilities . Tracer # finest ( java . lang . String ) */
public void finest ( String message ) throws NullPointerException , FacilityException { } }

implementation: sendNotification ( TraceLevel . FINEST , message , null ) ; logger . trace ( message ) ;


signature:
public class TracerImpl { /** * / * ( non - Javadoc )
 * @ see javax . slee . facilities . Tracer # finest ( java . lang . String , java . lang . Throwable ) */
public void finest ( String message , Throwable t ) throws NullPointerException , FacilityException { } }

implementation: sendNotification ( TraceLevel . FINEST , message , t ) ; logger . trace ( message , t ) ;


signature:
public class TracerImpl { /** * / * ( non - Javadoc )
 * @ see javax . slee . facilities . Tracer # info ( java . lang . String ) */
public void info ( String message ) throws NullPointerException , FacilityException { } }

implementation: sendNotification ( TraceLevel . INFO , message , null ) ; logger . info ( message ) ;


signature:
public class TracerImpl { /** * / * ( non - Javadoc )
 * @ see javax . slee . facilities . Tracer # info ( java . lang . String , java . lang . Throwable ) */
public void info ( String message , Throwable t ) throws NullPointerException , FacilityException { } }

implementation: sendNotification ( TraceLevel . INFO , message , t ) ; logger . info ( message , t ) ;


signature:
public class TracerImpl { /** * / * ( non - Javadoc )
 * @ see javax . slee . facilities . Tracer # severe ( java . lang . String ) */
public void severe ( String message ) throws NullPointerException , FacilityException { } }

implementation: sendNotification ( TraceLevel . SEVERE , message , null ) ; logger . error ( message ) ;


signature:
public class TracerImpl { /** * / * ( non - Javadoc )
 * @ see javax . slee . facilities . Tracer # severe ( java . lang . String , java . lang . Throwable ) */
public void severe ( String message , Throwable t ) throws NullPointerException , FacilityException { } }

implementation: sendNotification ( TraceLevel . SEVERE , message , t ) ; logger . error ( message , t ) ;


signature:
public class TracerImpl { /** * / * ( non - Javadoc )
 * @ see javax . slee . facilities . Tracer # trace ( javax . slee . facilities . TraceLevel , java . lang . String , java . lang . Throwable ) */
public void trace ( TraceLevel traceLevel , String message , Throwable t ) throws NullPointerException , IllegalArgumentException , FacilityException { } }

implementation: sendNotification ( traceLevel , message , t ) ; logger . log ( tracerToLog4JLevel ( traceLevel ) , message , t ) ;


signature:
public class TracerImpl { /** * / * ( non - Javadoc )
 * @ see javax . slee . facilities . Tracer # warning ( java . lang . String ) */
public void warning ( String message ) throws NullPointerException , FacilityException { } }

implementation: sendNotification ( TraceLevel . WARNING , message , null ) ; logger . warn ( message ) ;


signature:
public class TracerImpl { /** * / * ( non - Javadoc )
 * @ see javax . slee . facilities . Tracer # warning ( java . lang . String , java . lang . Throwable ) */
public void warning ( String message , Throwable t ) throws NullPointerException , FacilityException { } }

implementation: sendNotification ( TraceLevel . WARNING , message , t ) ; logger . warn ( message , t ) ;


signature:
public class TracerImpl { /** * THis is internaly called , by 1.1 tracers
 * @ param src */
void sendNotification ( javax . slee . facilities . TraceLevel level , String message , Throwable t ) { } }

implementation: if ( ! isTraceable ( level ) ) { return ; } traceMBean . sendNotification ( new TraceNotification ( notificationSource . getNotificationSource ( ) . getTraceNotificationType ( ) , traceMBean , notificationSource . getNotificationSource ( ) , getTracerName ( ) , level , message , t , notificationSource . getNextSequence ( ) , System . currentTimeMillis ( ) ) ) ;


signature:
public class TracerImpl { /** * This checks if the specified tracer name is ok .
 * @ param tracerName
 * @ param notificationSource
 * @ throws InvalidArgumentException */
public static void checkTracerName ( String tracerName , NotificationSource notificationSource ) throws NullPointerException , InvalidArgumentException { } }

implementation:
if ( tracerName . equals ( "" ) ) { // This is root
return ; } StringTokenizer stringTokenizer = new StringTokenizer ( tracerName , "." , true ) ; String lastToken = null ; while ( stringTokenizer . hasMoreTokens ( ) ) { String token = stringTokenizer . nextToken ( ) ; if ( lastToken == null ) { // this is start
lastToken = token ; } if ( lastToken . equals ( token ) && token . equals ( "." ) ) { throw new InvalidArgumentException ( "Passed tracer:" + tracerName + ", name for source: " + notificationSource + ", is illegal" ) ; } lastToken = token ; } if ( lastToken . equals ( "." ) ) { throw new IllegalArgumentException ( "Passed tracer:" + tracerName + ", name for source: " + notificationSource + ", is illegal" ) ; }


signature:
public class VendorExtensionUtils { /** * Write the current object and vendor - specific data to the output stream .
 * @ param out the object output stream that the current object is being written to .
 * @ param vendorData the optional vendor data to include in the serialization stream .
 * @ throws IOException if an I / O error occurs while writing to the output stream . */
public static void writeObject ( ObjectOutputStream out , Object vendorData ) throws IOException { } }

implementation:
// write non - transient fields
out . defaultWriteObject ( ) ; // check if should we serialize vendor data ?
if ( vendorData != null ) { // serialize the vendor data
out . writeBoolean ( true ) ; // write the vendor data in a marshalled object so deserialization can be deferred
out . writeObject ( new MarshalledObject ( vendorData ) ) ; } else out . writeBoolean ( false ) ;


signature:
public class VendorExtensionUtils { /** * Read the current object in the input stream from the stream , optionally
 * deserializing any vendor - specific data in the stream .
 * @ param in the object input stream that the current object is being read from .
 * @ param vendorDataDeserializationEnabled boolean flag indicating whether or not
 * any vendor data in the serialization stream should be deserialized also .
 * @ return the vendor - specific data , or < code > null < / code > if there isn ' t any or the
 * value of the < code > vendorDataDeserializationEnabled < / code > parameter was
 * < code > false < / code > .
 * @ throws IOException if an I / O error occurs while reading from the input stream .
 * @ throws ClassNotFoundException if a class of the serialized objects could not
 * be found . */
public static Object readObject ( ObjectInputStream in , boolean vendorDataDeserializationEnabled ) throws IOException , ClassNotFoundException { } }

implementation:
// read non - transient fields
in . defaultReadObject ( ) ; // read any possible marshalled vendor data from the stream
MarshalledObject vendorData = in . readBoolean ( ) ? ( MarshalledObject ) in . readObject ( ) : null ; // now figure out what to return
return ( vendorData != null && vendorDataDeserializationEnabled ) ? vendorData . get ( ) : null ;


signature:
public class URLClassLoaderDomainImpl { /** * Adds a direct dependency to this domain . Direct dependencies are other
 * domains which the domain depends on .
 * @ param domain */
public void addDirectDependency ( URLClassLoaderDomainImpl domain ) { } }

implementation: if ( logger . isTraceEnabled ( ) ) logger . trace ( toString ( ) + " adding domain " + domain + " to direct dependencies" ) ; directDependencies . add ( domain ) ;


signature:
public class URLClassLoaderDomainImpl { /** * Retrieves a flat list containing all dependencies for the domain , i . e . , all direct dependencies and their own dependencies .
 * @ return */
public List < URLClassLoaderDomainImpl > getAllDependencies ( ) { } }

implementation: List < URLClassLoaderDomainImpl > result = new ArrayList < URLClassLoaderDomainImpl > ( ) ; this . getAllDependencies ( result ) ; return result ;


signature:
public class URLClassLoaderDomainImpl { /** * Finds a class locally , i . e . , in the URLs managed by the extended
 * URLClassLoader .
 * @ param name
 * @ return
 * @ throws ClassNotFoundException */
protected Class < ? > findClassLocally ( String name ) throws ClassNotFoundException { } }

implementation: if ( logger . isTraceEnabled ( ) ) { logger . trace ( toString ( ) + " findClassLocally: " + name ) ; } final boolean acquiredLock = acquireGlobalLock ( ) ; try { return findClassLocallyLocked ( name ) ; } finally { if ( acquiredLock ) { releaseGlobalLock ( ) ; } }


signature:
public class URLClassLoaderDomainImpl { /** * Finds a resource locally , i . e . , in the URLs managed by the extended
 * URLClassLoader .
 * @ param name
 * @ return */
protected URL findResourceLocally ( String name ) { } }

implementation: if ( logger . isTraceEnabled ( ) ) logger . trace ( toString ( ) + " findResourceLocally: " + name ) ; return super . findResource ( name ) ;


signature:
public class URLClassLoaderDomainImpl { /** * Finds resources locally , i . e . , in the URLs managed by the extended
 * URLClassLoader .
 * @ param name
 * @ return
 * @ throws IOException */
protected Enumeration < URL > findResourcesLocally ( String name ) throws IOException { } }

implementation: if ( logger . isTraceEnabled ( ) ) logger . trace ( toString ( ) + " findResourcesLocally: " + name ) ; return super . findResources ( name ) ;


signature:
public class ProfileProvisioningMBeanImpl { /** * ( non - Javadoc )
 * @ see javax . slee . management . ProfileProvisioningMBean # createProfile ( java . lang . String , java . lang . String ) */
public ObjectName createProfile ( java . lang . String profileTableName , java . lang . String profileName ) throws java . lang . NullPointerException , UnrecognizedProfileTableNameException , InvalidArgumentException , ProfileAlreadyExistsException , ManagementException { } }

implementation:
if ( logger . isDebugEnabled ( ) ) { logger . debug ( "createProfile( profileTable = " + profileTableName + " , profile = " + profileName + " )" ) ; } try { ProfileTableImpl . validateProfileName ( profileName ) ; ProfileTableImpl . validateProfileTableName ( profileTableName ) ; } catch ( IllegalArgumentException e ) { throw new InvalidArgumentException ( e . getMessage ( ) ) ; } Transaction transaction = null ; boolean rollback = true ; try { // begin tx
sleeTransactionManagement . begin ( ) ; transaction = sleeTransactionManagement . getTransaction ( ) ; // This checks if profile table exists - throws SLEEException in
// case of system level and UnrecognizedProfileTableNameException in
// case of no such table
final ProfileTableImpl profileTable = this . sleeProfileManagement . getProfileTable ( profileTableName ) ; // create profile
profileTable . createProfile ( profileName ) ; if ( sleeTransactionManagement . getRollbackOnly ( ) ) { throw new ManagementException ( "Transaction used in profile creation rolled back" ) ; } else { // create mbean and registers it
final AbstractProfileMBeanImpl profileMBean = createAndRegisterProfileMBean ( profileName , profileTable ) ; // keep track of the mbean existence
profileTable . addUncommittedProfileMBean ( profileMBean ) ; TransactionalAction action = new TransactionalAction ( ) { public void execute ( ) { profileTable . removeUncommittedProfileMBean ( profileMBean ) ; } } ; final TransactionContext txContext = sleeTransactionManagement . getTransactionContext ( ) ; txContext . getAfterCommitActions ( ) . add ( action ) ; txContext . getAfterRollbackActions ( ) . add ( action ) ; // indicate profile creation
profileMBean . createProfile ( ) ; rollback = false ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "createProfile( profileTable = " + profileTableName + " , profile = " + profileName + " ) result is " + profileMBean . getObjectName ( ) ) ; } return profileMBean . getObjectName ( ) ; } } catch ( TransactionRequiredLocalException e ) { throw new ManagementException ( e . getMessage ( ) , e ) ; } catch ( SLEEException e ) { throw new ManagementException ( e . getMessage ( ) , e ) ; } catch ( CreateException e ) { throw new ManagementException ( e . getMessage ( ) , e ) ; } catch ( NotSupportedException e ) { throw new ManagementException ( e . getMessage ( ) , e ) ; } catch ( SystemException e ) { throw new ManagementException ( e . getMessage ( ) , e ) ; } finally { if ( rollback ) { try { if ( sleeTransactionManagement . getTransaction ( ) == null ) { // the tx was suspended , resume it
sleeTransactionManagement . resume ( transaction ) ; } sleeTransactionManagement . rollback ( ) ; } catch ( Throwable e ) { logger . error ( e . getMessage ( ) , e ) ; } } }


signature:
public class ProfileProvisioningMBeanImpl { /** * Creates and registers a profile mbean for the specified object .
 * @ param profileObject
 * @ return
 * @ throws ManagementException */
private AbstractProfileMBeanImpl createAndRegisterProfileMBean ( String profileName , ProfileTableImpl profileTable ) throws ManagementException { } }

implementation:
if ( logger . isDebugEnabled ( ) ) { logger . debug ( "createAndRegisterProfileMBean( profileTable = " + profileTable + " , profileName = " + profileName + " )" ) ; } try { ProfileSpecificationComponent component = profileTable . getProfileSpecificationComponent ( ) ; Constructor < ? > constructor = component . getProfileMBeanConcreteImplClass ( ) . getConstructor ( Class . class , String . class , ProfileTableImpl . class ) ; final AbstractProfileMBeanImpl profileMBean = ( AbstractProfileMBeanImpl ) constructor . newInstance ( component . getProfileMBeanConcreteInterfaceClass ( ) , profileName , profileTable ) ; profileMBean . register ( ) ; // add a rollback action to unregister the mbean
TransactionalAction rollbackAction = new TransactionalAction ( ) { public void execute ( ) { try { profileMBean . unregister ( ) ; } catch ( Throwable e ) { logger . error ( e . getMessage ( ) , e ) ; } } } ; sleeTransactionManagement . getTransactionContext ( ) . getAfterRollbackActions ( ) . add ( rollbackAction ) ; return profileMBean ; } catch ( Throwable e ) { throw new ManagementException ( e . getMessage ( ) , e ) ; }


signature:
public class ProfileProvisioningMBeanImpl { /** * ( non - Javadoc )
 * @ see javax . slee . management . ProfileProvisioningMBean # createProfileTable ( javax . slee . profile . ProfileSpecificationID , java . lang . String ) */
public void createProfileTable ( ProfileSpecificationID specificationID , String profileTableName ) throws NullPointerException , UnrecognizedProfileSpecificationException , InvalidArgumentException , ProfileTableAlreadyExistsException , ManagementException { } }

implementation: if ( logger . isDebugEnabled ( ) ) { logger . debug ( "createProfileTable( profileTable = " + profileTableName + " , specificationID = " + specificationID + " )" ) ; } try { ProfileTableImpl . validateProfileTableName ( profileTableName ) ; } catch ( IllegalArgumentException e ) { throw new InvalidArgumentException ( e . getMessage ( ) ) ; } final SleeContainer sleeContainer = getSleeContainer ( ) ; if ( sleeContainer . getSleeState ( ) != SleeState . RUNNING ) return ; ProfileSpecificationComponent component = sleeContainer . getComponentRepository ( ) . getComponentByID ( specificationID ) ; if ( component == null ) throw new UnrecognizedProfileSpecificationException ( ) ; ClassLoader currentClassLoader = Thread . currentThread ( ) . getContextClassLoader ( ) ; boolean terminateTx = sleeTransactionManagement . requireTransaction ( ) ; boolean doRollback = true ; try { Thread . currentThread ( ) . setContextClassLoader ( component . getClassLoader ( ) ) ; sleeProfileManagement . addProfileTable ( profileTableName , component ) ; doRollback = false ; } catch ( ProfileTableAlreadyExistsException e ) { throw e ; } catch ( Throwable e ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( e . getMessage ( ) , e ) ; } throw new ManagementException ( e . getMessage ( ) , e ) ; } finally { Thread . currentThread ( ) . setContextClassLoader ( currentClassLoader ) ; try { sleeTransactionManagement . requireTransactionEnd ( terminateTx , doRollback ) ; } catch ( Throwable e ) { throw new ManagementException ( e . getMessage ( ) , e ) ; } }


signature:
public class ProfileProvisioningMBeanImpl { /** * ( non - Javadoc )
 * @ see javax . slee . management . ProfileProvisioningMBean # getDefaultProfile ( java . lang . String ) */
public ObjectName getDefaultProfile ( String profileTableName ) throws NullPointerException , UnrecognizedProfileTableNameException , ManagementException { } }

implementation:
if ( logger . isDebugEnabled ( ) ) { logger . debug ( "getDefaultProfile( profileTable = " + profileTableName + " )" ) ; } try { return _getProfile ( profileTableName , null ) ; } catch ( UnrecognizedProfileNameException e ) { // can ' t happen
throw new ManagementException ( e . getMessage ( ) , e ) ; }


signature:
public class ProfileProvisioningMBeanImpl { /** * ( non - Javadoc )
 * @ see javax . slee . management . ProfileProvisioningMBean # getProfile ( java . lang . String , java . lang . String ) */
public ObjectName getProfile ( java . lang . String profileTableName , java . lang . String profileName ) throws NullPointerException , UnrecognizedProfileTableNameException , UnrecognizedProfileNameException , ManagementException { } }

implementation: if ( logger . isDebugEnabled ( ) ) { logger . debug ( "getProfile( profileTable = " + profileTableName + " , profile = " + profileName + " )" ) ; } ProfileTableImpl . validateProfileName ( profileName ) ; ObjectName objectName = _getProfile ( profileTableName , profileName ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "getProfile( profileTable = " + profileTableName + " , profile = " + profileName + " ) result is " + objectName ) ; } return objectName ;


signature:
public class ProfileProvisioningMBeanImpl { /** * ( non - Javadoc )
 * @ see javax . slee . management . ProfileProvisioningMBean # getProfileSpecification ( java . lang . String ) */
public ProfileSpecificationID getProfileSpecification ( String profileTableName ) throws NullPointerException , UnrecognizedProfileTableNameException , ManagementException { } }

implementation:
if ( logger . isDebugEnabled ( ) ) { logger . debug ( "getProfileSpecification( profileTableName = " + profileTableName + " )" ) ; } if ( profileTableName == null ) throw new NullPointerException ( "Argument[ProfileTableName] must not be null" ) ; boolean b = false ; try { b = this . sleeTransactionManagement . requireTransaction ( ) ; ProfileTableImpl profileTable = this . sleeProfileManagement . getProfileTable ( profileTableName ) ; return profileTable . getProfileSpecificationComponent ( ) . getProfileSpecificationID ( ) ; } catch ( SLEEException e ) { throw new ManagementException ( "Failed to obtain ProfileSpecID name for ProfileTable: " + profileTableName , e ) ; } catch ( UnrecognizedProfileTableNameException e ) { throw e ; } catch ( Exception e ) { throw new ManagementException ( "Failed to obtain ProfileSpecID name for ProfileTable: " + profileTableName , e ) ; } finally { // never rollbacks
try { sleeTransactionManagement . requireTransactionEnd ( b , false ) ; } catch ( Throwable e ) { throw new ManagementException ( e . getMessage ( ) , e ) ; } }


signature:
public class ProfileProvisioningMBeanImpl { /** * ( non - Javadoc )
 * @ see javax . slee . management . ProfileProvisioningMBean # getProfileTableUsageMBean ( java . lang . String ) */
public ObjectName getProfileTableUsageMBean ( String profileTableName ) throws NullPointerException , UnrecognizedProfileTableNameException , InvalidArgumentException , ManagementException { } }

implementation:
if ( logger . isDebugEnabled ( ) ) { logger . debug ( "getProfileTableUsageMBean( profileTableName = " + profileTableName + " )" ) ; } if ( profileTableName == null ) throw new NullPointerException ( "Argument[ProfileTableName] must not be null" ) ; boolean b = this . sleeTransactionManagement . requireTransaction ( ) ; try { ProfileTableUsageMBean usageMBeanImpl = this . sleeProfileManagement . getProfileTable ( profileTableName ) . getProfileTableUsageMBean ( ) ; if ( usageMBeanImpl == null ) { throw new InvalidArgumentException ( ) ; } else { // ensure it is open
usageMBeanImpl . open ( ) ; // return its object name
return usageMBeanImpl . getObjectName ( ) ; } } catch ( SLEEException e ) { throw new ManagementException ( "Failed to obtain ProfileSpecID name for ProfileTable: " + profileTableName , e ) ; } catch ( UnrecognizedProfileTableNameException e ) { throw e ; } catch ( InvalidArgumentException e ) { throw e ; } catch ( Throwable e ) { throw new ManagementException ( "Failed to obtain ProfileSpecID name for ProfileTable: " + profileTableName , e ) ; } finally { // never rollbacks
try { sleeTransactionManagement . requireTransactionEnd ( b , false ) ; } catch ( Throwable e ) { throw new ManagementException ( e . getMessage ( ) , e ) ; } }


signature:
public class ProfileProvisioningMBeanImpl { /** * ( non - Javadoc )
 * @ see javax . slee . management . ProfileProvisioningMBean # getProfileTables ( ) */
public Collection < String > getProfileTables ( ) throws ManagementException { } }

implementation: if ( logger . isDebugEnabled ( ) ) { logger . debug ( "getProfileTables()" ) ; } boolean b = sleeTransactionManagement . requireTransaction ( ) ; try { return sleeProfileManagement . getDeclaredProfileTableNames ( ) ; } catch ( Exception x ) { if ( x instanceof ManagementException ) throw ( ManagementException ) x ; else throw new ManagementException ( "Failed getProfileTable" , x ) ; } finally { try { sleeTransactionManagement . requireTransactionEnd ( b , false ) ; } catch ( Throwable e ) { throw new ManagementException ( e . getMessage ( ) , e ) ; } }


signature:
public class ProfileProvisioningMBeanImpl { /** * ( non - Javadoc )
 * @ see javax . slee . management . ProfileProvisioningMBean # getProfileTables ( javax . slee . profile . ProfileSpecificationID ) */
public Collection < String > getProfileTables ( ProfileSpecificationID id ) throws java . lang . NullPointerException , UnrecognizedProfileSpecificationException , ManagementException { } }

implementation: if ( logger . isDebugEnabled ( ) ) { logger . debug ( "getProfileTables( id = " + id + " )" ) ; } if ( id == null ) { throw new NullPointerException ( "null profile spec id" ) ; } boolean b = sleeTransactionManagement . requireTransaction ( ) ; try { return sleeProfileManagement . getDeclaredProfileTableNames ( id ) ; } catch ( UnrecognizedProfileSpecificationException x ) { throw x ; } catch ( Throwable x ) { throw new ManagementException ( "Failed createProfileTable" , x ) ; } finally { try { sleeTransactionManagement . requireTransactionEnd ( b , false ) ; } catch ( Throwable e ) { throw new ManagementException ( e . getMessage ( ) , e ) ; } }


signature:
public class ProfileProvisioningMBeanImpl { /** * ( non - Javadoc )
 * @ see javax . slee . management . ProfileProvisioningMBean # getProfiles ( java . lang . String ) */
public Collection < ProfileID > getProfiles ( String profileTableName ) throws NullPointerException , UnrecognizedProfileTableNameException , ManagementException { } }

implementation: if ( logger . isDebugEnabled ( ) ) { logger . debug ( "getProfiles( profileTableName = " + profileTableName + " )" ) ; } boolean b = sleeTransactionManagement . requireTransaction ( ) ; try { return sleeProfileManagement . getProfileTable ( profileTableName ) . getProfiles ( ) ; } catch ( NullPointerException e ) { throw e ; } catch ( UnrecognizedProfileTableNameException e ) { throw e ; } catch ( Throwable e ) { throw new ManagementException ( e . getMessage ( ) , e ) ; } finally { try { sleeTransactionManagement . requireTransactionEnd ( b , false ) ; } catch ( Throwable e ) { throw new ManagementException ( e . getMessage ( ) , e ) ; } }


signature:
public class ProfileProvisioningMBeanImpl { /** * ( non - Javadoc )
 * @ see javax . slee . management . ProfileProvisioningMBean # getProfilesByAttribute ( java . lang . String , java . lang . String , java . lang . Object ) */
public Collection < ProfileID > getProfilesByAttribute ( String profileTableName , String attributeName , Object attributeValue ) throws NullPointerException , UnrecognizedProfileTableNameException , UnrecognizedAttributeException , AttributeTypeMismatchException , ManagementException { } }

implementation: if ( logger . isDebugEnabled ( ) ) { logger . debug ( "getProfilesByAttribute( profileTableName = " + profileTableName + " , attributeName = " + attributeName + " , attributeValue = " + attributeValue + " )" ) ; } boolean b = sleeTransactionManagement . requireTransaction ( ) ; try { ProfileTableImpl profileTable = sleeProfileManagement . getProfileTable ( profileTableName ) ; if ( ! profileTable . getProfileSpecificationComponent ( ) . isSlee11 ( ) ) { throw new UnsupportedOperationException ( "JAIN SLEE 1.1 Specs forbiddens the usage of this method on SLEE 1.0 Profile Tables" ) ; } else { return profileTable . getProfilesByAttribute ( attributeName , attributeValue , true ) ; } } catch ( NullPointerException e ) { throw e ; } catch ( UnrecognizedProfileTableNameException e ) { throw e ; } catch ( UnrecognizedAttributeException e ) { throw e ; } catch ( AttributeTypeMismatchException e ) { throw e ; } catch ( Throwable e ) { throw new ManagementException ( e . getMessage ( ) , e ) ; } finally { try { sleeTransactionManagement . requireTransactionEnd ( b , false ) ; } catch ( Throwable e ) { throw new ManagementException ( e . getMessage ( ) , e ) ; } }


signature:
public class ProfileProvisioningMBeanImpl { /** * ( non - Javadoc )
 * @ see javax . slee . management . ProfileProvisioningMBean # getProfilesByDynamicQuery ( java . lang . String , javax . slee . profile . query . QueryExpression ) */
public Collection < ProfileID > getProfilesByDynamicQuery ( String profileTableName , QueryExpression queryExpression ) throws NullPointerException , UnrecognizedProfileTableNameException , UnrecognizedAttributeException , AttributeTypeMismatchException , ManagementException { } }

implementation: if ( logger . isDebugEnabled ( ) ) { logger . debug ( "getProfilesByDynamicQuery( profileTableName = " + profileTableName + " , queryExpression = " + queryExpression + " )" ) ; } if ( queryExpression == null ) { throw new NullPointerException ( "queryExpression is null" ) ; } boolean b = sleeTransactionManagement . requireTransaction ( ) ; Collection < ProfileID > profileIDs = new ArrayList < ProfileID > ( ) ; try { ProfileTableImpl profileTable = sleeProfileManagement . getProfileTable ( profileTableName ) ; if ( ! profileTable . getProfileSpecificationComponent ( ) . isSlee11 ( ) ) { throw new UnsupportedOperationException ( "JAIN SLEE 1.1 Specs forbiddens the usage of this method on SLEE 1.0 Profile Tables" ) ; } for ( ProfileEntity profileEntity : profileTable . getProfileSpecificationComponent ( ) . getProfileEntityFramework ( ) . getProfilesByDynamicQuery ( profileTableName , queryExpression ) ) { profileIDs . add ( new ProfileID ( profileEntity . getTableName ( ) , profileEntity . getProfileName ( ) ) ) ; } } catch ( NullPointerException e ) { throw e ; } catch ( UnrecognizedProfileTableNameException e ) { throw e ; } catch ( UnrecognizedAttributeException e ) { throw e ; } catch ( AttributeTypeMismatchException e ) { throw e ; } catch ( Throwable e ) { throw new ManagementException ( "Failed to obtain ProfileNames for ProfileTable: " + profileTableName , e ) ; } finally { try { sleeTransactionManagement . requireTransactionEnd ( b , false ) ; } catch ( Throwable e ) { throw new ManagementException ( e . getMessage ( ) , e ) ; } } return profileIDs ;


signature:
public class ProfileProvisioningMBeanImpl { /** * ( non - Javadoc )
 * @ see javax . slee . management . ProfileProvisioningMBean # getProfilesByStaticQuery ( java . lang . String , java . lang . String , java . lang . Object [ ] ) */
public Collection < ProfileID > getProfilesByStaticQuery ( String profileTableName , String queryName , Object [ ] parameters ) throws NullPointerException , UnrecognizedProfileTableNameException , UnrecognizedQueryNameException , InvalidArgumentException , AttributeTypeMismatchException , ManagementException { } }

implementation: if ( logger . isDebugEnabled ( ) ) { logger . debug ( "getProfilesByStaticQuery( profileTableName = " + profileTableName + " , queryName = " + queryName + " , parameters = " + Arrays . asList ( parameters ) + " )" ) ; } if ( queryName == null ) { throw new NullPointerException ( "queryName is null" ) ; } boolean b = sleeTransactionManagement . requireTransaction ( ) ; Collection < ProfileID > profileIDs = new ArrayList < ProfileID > ( ) ; try { ProfileTableImpl profileTable = sleeProfileManagement . getProfileTable ( profileTableName ) ; if ( ! profileTable . getProfileSpecificationComponent ( ) . isSlee11 ( ) ) { throw new UnsupportedOperationException ( "JAIN SLEE 1.1 Specs forbiddens the usage of this method on SLEE 1.0 Profile Tables" ) ; } for ( ProfileEntity profileEntity : profileTable . getProfileSpecificationComponent ( ) . getProfileEntityFramework ( ) . getProfilesByStaticQuery ( profileTableName , queryName , parameters ) ) { profileIDs . add ( new ProfileID ( profileEntity . getTableName ( ) , profileEntity . getProfileName ( ) ) ) ; } } catch ( NullPointerException e ) { throw e ; } catch ( UnrecognizedProfileTableNameException e ) { throw e ; } catch ( UnrecognizedQueryNameException e ) { throw e ; } catch ( InvalidArgumentException e ) { throw e ; } catch ( AttributeTypeMismatchException e ) { throw e ; } catch ( Throwable e ) { throw new ManagementException ( "Failed to obtain ProfileNames for ProfileTable: " + profileTableName , e ) ; } finally { try { sleeTransactionManagement . requireTransactionEnd ( b , false ) ; } catch ( Throwable e ) { throw new ManagementException ( e . getMessage ( ) , e ) ; } } return profileIDs ;


signature:
public class ProfileProvisioningMBeanImpl { /** * ( non - Javadoc )
 * @ see javax . slee . management . ProfileProvisioningMBean # removeProfile ( java . lang . String , java . lang . String ) */
public void removeProfile ( java . lang . String profileTableName , java . lang . String profileName ) throws java . lang . NullPointerException , UnrecognizedProfileTableNameException , UnrecognizedProfileNameException , ManagementException { } }

implementation: if ( logger . isDebugEnabled ( ) ) { logger . debug ( "removeProfile( profileTableName = " + profileTableName + " , profileName = " + profileName + " )" ) ; } if ( profileTableName == null ) throw new NullPointerException ( "Argument[ProfileTableName] must nto be null" ) ; if ( profileName == null ) throw new NullPointerException ( "Argument[ProfileName] must nto be null" ) ; boolean b = this . sleeTransactionManagement . requireTransaction ( ) ; boolean rb = true ; try { ProfileTableImpl profileTable = this . sleeProfileManagement . getProfileTable ( profileTableName ) ; if ( ! profileTable . profileExists ( profileName ) ) { throw new UnrecognizedProfileNameException ( "There is no such profile: " + profileName + ", in profile table: " + profileTableName ) ; } profileTable . removeProfile ( profileName , true , false ) ; if ( ! sleeTransactionManagement . getRollbackOnly ( ) ) { rb = false ; } else { throw new ManagementException ( "Transaction used in profile removal rolled back" ) ; } } catch ( UnrecognizedProfileTableNameException e ) { throw e ; } catch ( UnrecognizedProfileNameException e ) { throw e ; } catch ( Exception e ) { throw new ManagementException ( "Failed to remove due to system level failure." , e ) ; } finally { try { sleeTransactionManagement . requireTransactionEnd ( b , rb ) ; } catch ( Throwable e ) { throw new ManagementException ( e . getMessage ( ) , e ) ; } }


signature:
public class ProfileProvisioningMBeanImpl { /** * ( non - Javadoc )
 * @ see javax . slee . management . ProfileProvisioningMBean # removeProfileTable ( java . lang . String ) */
public void removeProfileTable ( String profileTableName ) throws NullPointerException , UnrecognizedProfileTableNameException , ManagementException { } }

implementation: if ( logger . isDebugEnabled ( ) ) { logger . debug ( "removeProfileTable( profileTableName = " + profileTableName + " )" ) ; } if ( profileTableName == null ) throw new NullPointerException ( "profileTableName is null" ) ; boolean b = this . sleeTransactionManagement . requireTransaction ( ) ; boolean rb = false ; try { this . sleeProfileManagement . removeProfileTable ( profileTableName ) ; } catch ( UnrecognizedProfileTableNameException e ) { rb = true ; throw e ; } catch ( Throwable e ) { rb = true ; throw new ManagementException ( "Failed to remove due to system level failure." , e ) ; } finally { try { sleeTransactionManagement . requireTransactionEnd ( b , rb ) ; } catch ( Throwable e ) { throw new ManagementException ( e . getMessage ( ) , e ) ; } }


signature:
public class ProfileProvisioningMBeanImpl { /** * ( non - Javadoc )
 * @ see javax . slee . management . ProfileProvisioningMBean # renameProfileTable ( java . lang . String , java . lang . String ) */
public void renameProfileTable ( java . lang . String oldProfileTableName , java . lang . String newProfileTableName ) throws java . lang . NullPointerException , UnrecognizedProfileTableNameException , InvalidArgumentException , ProfileTableAlreadyExistsException , ManagementException { } }

implementation: if ( logger . isDebugEnabled ( ) ) { logger . debug ( "renameProfileTable( oldProfileTableName = " + oldProfileTableName + " , newProfileTableName = " + newProfileTableName + " )" ) ; } if ( oldProfileTableName == null ) throw new NullPointerException ( "Argument[OldProfileTableName] must nto be null" ) ; if ( newProfileTableName == null ) throw new NullPointerException ( "Argument[NewProfileTableName] must nto be null" ) ; ProfileTableImpl . validateProfileTableName ( newProfileTableName ) ; boolean b = this . sleeTransactionManagement . requireTransaction ( ) ; boolean rb = true ; try { this . sleeProfileManagement . renameProfileTable ( oldProfileTableName , newProfileTableName ) ; rb = false ; } catch ( UnrecognizedProfileTableNameException e ) { throw e ; } catch ( ProfileTableAlreadyExistsException e ) { throw e ; } catch ( Throwable e ) { throw new ManagementException ( "Failed to remove due to system level failure." , e ) ; } finally { try { sleeTransactionManagement . requireTransactionEnd ( b , rb ) ; } catch ( Throwable e ) { throw new ManagementException ( e . getMessage ( ) , e ) ; } }


signature:
public class AbstractUsageParameterSet { /** * Convenience method to create new instance of concrete impl class of
 * { @ link AbstractUsageParameterSet } .
 * @ param concreteClass
 * @ param notificationSource
 * @ param parameterSetName
 * @ param mcCache
 * @ return
 * @ throws SecurityException
 * @ throws NoSuchMethodException
 * @ throws IllegalArgumentException
 * @ throws InstantiationException
 * @ throws IllegalAccessException
 * @ throws InvocationTargetException */
public static final AbstractUsageParameterSet newInstance ( Class < ? > concreteClass , NotificationSource notificationSource , String parameterSetName , SleeContainer sleeContainer ) throws SecurityException , NoSuchMethodException , IllegalArgumentException , InstantiationException , IllegalAccessException , InvocationTargetException { } }

implementation: Constructor < ? > constructor = concreteClass . getConstructor ( NotificationSource . class , String . class , SleeContainer . class ) ; return ( AbstractUsageParameterSet ) constructor . newInstance ( notificationSource , parameterSetName , sleeContainer ) ;


signature:
public class SleeEndpointOperationNotTransactedExecutor { /** * Suspends the current tx ( if exists ) .
 * @ return the tx which was suspended , null if there is no active tx
 * @ throws SLEEException if there is a system error in tx manager */
SleeTransaction suspendTransaction ( ) throws SLEEException { } }

implementation: try { final SleeTransaction tx = txManager . getTransaction ( ) ; if ( tx != null ) { txManager . suspend ( ) ; } return tx ; } catch ( SystemException e ) { throw new SLEEException ( e . getMessage ( ) , e ) ; }


signature:
public class SleeEndpointOperationNotTransactedExecutor { /** * Resumes the specified tx . If it is null nothing is done .
 * @ param transaction
 * @ throws SLEEException if there is a system error in tx manager */
void resumeTransaction ( SleeTransaction transaction ) throws SLEEException { } }

implementation: if ( transaction != null ) { try { txManager . resume ( transaction ) ; } catch ( Throwable e ) { throw new SLEEException ( e . getMessage ( ) , e ) ; } }


signature:
public class ClassLoaderFactoryImpl { /** * ( non - Javadoc )
 * @ seeorg . mobicents . slee . core . component . classloading . ClassLoaderFactory #
 * newComponentClassLoader ( javax . slee . ComponentID ,
 * org . mobicents . slee . core . component . classloading . URLClassLoaderDomain ) */
public ComponentClassLoaderImpl newComponentClassLoader ( ComponentID componentID , URLClassLoaderDomain parent ) { } }

implementation: return new ComponentClassLoaderImpl ( componentID , ( URLClassLoaderDomainImpl ) parent ) ;


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

implementation: if ( specsDescriptor == null ) { specsDescriptor = new javax . slee . management . ServiceDescriptor ( getServiceID ( ) , getDeployableUnit ( ) . getDeployableUnitID ( ) , getDeploymentUnitSource ( ) , descriptor . getRootSbbID ( ) , descriptor . getAddressProfileTable ( ) , descriptor . getResourceInfoProfileTable ( ) ) ; } return specsDescriptor ;


signature:
public class ServiceComponentImpl { /** * Retrieves the set of sbbs used by this service
 * @ param componentRepository
 * @ return */
public Set < SbbID > getSbbIDs ( ComponentRepository componentRepository ) { } }

implementation: Set < SbbID > result = new HashSet < SbbID > ( ) ; buildSbbTree ( descriptor . getRootSbbID ( ) , result , componentRepository ) ; return result ;