signature:
public class ServiceManagementImpl { /** * uninstall a service .
 * @ throws SystemException
 * @ throws UnrecognizedServiceException
 * @ throws MBeanRegistrationException
 * @ throws InstanceNotFoundException
 * @ throws UnrecognizedResourceAdaptorEntityException
 * @ throws NullPointerException
 * @ throws InvalidStateException */
public void uninstallService ( final ServiceComponent serviceComponent ) throws SystemException , UnrecognizedServiceException , InstanceNotFoundException , MBeanRegistrationException , NullPointerException , UnrecognizedResourceAdaptorEntityException , ManagementException , InvalidStateException { } }

implementation:
if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Uninstalling service with id " + serviceComponent . getServiceID ( ) ) ; } if ( serviceComponent . getServiceState ( ) . isStopping ( ) ) { // let ' s be friendly and give it a few secs
for ( int i = 0 ; i < 15 ; i ++ ) { try { Thread . sleep ( 1000 ) ; logger . info ( "Waiting for " + serviceComponent . getServiceID ( ) + " to stop, current state is " + serviceComponent . getServiceState ( ) ) ; if ( serviceComponent . getServiceState ( ) . isInactive ( ) ) { break ; } } catch ( Throwable e ) { logger . error ( e . getMessage ( ) , e ) ; } } } if ( ! serviceComponent . getServiceState ( ) . isInactive ( ) ) { throw new InvalidStateException ( serviceComponent . toString ( ) + " is not inactive" ) ; } final TransactionContext txContext = sleeContainer . getTransactionManager ( ) . getTransactionContext ( ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Closing Usage MBean of service " + serviceComponent . getServiceID ( ) ) ; } ServiceUsageMBean serviceUsageMBean = serviceComponent . getServiceUsageMBean ( ) ; if ( serviceUsageMBean != null ) { serviceUsageMBean . remove ( ) ; // add rollback action to re - create the mbean
// FIXME this doesn ' t make sense , this restore looses all old data ,
// it shoudl only remove on
// commit but as it is right now , the needed sbb components are
// already removed
TransactionalAction action = new TransactionalAction ( ) { public void execute ( ) { try { sleeContainer . getUsageParametersManagement ( ) . newServiceUsageMBean ( serviceComponent ) ; } catch ( Throwable e ) { logger . error ( e . getMessage ( ) , e ) ; } } } ; txContext . getAfterRollbackActions ( ) . add ( action ) ; } // register notification sources for all sbbs
final TraceManagement traceMBeanImpl = sleeContainer . getTraceManagement ( ) ; for ( final SbbID sbbID : serviceComponent . getSbbIDs ( componentRepositoryImpl ) ) { // Tracer must be available for both 1.1 and 1.0 sbb components
// SbbComponent sbbComponent =
// componentRepositoryImpl . getComponentByID ( sbbID ) ;
// if ( sbbComponent . isSlee11 ( ) )
{ traceMBeanImpl . deregisterNotificationSource ( new SbbNotification ( serviceComponent . getServiceID ( ) , sbbID ) ) ; // add rollback action to re - add state removed
TransactionalAction action = new TransactionalAction ( ) { public void execute ( ) { // remove notification sources for all sbbs
traceMBeanImpl . registerNotificationSource ( new SbbNotification ( serviceComponent . getServiceID ( ) , sbbID ) ) ; } } ; txContext . getAfterRollbackActions ( ) . add ( action ) ; } } // warn sbb management that the service is being uninstalled , giving it
// the option to clear any related resources
sleeContainer . getSbbManagement ( ) . serviceUninstall ( serviceComponent ) ;


signature:
public class ServiceManagementImpl { /** * Verifies if the specified ra entity link name is referenced by a non
 * inactive service .
 * @ param raLinkName
 * @ return */
public boolean isRAEntityLinkNameReferenced ( String raLinkName ) { } }

implementation: if ( raLinkName == null ) { throw new NullPointerException ( "null ra link name" ) ; } boolean b = false ; try { b = transactionManager . requireTransaction ( ) ; for ( ServiceID serviceID : componentRepositoryImpl . getServiceIDs ( ) ) { ServiceComponent serviceComponent = componentRepositoryImpl . getComponentByID ( serviceID ) ; if ( serviceComponent . getServiceState ( ) != ServiceState . INACTIVE && serviceComponent . getResourceAdaptorEntityLinks ( componentRepositoryImpl ) . contains ( raLinkName ) ) { return true ; } } return false ; } finally { try { transactionManager . requireTransactionEnd ( b , false ) ; } catch ( Throwable ex ) { throw new SLEEException ( ex . getMessage ( ) , ex ) ; } }


signature:
public class ServiceManagementImpl { /** * ( non - Javadoc )
 * @ see
 * org . mobicents . slee . container . management . ServiceManagement # activityEnded
 * ( org . mobicents . slee . container . service . ServiceActivityHandle ) */
public void activityEnded ( final ServiceActivityHandle activityHandle ) { } }

implementation:
// do this only on tx commit and in a new thread , to escape the tx context
final Runnable r = new Runnable ( ) { public void run ( ) { final ServiceID serviceID = activityHandle . getServiceID ( ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Activity end for " + serviceID ) ; } // remove and cancel the timer task to force activity ending
ScheduledFuture < ? > scheduledFuture = activityEndingTasks . remove ( serviceID ) ; if ( scheduledFuture != null ) { scheduledFuture . cancel ( true ) ; } // get stopping service
final ServiceComponent serviceComponent = componentRepositoryImpl . getComponentByID ( serviceID ) ; if ( serviceComponent != null ) { synchronized ( serviceComponent ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Service is in " + serviceComponent . getServiceState ( ) + " state." ) ; } if ( serviceComponent . getServiceState ( ) . isStopping ( ) ) { completeServiceStop ( serviceComponent ) ; } serviceComponent . setActivityEnded ( true ) ; } } else { if ( logger . isDebugEnabled ( ) ) { logger . debug ( serviceID . toString ( ) + " activity ended, but component not found, removed concurrently?" ) ; } } } } ; final ExecutorService executorService = Executors . newSingleThreadExecutor ( SLEE_THREAD_FACTORY ) ; TransactionContext txContext = sleeContainer . getTransactionManager ( ) . getTransactionContext ( ) ; if ( txContext != null ) { TransactionalAction txAction = new TransactionalAction ( ) { public void execute ( ) { try { executorService . execute ( r ) ; } catch ( Exception e ) { logger . error ( "failed to execute task to complete service deactivation" , e ) ; } executorService . shutdown ( ) ; } } ; txContext . getAfterCommitActions ( ) . add ( txAction ) ; } else { try { executorService . execute ( r ) ; } catch ( Exception e ) { logger . error ( "failed to execute task to complete service deactivation" , e ) ; } executorService . shutdown ( ) ; }


signature:
public class EventRouterExecutorStatisticsImpl { /** * Adds the time for an event routing with a specific { @ link EventTypeID } .
 * @ param eventTypeID
 * the id of the event type
 * @ param routingTime
 * the time spent to route the event , in milliseconds */
public void eventRouted ( EventTypeID eventTypeID , long routingTime ) { } }

implementation: EventTypeRoutingStatisticsImpl eventTypeRoutingStatistics = eventTypeRoutingStatisticsMap . get ( eventTypeID ) ; if ( eventTypeRoutingStatistics == null ) { synchronized ( eventTypeRoutingStatisticsMap ) { eventTypeRoutingStatistics = new EventTypeRoutingStatisticsImpl ( eventTypeID ) ; eventTypeRoutingStatisticsMap . put ( eventTypeID , eventTypeRoutingStatistics ) ; } } eventTypeRoutingStatistics . eventRouted ( routingTime ) ; taskExecuted ( routingTime ) ;


signature:
public class EventRouterExecutorStatisticsImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . container . eventrouter . stats . EventRouterExecutorStatistics # getAverageEventRoutingTime ( ) */
public long getAverageEventRoutingTime ( ) { } }

implementation: long time = 0L ; long events = 0L ; for ( EventTypeRoutingStatistics eventTypeRoutingStatistics : eventTypeRoutingStatisticsMap . values ( ) ) { time += eventTypeRoutingStatistics . getRoutingTime ( ) ; events += eventTypeRoutingStatistics . getEventsRouted ( ) ; } return time == 0L ? 0L : time / events ;


signature:
public class EventRouterExecutorStatisticsImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . container . eventrouter . stats . EventRouterExecutorStatistics # getAverageEventRoutingTime ( javax . slee . EventTypeID ) */
public long getAverageEventRoutingTime ( EventTypeID eventTypeID ) { } }

implementation: final EventTypeRoutingStatistics eventTypeRoutingStatistics = getEventTypeRoutingStatistics ( eventTypeID ) ; return eventTypeRoutingStatistics == null ? 0L : eventTypeRoutingStatistics . getAverageEventRoutingTime ( ) ;


signature:
public class EventRouterExecutorStatisticsImpl { /** * ( non - Javadoc )
 * @ see
 * org . mobicents . slee . runtime . eventrouter . stats . EventRouterExecutorStatistics
 * # getEventsRouted ( javax . slee . EventTypeID ) */
public long getEventsRouted ( EventTypeID eventTypeID ) { } }

implementation: final EventTypeRoutingStatistics eventTypeRoutingStatistics = getEventTypeRoutingStatistics ( eventTypeID ) ; return eventTypeRoutingStatistics == null ? 0L : eventTypeRoutingStatistics . getEventsRouted ( ) ;


signature:
public class EventRouterExecutorStatisticsImpl { /** * ( non - Javadoc )
 * @ see
 * org . mobicents . slee . runtime . eventrouter . stats . EventRouterExecutorStatistics
 * # getRoutingTime ( javax . slee . EventTypeID ) */
public long getRoutingTime ( EventTypeID eventTypeID ) { } }

implementation: final EventTypeRoutingStatistics eventTypeRoutingStatistics = getEventTypeRoutingStatistics ( eventTypeID ) ; return eventTypeRoutingStatistics == null ? 0L : eventTypeRoutingStatistics . getRoutingTime ( ) ;


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

implementation: switch ( level ) { case LEVEL_CLEAR : return CLEAR ; case LEVEL_CRITICAL : return CRITICAL ; case LEVEL_MAJOR : return MAJOR ; case LEVEL_WARNING : return WARNING ; case LEVEL_INDETERMINATE : return INDETERMINATE ; case LEVEL_MINOR : return MINOR ; default : throw new IllegalArgumentException ( "Invalid level: " + level ) ; }


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

implementation: if ( level == null ) throw new NullPointerException ( "level is null" ) ; if ( level . equalsIgnoreCase ( CLEAR_STRING ) ) return CLEAR ; if ( level . equalsIgnoreCase ( CRITICAL_STRING ) ) return CRITICAL ; if ( level . equalsIgnoreCase ( MAJOR_STRING ) ) return MAJOR ; if ( level . equalsIgnoreCase ( WARNING_STRING ) ) return WARNING ; if ( level . equalsIgnoreCase ( INDETERMINATE_STRING ) ) return INDETERMINATE ; if ( level . equalsIgnoreCase ( MINOR_STRING ) ) return MINOR ; throw new IllegalArgumentException ( "Invalid level: " + level ) ;


signature:
public class AlarmLevel { /** * Determine if this AlarmLevel object represents a level that is higher than some other
 * AlarmLevel object . For the purposes of the comparison the following order , from highest
 * to lowest severity , is assumed for alarm levels :
 * < ul >
 * < li > CLEAR
 * < li > CRITICAL
 * < li > MAJOR
 * < li > WARNING
 * < li > INDETERMINATE
 * < li > MINOR
 * < / ul >
 * @ param other the < code > AlarmLevel < / code > object to compare this with .
 * @ return < code > true < / code > if the level represented by this < code > AlarmLevel < / code >
 * object is considered a higher level than the level represented by the specified
 * < code > AlarmLevel < / code > object , < code > false < / code > otherwise .
 * @ throws NullPointerException if < code > other < / code > is < code > null < / code > . */
public boolean isHigherLevel ( AlarmLevel other ) throws NullPointerException { } }

implementation: if ( other == null ) throw new NullPointerException ( "other is null" ) ; return this . level < other . level ;


signature: public class DeploymentMBeanUtils { public EventTypeID [ ] getEventTypes ( ) throws ManagementConsoleException { } }

implementation:
try { EventTypeID [ ] IDs = ( EventTypeID [ ] ) mbeanServer . getAttribute ( deploymentMBean , "EventTypes" ) ; // ManagementConsole . getInstance ( ) . getComponentIDMap ( ) . put ( IDs ) ;
return IDs ; } catch ( Exception e ) { e . printStackTrace ( ) ; throw new ManagementConsoleException ( SleeManagementMBeanUtils . doMessage ( e ) ) ; }


signature:
public class ActivityContextFactoryImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . container . activity . ActivityContextFactory # createActivityContext ( org . mobicents . slee . container . activity . ActivityContextHandle , int ) */
public ActivityContextImpl createActivityContext ( final ActivityContextHandle ach , int activityFlags ) throws ActivityAlreadyExistsException { } }

implementation:
if ( sleeContainer . getCongestionControl ( ) . refuseStartActivity ( ) ) { throw new SLEEException ( "congestion control refused activity start" ) ; } // create ac
ActivityContextCacheData activityContextCacheData = new ActivityContextCacheData ( ach , sleeContainer . getCluster ( ) ) ; if ( activityContextCacheData . exists ( ) ) { throw new ActivityAlreadyExistsException ( ach . toString ( ) ) ; } ActivityContextImpl ac = new ActivityContextImpl ( ach , activityContextCacheData , tracksIdleTime ( ach , true ) , Integer . valueOf ( activityFlags ) , this ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Created activity context with handle " + ach ) ; } return ac ;


signature:
public class EventProcessingCallbacks { /** * ( non - Javadoc )
 * @ seeorg . mobicents . slee . core . event . SleeEventProcessingFailedCallback #
 * eventProcessingFailed ( javax . slee . resource . FailureReason ) */
public void eventProcessingFailed ( FailureReason failureReason ) { } }

implementation: raEntity . getResourceAdaptorObject ( ) . eventProcessingFailed ( activityHandle , fireableEventType , failureReason , address , receivableService , eventFlags , failureReason ) ;


signature:
public class EventProcessingCallbacks { /** * ( non - Javadoc )
 * @ seeorg . mobicents . slee . core . event . SleeEventProcessingSucceedCallback #
 * eventProcessingSucceed ( ) */
public void eventProcessingSucceed ( boolean sbbProcessedEvent ) { } }

implementation: int flags = sbbProcessedEvent ? EventFlags . setSbbProcessedEvent ( eventFlags ) : eventFlags ; raEntity . getResourceAdaptorObject ( ) . eventProcessingSuccessful ( activityHandle , fireableEventType , event , address , receivableService , flags ) ;


signature:
public class EventProcessingCallbacks { /** * / * ( non - Javadoc )
 * @ see org . mobicents . slee . container . event . EventUnreferencedCallback # eventUnreferenced ( ) */
public void eventUnreferenced ( ) { } }

implementation: raEntity . getResourceAdaptorObject ( ) . eventUnreferenced ( activityHandle , fireableEventType , event , address , receivableService , eventFlags ) ;


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

implementation:
// String sopts = " : lyi : u : d : sr : " ;
String sopts = ":lyi:u:dr:" ; LongOpt [ ] lopts = { new LongOpt ( "list" , LongOpt . NO_ARGUMENT , null , 'l' ) , // options
new LongOpt ( "sbbs" , LongOpt . OPTIONAL_ARGUMENT , null , ListOperation . sbbs ) , new LongOpt ( "services" , LongOpt . NO_ARGUMENT , null , ListOperation . services ) , new LongOpt ( "libraries" , LongOpt . NO_ARGUMENT , null , ListOperation . libraries ) , new LongOpt ( "events" , LongOpt . NO_ARGUMENT , null , ListOperation . events ) , new LongOpt ( "ra-types" , LongOpt . NO_ARGUMENT , null , ListOperation . ra_types ) , new LongOpt ( "ras" , LongOpt . NO_ARGUMENT , null , ListOperation . ras ) , new LongOpt ( "dus" , LongOpt . NO_ARGUMENT , null , ListOperation . dus ) , new LongOpt ( "profile-spec" , LongOpt . NO_ARGUMENT , null , ListOperation . profile_specs ) , new LongOpt ( "installed" , LongOpt . NO_ARGUMENT , null , 'y' ) , new LongOpt ( "cid" , LongOpt . REQUIRED_ARGUMENT , null , IsInstalledOperation . cid ) , new LongOpt ( "duid" , LongOpt . REQUIRED_ARGUMENT , null , IsInstalledOperation . duid ) , new LongOpt ( "install" , LongOpt . REQUIRED_ARGUMENT , null , 'i' ) , new LongOpt ( "un-install" , LongOpt . REQUIRED_ARGUMENT , null , 'u' ) , // new LongOpt ( " duid " , LongOpt . REQUIRED _ ARGUMENT , null , ' d ' ) ,
new LongOpt ( "desc" , LongOpt . NO_ARGUMENT , null , 'd' ) , // new LongOpt ( " cid " , LongOpt . REQUIRED _ ARGUMENT , null , GetDescriptorsOperation . cid ) ,
// new LongOpt ( " duid " , LongOpt . REQUIRED _ ARGUMENT , null , GetDescriptorsOperation . duid ) ,
new LongOpt ( "ref" , LongOpt . REQUIRED_ARGUMENT , null , 'r' ) , } ; Getopt getopt = new Getopt ( null , args , sopts , lopts ) ; getopt . setOpterr ( false ) ; int code ; while ( ( code = getopt . getopt ( ) ) != - 1 ) { switch ( code ) { case ':' : throw new CommandException ( "Option requires an argument: " + args [ getopt . getOptind ( ) - 1 ] ) ; case '?' : throw new CommandException ( "Invalid (or ambiguous) option: " + args [ getopt . getOptind ( ) - 1 ] ) ; case 'l' : super . operation = new ListOperation ( super . context , super . log , this ) ; super . operation . buildOperation ( getopt , args ) ; break ; case 'y' : super . operation = new IsInstalledOperation ( super . context , super . log , this ) ; super . operation . buildOperation ( getopt , args ) ; break ; case 'i' : super . operation = new InstallOperation ( super . context , super . log , this ) ; super . operation . buildOperation ( getopt , args ) ; break ; case 'u' : super . operation = new UninstallOperation ( super . context , super . log , this ) ; super . operation . buildOperation ( getopt , args ) ; break ; case 'd' : // super . operation = new DeployableUnitIDOperation ( super . context , super . log , this ) ;
// super . operation . buildOperation ( getopt , args ) ;
// break ;
// case ' s ' :
super . operation = new GetDescriptorsOperation ( super . context , super . log , this ) ; super . operation . buildOperation ( getopt , args ) ; break ; case 'r' : super . operation = new GetReferringComponentsOperation ( 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 ServiceUsageMBeanImpl { /** * ( non - Javadoc )
 * @ see javax . slee . management . ServiceUsageMBean # createUsageParameterSet ( javax . slee . SbbID ,
 * java . lang . String ) */
public void createUsageParameterSet ( SbbID sbbId , String name ) throws NullPointerException , UnrecognizedSbbException , InvalidArgumentException , UsageParameterSetNameAlreadyExistsException , ManagementException { } }

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


signature:
public class ServiceUsageMBeanImpl { /** * creates the default usage parameter set */
public void createUsageParameterSet ( SbbID sbbId ) throws NullPointerException , UnrecognizedSbbException , InvalidArgumentException , UsageParameterSetNameAlreadyExistsException , ManagementException { } }

implementation: _createUsageParameterSet ( sbbId , null , false ) ;


signature:
public class ServiceUsageMBeanImpl { /** * ( non - Javadoc )
 * @ see javax . slee . management . ServiceUsageMBean # createUsageParameterSet ( javax . slee . SbbID ,
 * java . lang . String ) */
private synchronized void _createUsageParameterSet ( SbbID sbbId , String name , boolean failIfSbbHasNoUsageParamSet ) throws NullPointerException , UnrecognizedSbbException , InvalidArgumentException , UsageParameterSetNameAlreadyExistsException , ManagementException { } }

implementation:
if ( sbbId == null ) throw new NullPointerException ( "Sbb ID is null!" ) ; // get the sbb component
SbbComponent sbbComponent = sleeContainer . getComponentRepository ( ) . getComponentByID ( sbbId ) ; if ( sbbComponent == null ) { throw new UnrecognizedSbbException ( sbbId . toString ( ) ) ; } // get service component and check if the sbb belongs to the service
ServiceComponent serviceComponent = sleeContainer . getComponentRepository ( ) . getComponentByID ( getService ( ) ) ; if ( ! serviceComponent . getSbbIDs ( sleeContainer . getComponentRepository ( ) ) . contains ( sbbId ) ) { throw new UnrecognizedSbbException ( sbbId . toString ( ) + " is not part of " + getService ( ) ) ; } // get sbb usage parameter class
Class < ? > usageParameterClass = sbbComponent . getUsageParametersConcreteClass ( ) ; if ( usageParameterClass == null ) { if ( failIfSbbHasNoUsageParamSet ) { throw new InvalidArgumentException ( sbbId . toString ( ) + " does not define a usage parameters interface" ) ; } else { return ; } } // check if the usage parameter name set already exists
SbbUsageMBeanMapKey mapKey = new SbbUsageMBeanMapKey ( sbbId , name ) ; if ( this . usageMBeans . containsKey ( mapKey ) ) { throw new UsageParameterSetNameAlreadyExistsException ( "name " + name + " already exists for service " + serviceComponent + " and sbb " + sbbComponent ) ; } UsageMBeanImpl usageMbean = null ; UsageNotificationManagerMBeanImpl usageNotificationManagerMBean = null ; Thread currentThread = Thread . currentThread ( ) ; ClassLoader currentThreadClassLoader = currentThread . getContextClassLoader ( ) ; try { // change class loader
currentThread . setContextClassLoader ( sbbComponent . getClassLoader ( ) ) ; // create the actual usage parameter instance and map it in the
// mbean
SbbNotification sbbNotification = new SbbNotification ( serviceID , sbbId ) ; AbstractUsageParameterSet installedUsageParameterSet = ( AbstractUsageParameterSet ) AbstractUsageParameterSet . newInstance ( usageParameterClass , sbbNotification , name , sleeContainer ) ; // create and register the usage mbean
Class < ? > usageParameterMBeanClass = sbbComponent . getUsageParametersMBeanImplConcreteClass ( ) ; Constructor < ? > constructor = null ; if ( sbbComponent . isSlee11 ( ) ) { constructor = usageParameterMBeanClass . getConstructor ( new Class [ ] { Class . class , NotificationSource . class } ) ; } else { constructor = usageParameterMBeanClass . getConstructor ( new Class [ ] { Class . class , SbbNotification . class } ) ; } ObjectName usageParameterMBeanObjectName = generateUsageParametersMBeanObjectName ( name , sbbId , sbbComponent . isSlee11 ( ) ) ; usageMbean = ( UsageMBeanImpl ) constructor . newInstance ( new Object [ ] { sbbComponent . getUsageParametersMBeanConcreteInterface ( ) , sbbNotification } ) ; usageMbean . setObjectName ( usageParameterMBeanObjectName ) ; usageMbean . setParent ( this ) ; sleeContainer . getMBeanServer ( ) . registerMBean ( usageMbean , usageParameterMBeanObjectName ) ; // set the usage param data related with the mbean
installedUsageParameterSet . setUsageMBean ( usageMbean ) ; usageMbean . setUsageParameter ( installedUsageParameterSet ) ; // store the mbean
this . usageMBeans . put ( mapKey , usageMbean ) ; // if it ' s the default usage param set and it ' s an slee 1.1 . sbb
// then we have to create the notification manager too
if ( sbbComponent . isSlee11 ( ) && name == null ) { Class < ? > usageNotificationManagerMBeanClass = sbbComponent . getUsageNotificationManagerMBeanImplConcreteClass ( ) ; constructor = usageNotificationManagerMBeanClass . getConstructor ( new Class [ ] { Class . class , NotificationSource . class , SleeComponentWithUsageParametersInterface . class } ) ; usageNotificationManagerMBean = ( UsageNotificationManagerMBeanImpl ) constructor . newInstance ( new Object [ ] { sbbComponent . getUsageNotificationManagerMBeanConcreteInterface ( ) , sbbNotification , sbbComponent } ) ; ObjectName usageNotificationManagerMBeanObjectName = generateUsageNotificationManagerMBeanObjectName ( sbbId ) ; usageNotificationManagerMBean . setObjectName ( usageNotificationManagerMBeanObjectName ) ; sleeContainer . getMBeanServer ( ) . registerMBean ( usageNotificationManagerMBean , usageNotificationManagerMBeanObjectName ) ; this . notificationManagers . put ( sbbId , usageNotificationManagerMBean ) ; } } catch ( Throwable e ) { if ( mapKey != null && usageMbean != null ) { this . usageMBeans . remove ( mapKey ) ; try { sleeContainer . getMBeanServer ( ) . unregisterMBean ( usageMbean . getObjectName ( ) ) ; } catch ( Throwable f ) { logger . error ( "failed to unregister usage parameter mbean " + usageMbean . getObjectName ( ) ) ; } } if ( usageNotificationManagerMBean != null ) { this . notificationManagers . remove ( sbbId ) ; try { sleeContainer . getMBeanServer ( ) . unregisterMBean ( usageNotificationManagerMBean . getObjectName ( ) ) ; } catch ( Throwable f ) { logger . error ( "failed to unregister usage notification manager mbean " + usageNotificationManagerMBean . getObjectName ( ) ) ; } } throw new ManagementException ( e . getMessage ( ) , e ) ; } finally { currentThread . setContextClassLoader ( currentThreadClassLoader ) ; }


signature:
public class ServiceUsageMBeanImpl { /** * ( non - Javadoc )
 * @ see javax . slee . management . ServiceUsageMBean # removeUsageParameterSet ( javax . slee . SbbID ,
 * java . lang . String ) */
public void removeUsageParameterSet ( SbbID sbbId , String name ) throws NullPointerException , UnrecognizedSbbException , InvalidArgumentException , UnrecognizedUsageParameterSetNameException , ManagementException { } }

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


signature:
public class ServiceUsageMBeanImpl { /** * This method returns a list containing the names of the named SBB usage
 * parameter sets that belong to the SBB specified by the sbbID argument and
 * the Service represented by the ServiceUsageMBean object .
 * @ see javax . slee . management . ServiceUsageMBean # getUsageParameterSets ( javax . slee . SbbID ) */
public synchronized String [ ] getUsageParameterSets ( SbbID sbbId ) throws NullPointerException , UnrecognizedSbbException , InvalidArgumentException , ManagementException { } }

implementation:
if ( sbbId == null ) throw new NullPointerException ( "Sbb ID is null!" ) ; // get the sbb component
SbbComponent sbbComponent = sleeContainer . getComponentRepository ( ) . getComponentByID ( sbbId ) ; if ( sbbComponent == null ) { throw new UnrecognizedSbbException ( sbbId . toString ( ) ) ; } else { if ( sbbComponent . getUsageParametersInterface ( ) == null ) { throw new InvalidArgumentException ( "no usage parameter interface for " + sbbId ) ; } } // get service component and check if the sbb belongs to the service
ServiceComponent serviceComponent = sleeContainer . getComponentRepository ( ) . getComponentByID ( getService ( ) ) ; if ( ! serviceComponent . getSbbIDs ( sleeContainer . getComponentRepository ( ) ) . contains ( sbbId ) ) { throw new UnrecognizedSbbException ( sbbId . toString ( ) + " is not part of " + getService ( ) ) ; } Set < String > resultSet = new HashSet < String > ( ) ; for ( UsageMBeanImpl usageMBeanImpl : usageMBeans . values ( ) ) { if ( ( ( SbbNotification ) usageMBeanImpl . getNotificationSource ( ) ) . getSbb ( ) . equals ( sbbId ) ) { String name = usageMBeanImpl . getUsageParameterSet ( ) ; if ( name != null ) { resultSet . add ( name ) ; } } } return resultSet . toArray ( new String [ resultSet . size ( ) ] ) ;


signature:
public class ServiceUsageMBeanImpl { /** * ( non - Javadoc )
 * @ see javax . slee . management . ServiceUsageMBean # getSbbUsageMBean ( javax . slee . SbbID ) */
public ObjectName getSbbUsageMBean ( SbbID sbbId ) throws NullPointerException , UnrecognizedSbbException , InvalidArgumentException , ManagementException { } }

implementation: try { return _getSbbUsageMBean ( sbbId , null ) ; } catch ( UnrecognizedUsageParameterSetNameException e ) { throw new ManagementException ( "default usage parameter name not found" , e ) ; }


signature:
public class ServiceUsageMBeanImpl { /** * ( non - Javadoc )
 * @ see javax . slee . management . ServiceUsageMBean # getSbbUsageMBean ( javax . slee . SbbID ,
 * java . lang . String ) */
public ObjectName getSbbUsageMBean ( SbbID sbbId , String name ) throws NullPointerException , UnrecognizedSbbException , InvalidArgumentException , UnrecognizedUsageParameterSetNameException , ManagementException { } }

implementation: if ( name == null ) throw new NullPointerException ( "Sbb usage param set is null" ) ; if ( name . length ( ) == 0 ) throw new InvalidArgumentException ( "The lenght of the Usage Parameter Set Name is zero!" ) ; if ( ! isValidUsageParameterName ( name ) ) throw new InvalidArgumentException ( "The lenght of the Usage Parameter Set Name is zero!" ) ; return _getSbbUsageMBean ( sbbId , name ) ;


signature:
public class ServiceUsageMBeanImpl { /** * Resets the usage parameters of only the SBB specified by the sbbID
 * argument argument ( within the Service represented by the
 * ServiceUsageMBean object ) .
 * @ see javax . slee . management . ServiceUsageMBean # resetAllUsageParameters ( javax . slee . SbbID ) */
public synchronized void resetAllUsageParameters ( SbbID sbbId ) throws NullPointerException , UnrecognizedSbbException , InvalidArgumentException , ManagementException { } }

implementation:
if ( logger . isDebugEnabled ( ) ) { logger . debug ( "resetAllUsageParameters: " + sbbId ) ; } if ( sbbId == null ) throw new NullPointerException ( "Sbb ID is null!" ) ; // get the sbb component
SbbComponent sbbComponent = sleeContainer . getComponentRepository ( ) . getComponentByID ( sbbId ) ; if ( sbbComponent == null ) { throw new UnrecognizedSbbException ( sbbId . toString ( ) ) ; } else { if ( sbbComponent . getUsageParametersInterface ( ) == null ) { throw new InvalidArgumentException ( "no usage parameter interface for " + sbbId ) ; } } // get service component and check if the sbb belongs to the service
ServiceComponent serviceComponent = sleeContainer . getComponentRepository ( ) . getComponentByID ( getService ( ) ) ; if ( ! serviceComponent . getSbbIDs ( sleeContainer . getComponentRepository ( ) ) . contains ( sbbId ) ) { throw new UnrecognizedSbbException ( sbbId . toString ( ) + " is not part of " + getService ( ) ) ; } for ( UsageMBeanImpl usageMBeanImpl : usageMBeans . values ( ) ) { SbbNotification sbbNotification = ( SbbNotification ) usageMBeanImpl . getNotificationSource ( ) ; if ( sbbNotification . getSbb ( ) . equals ( sbbId ) ) { usageMBeanImpl . resetAllUsageParameters ( ) ; } }


signature:
public class ServiceUsageMBeanImpl { /** * Resets the usage parameters of all SBBs within the Service represented by
 * the ServiceUsageMBean object . The SLEE sets counter - type usage parameters
 * to zero and removes all samples from sample - type usage parameters .
 * @ see javax . slee . management . ServiceUsageMBean # resetAllUsageParameters ( ) */
public synchronized void resetAllUsageParameters ( ) throws ManagementException { } }

implementation:
try { // FIXME : hmm , how to check here for clustered . . . ghmp
for ( UsageMBeanImpl usageMBeanImpl : usageMBeans . values ( ) ) { usageMBeanImpl . resetAllUsageParameters ( ) ; } } catch ( Throwable e ) { throw new ManagementException ( e . getMessage ( ) , e ) ; }


signature:
public class ServiceUsageMBeanImpl { /** * Convenience method to retrieve the { @ link AbstractUsageParameterSet } for
 * the specified sbb and name
 * @ param sbbID
 * @ param name
 * @ return
 * @ throws UnrecognizedUsageParameterSetNameException */
public AbstractUsageParameterSet getInstalledUsageParameterSet ( SbbID sbbID , String name ) throws UnrecognizedUsageParameterSetNameException { } }

implementation: if ( name == null ) { throw new NullPointerException ( "null name" ) ; } AbstractUsageParameterSet installedUsageParameterSet = _getInstalledUsageParameterSet ( sbbID , name ) ; if ( installedUsageParameterSet == null ) { throw new UnrecognizedUsageParameterSetNameException ( name ) ; } return installedUsageParameterSet ;


signature:
public class StatisticsResourceAdaptor { /** * lifecycle methods */
public void setResourceAdaptorContext ( ResourceAdaptorContext raContext ) { } }

implementation: this . raContext = raContext ; this . tracer = raContext . getTracer ( StatisticsResourceAdaptor . class . getSimpleName ( ) ) ; this . sleeContainer = SleeContainer . lookupFromJndi ( ) ; if ( this . sleeContainer != null ) { this . resourceManagement = sleeContainer . getResourceManagement ( ) ; }


signature:
public class SbbComponentValidator { /** * Sbb abstract class ( general rule � methods cannot start neither with � ejb �
 * nor � sbb � )
 * < ul >
 * < li > ( 1.1 ? ) must have package declaration
 * < li > must implement in some way javax . slee . Sbb ( only methods from interface
 * can have � sbb � prefix )
 * < ul >
 * < li > each method defined must be implemented as public � not abstract ,
 * final or static
 * < / ul >
 * < li > must be public and abstract
 * < li > must have public no arg constructor
 * < li > must implement sbbExceptionThrown method
 * < ul >
 * < li >
 * public , not abstract , final or static no return type 3 arguments :
 * java . lang . Exception , java . lang . Object ,
 * javax . slee . ActivityContextInterface
 * < / ul >
 * < li > must implement sbbRolledBack
 * < ul >
 * < li > method must be public , not abstract , final or static
 * < li > no return type
 * < li > with single argument - javax . slee . RoledBackContext
 * < / ul >
 * < li > there is no finalize method
 * < / ul >
 * @ return */
boolean validateAbstractClassConstraints ( Map < String , Method > concreteMethods , Map < String , Method > concreteSuperClassesMethods ) { } }

implementation:
String errorBuffer = new String ( "" ) ; boolean passed = true ; // Presence of those classes must be checked elsewhere
Class sbbAbstractClass = this . component . getAbstractSbbClass ( ) ; // Must be public and abstract
int modifiers = sbbAbstractClass . getModifiers ( ) ; // check that the class modifiers contain abstratc and public
if ( ! Modifier . isAbstract ( modifiers ) || ! Modifier . isPublic ( modifiers ) ) { errorBuffer = appendToBuffer ( this . component . getAbstractSbbClass ( ) + "sbb abstract class must be public and abstract" , "6.1" , errorBuffer ) ; } // 1.1 - must be in package
if ( this . component . isSlee11 ( ) ) { Package declaredPackage = sbbAbstractClass . getPackage ( ) ; if ( declaredPackage == null || declaredPackage . getName ( ) . compareTo ( "" ) == 0 ) { passed = false ; errorBuffer = appendToBuffer ( this . component . getAbstractSbbClass ( ) + "sbb abstract class must be defined inside package space" , "6.1" , errorBuffer ) ; } } // Public no arg constructor - can it have more ?
// sbbAbstractClass . getConstructor
// FIXME : no arg constructor has signature " ( ) V " when added from
// javaassist we check for such constructor and if its public
try { Constructor constructor = sbbAbstractClass . getConstructor ( ) ; int conMod = constructor . getModifiers ( ) ; if ( ! Modifier . isPublic ( conMod ) ) { passed = false ; errorBuffer = appendToBuffer ( this . component . getAbstractSbbClass ( ) + "sbb abstract class must have public constructor " , "6.1" , errorBuffer ) ; } } catch ( SecurityException e ) { e . printStackTrace ( ) ; passed = false ; errorBuffer = appendToBuffer ( this . component . getAbstractSbbClass ( ) + "sbb abstract class must have no arg constructor, error:" + e . getMessage ( ) , "6.1" , errorBuffer ) ; } catch ( NoSuchMethodException e ) { e . printStackTrace ( ) ; passed = false ; errorBuffer = appendToBuffer ( this . component . getAbstractSbbClass ( ) + "sbb abstract class must have no arg constructor, error:" + e . getMessage ( ) , "6.1" , errorBuffer ) ; } // Must implements javax . slee . Sbb - and each method there defined , only
// those methods and two above can have " sbb " prefix
// those methods MUST be in concrete methods map , later we will use them
// to see if there is ant " sbbXXXX " method
// Check if we implement javax . slee . Sbb - either directly or from super
// class
Class javaxSleeSbbInterface = ClassUtils . checkInterfaces ( sbbAbstractClass , "javax.slee.Sbb" ) ; // sbbAbstractClass . getI
if ( javaxSleeSbbInterface == null ) { passed = false ; errorBuffer = appendToBuffer ( this . component . getAbstractSbbClass ( ) + "sbb abstract class  must implement, directly or indirectly, the javax.slee.Sbb interface." , "6.1" , errorBuffer ) ; } // FIXME : add check for finalize method
// Now we have to check methods from javax . slee . Sbb
// This takes care of method throws clauses
if ( javaxSleeSbbInterface != null ) { // if it is , we dont have those methods for sure , or maybe we do ,
// implemnted by hand
// either way its a failure
// We want only java . slee . Sbb methods : )
Method [ ] sbbLifecycleMethods = javaxSleeSbbInterface . getDeclaredMethods ( ) ; for ( Method lifecycleMehtod : sbbLifecycleMethods ) { // It must be implemented - so only in concrete methods , if we
// are left with one not checked bang , its an error
String methodKey = ClassUtils . getMethodKey ( lifecycleMehtod ) ; Method concreteLifeCycleImpl = null ; if ( concreteMethods . containsKey ( methodKey ) ) { concreteLifeCycleImpl = concreteMethods . remove ( methodKey ) ; } else if ( concreteSuperClassesMethods . containsKey ( methodKey ) ) { concreteLifeCycleImpl = concreteSuperClassesMethods . remove ( methodKey ) ; } else { passed = false ; errorBuffer = appendToBuffer ( this . component . getAbstractSbbClass ( ) + "sbb abstract class must implement life cycle methods, it lacks concrete implementation of: " + lifecycleMehtod . getName ( ) , "6.1.1" , errorBuffer ) ; continue ; } // now we now there is such method , its not private and abstract
// If we are here its not null
int lifeCycleModifier = concreteLifeCycleImpl . getModifiers ( ) ; if ( ! Modifier . isPublic ( lifeCycleModifier ) || Modifier . isStatic ( lifeCycleModifier ) || Modifier . isFinal ( lifeCycleModifier ) ) { passed = false ; errorBuffer = appendToBuffer ( this . component . getAbstractSbbClass ( ) + "sbb abstract class must implement life cycle methods, which can not be static, final or not public, method: " + lifecycleMehtod . getName ( ) , "6.1.1" , errorBuffer ) ; } } } // there can not be any method which start with ejb / sbb - we removed
// every from concrete , lets iterate over those sets
for ( Method concreteMethod : concreteMethods . values ( ) ) { if ( concreteMethod . getName ( ) . startsWith ( "ejb" ) || concreteMethod . getName ( ) . startsWith ( "sbb" ) ) { passed = false ; errorBuffer = appendToBuffer ( this . component . getAbstractSbbClass ( ) + " with method:  " + concreteMethod . getName ( ) , "6.12" , errorBuffer ) ; } if ( concreteMethod . getName ( ) . compareTo ( "finalize" ) == 0 ) { passed = false ; errorBuffer = appendToBuffer ( this . component . getAbstractSbbClass ( ) + "sbb abstract class  must not implement \"finalize\" method." , "6.1" , errorBuffer ) ; } } for ( Method concreteMethod : concreteSuperClassesMethods . values ( ) ) { if ( concreteMethod . getName ( ) . startsWith ( "ejb" ) || concreteMethod . getName ( ) . startsWith ( "sbb" ) ) { passed = false ; errorBuffer = appendToBuffer ( this . component . getAbstractSbbClass ( ) + " with method from super classes:  " + concreteMethod . getName ( ) , "6.12" , errorBuffer ) ; } if ( concreteMethod . getName ( ) . compareTo ( "finalize" ) == 0 ) { passed = false ; errorBuffer = appendToBuffer ( this . component . getAbstractSbbClass ( ) + "sbb abstract class  must not implement \"finalize\" method. Its implemented by super class." , "6.1" , errorBuffer ) ; } } if ( ! passed ) { logger . error ( errorBuffer ) ; } return passed ;


signature:
public class SbbComponentValidator { /** * This method checks for presence of
 * @ param sbbAbstractClassAbstraMethod
 * @ param sbbAbstractClassAbstraMethodFromSuperClasses
 * @ return */
boolean validateSbbActivityContextInterface ( Map < String , Method > sbbAbstractClassAbstraMethod , Map < String , Method > sbbAbstractClassAbstraMethodFromSuperClasses ) { } }

implementation:
if ( this . component . getDescriptor ( ) . getSbbActivityContextInterface ( ) == null ) { // FIXME : add check for asSbbActivityContextInteface method ? This
// will be catched at the end of check anyway
if ( logger . isTraceEnabled ( ) ) { logger . trace ( this . component . getDescriptor ( ) . getSbbID ( ) + " : No Sbb activity context interface defined" ) ; } return true ; } String errorBuffer = new String ( "" ) ; boolean passed = true ; Method asACIMethod = null ; // lets go through methods of sbbAbstract class ,
Iterator < Method > it = sbbAbstractClassAbstraMethod . values ( ) . iterator ( ) ; while ( it . hasNext ( ) ) { Method someMethod = it . next ( ) ; if ( someMethod . getName ( ) . compareTo ( _SBB_AS_SBB_ACTIVITY_CONTEXT_INTERFACE ) == 0 ) { // we have a winner , possibly - we have to check parameter
// list , cause someone can create abstract method ( or crap ,
// it can be concrete ) with different parametrs , in case its
// abstract , it will fail later on
if ( someMethod . getParameterTypes ( ) . length == 1 && someMethod . getParameterTypes ( ) [ 0 ] . getName ( ) . compareTo ( "javax.slee.ActivityContextInterface" ) == 0 ) { asACIMethod = someMethod ; it . remove ( ) ; break ; } } } if ( asACIMethod == null ) it = sbbAbstractClassAbstraMethodFromSuperClasses . values ( ) . iterator ( ) ; while ( it . hasNext ( ) ) { Method someMethod = it . next ( ) ; if ( someMethod . getName ( ) . compareTo ( _SBB_AS_SBB_ACTIVITY_CONTEXT_INTERFACE ) == 0 ) { // we have a winner , possibly - we have to check
// parameter
// list , cause someone can create abstract method ( or
// crap ,
// it can be concrete ) with different parametrs , in case
// its
// abstract , it will fail later on
if ( someMethod . getParameterTypes ( ) . length == 1 && someMethod . getParameterTypes ( ) [ 0 ] . getName ( ) . compareTo ( "javax.slee.ActivityContextInterface" ) == 0 ) { asACIMethod = someMethod ; it . remove ( ) ; break ; } } } if ( asACIMethod == null ) { passed = false ; errorBuffer = appendToBuffer ( this . component . getAbstractSbbClass ( ) + " must imlement narrow method asSbbActivityContextInterface" , "7.7.2" , errorBuffer ) ; } else { // must be public , abstract ? FIXME : not native ?
int asACIMethodModifiers = asACIMethod . getModifiers ( ) ; if ( ! Modifier . isPublic ( asACIMethodModifiers ) || ! Modifier . isAbstract ( asACIMethodModifiers ) || Modifier . isNative ( asACIMethodModifiers ) ) { passed = false ; errorBuffer = appendToBuffer ( this . component . getAbstractSbbClass ( ) + " narrow method asSbbActivityContextInterface must be public,abstract and not native." , "7.7.2" , errorBuffer ) ; } // now this misery comes to play , return type check
Class returnType = asACIMethod . getReturnType ( ) ; // Must return something from Sbb defined aci class inheritance
// tree
Class definedReturnType = this . component . getActivityContextInterface ( ) ; if ( returnType . getName ( ) . compareTo ( "void" ) == 0 ) { passed = false ; errorBuffer = appendToBuffer ( this . component . getAbstractSbbClass ( ) + " narrow method asSbbActivityContextInterface must have return type." , "7.7.2" , errorBuffer ) ; } else if ( returnType . equals ( definedReturnType ) ) { // its ok
// } else if ( ClassUtils . checkInterfaces ( definedReturnType ,
// returnType
// . getName ( ) ) ! = null ) {
} else { passed = false ; errorBuffer = appendToBuffer ( this . component . getAbstractSbbClass ( ) + " narrow method asSbbActivityContextInterface has wrong return type: " + returnType , "7.7.2" , errorBuffer ) ; } // no throws clause
if ( asACIMethod . getExceptionTypes ( ) != null && asACIMethod . getExceptionTypes ( ) . length > 0 ) { passed = false ; errorBuffer = appendToBuffer ( this . component . getAbstractSbbClass ( ) + " narrow method asSbbActivityContextInterface must not have throws clause." , "7.7.2" , errorBuffer ) ; } } // Even if we fail above we can do some checks on ACI if its present .
// this has to be present
Class sbbActivityContextInterface = this . component . getActivityContextInterface ( ) ; // ACI VALIDATION
// (1.1 ) = must be declared in package
if ( this . component . isSlee11 ( ) && sbbActivityContextInterface . getPackage ( ) == null ) { passed = false ; errorBuffer = appendToBuffer ( this . component . getAbstractSbbClass ( ) + " sbb activity context interface must be declared in package." , "7.5" , errorBuffer ) ; } if ( ! Modifier . isPublic ( sbbActivityContextInterface . getModifiers ( ) ) ) { passed = false ; errorBuffer = appendToBuffer ( this . component . getAbstractSbbClass ( ) + " sbb activity context interface must be declared as public." , "7.5" , errorBuffer ) ; } // We can have here ACI objects and java primitives , ugh , both methods
// dont have to be shown
passed = checkSbbAciFieldsConstraints ( this . component . getActivityContextInterface ( ) ) ; // finally lets remove asSbb method form abstract lists , this is used
// later to determine methods that didnt match any sbb definition
if ( asACIMethod != null ) { sbbAbstractClassAbstraMethod . remove ( ClassUtils . getMethodKey ( asACIMethod ) ) ; sbbAbstractClassAbstraMethodFromSuperClasses . remove ( ClassUtils . getMethodKey ( asACIMethod ) ) ; } if ( ! passed ) { logger . error ( errorBuffer ) ; } return passed ;


signature:
public class SbbComponentValidator { /** * This method validates all methods in ACI interface :
 * < ul >
 * < li > set / get methods and parameter names as in CMP fields decalration
 * < li > methods must
 * < ul >
 * < li > be public , abstract
 * < li > setters must have one param
 * < li > getters return type must match setter type
 * < li > allowe types are : primitives and serilizable types
 * < / ul >
 * < / ul >
 * < br >
 * Sbb descriptor provides method to obtain aci field names , if this test
 * passes it means that all fields there should be correct and can be used
 * to verify aliases
 * @ param sbbAciInterface
 * @ return */
boolean checkSbbAciFieldsConstraints ( Class sbbAciInterface ) { } }

implementation:
boolean passed = true ; String errorBuffer = new String ( "" ) ; try { if ( ! sbbAciInterface . isInterface ( ) ) { passed = false ; errorBuffer = appendToBuffer ( this . component . getAbstractSbbClass ( ) + " sbb activity context interface MUST be an interface." , "7.5" , errorBuffer ) ; return passed ; } // here we need all fields : )
HashSet < String > ignore = new HashSet < String > ( ) ; ignore . add ( ActivityContextInterfaceExt . class . getName ( ) ) ; ignore . add ( ActivityContextInterface . class . getName ( ) ) ; // FIXME : we could go other way , run this for each super interface
// we
// have ? ? ?
Map < String , Method > aciInterfacesDefinedMethods = ClassUtils . getAllInterfacesMethods ( sbbAciInterface , ignore ) ; // Here we will store fields name - type - if there is getter and
// setter ,
// type must match ! ! !
Map < String , Class > localNameToType = new HashMap < String , Class > ( ) ; for ( String methodKey : aciInterfacesDefinedMethods . keySet ( ) ) { Method fieldMethod = aciInterfacesDefinedMethods . get ( methodKey ) ; String methodName = fieldMethod . getName ( ) ; if ( ! ( methodName . startsWith ( "get" ) || methodName . startsWith ( "set" ) ) ) { passed = false ; errorBuffer = appendToBuffer ( this . component . getAbstractSbbClass ( ) + " sbb activity context interface can have only getter/setter  methods." , "7.5.1" , errorBuffer ) ; continue ; } // let us get field name :
String fieldName = methodName . replaceFirst ( "set" , "" ) . replaceFirst ( "get" , "" ) ; if ( ! Character . isUpperCase ( fieldName . charAt ( 0 ) ) ) { passed = false ; errorBuffer = appendToBuffer ( this . component . getAbstractSbbClass ( ) + " sbb activity context interface can have only getter/setter  methods - 4th char in those methods must be capital." , "7.5.1" , errorBuffer ) ; } // check throws clause .
// number of parameters
if ( fieldMethod . getExceptionTypes ( ) . length > 0 ) { passed = false ; errorBuffer = appendToBuffer ( this . component . getAbstractSbbClass ( ) + " sbb activity context interface getter method must have empty throws clause: " + fieldMethod . getName ( ) , "7.5.1" , errorBuffer ) ; } boolean isGetter = methodName . startsWith ( "get" ) ; Class fieldType = null ; if ( isGetter ) { // no params
if ( fieldMethod . getParameterTypes ( ) != null && fieldMethod . getParameterTypes ( ) . length > 0 ) { passed = false ; errorBuffer = appendToBuffer ( this . component . getAbstractSbbClass ( ) + " sbb activity context interface getter method must not have parameters: " + fieldMethod . getName ( ) , "7.5.1" , errorBuffer ) ; } fieldType = fieldMethod . getReturnType ( ) ; if ( fieldType . getName ( ) . compareTo ( "void" ) == 0 ) { passed = false ; errorBuffer = appendToBuffer ( this . component . getAbstractSbbClass ( ) + " sbb activity context interface getter method must have return type: " + fieldMethod . getName ( ) , "7.5.1" , errorBuffer ) ; } } else { if ( fieldMethod . getParameterTypes ( ) != null && fieldMethod . getParameterTypes ( ) . length != 1 ) { passed = false ; errorBuffer = appendToBuffer ( this . component . getAbstractSbbClass ( ) + " sbb activity context interface setter method must single parameter: " + fieldMethod . getName ( ) , "7.5.1" , errorBuffer ) ; // Here we quick fail
continue ; } fieldType = fieldMethod . getParameterTypes ( ) [ 0 ] ; if ( fieldMethod . getReturnType ( ) . getName ( ) . compareTo ( "void" ) != 0 ) { passed = false ; errorBuffer = appendToBuffer ( this . component . getAbstractSbbClass ( ) + " sbb activity context interface setter method must not have return type: " + fieldMethod . getName ( ) , "7.5.1" , errorBuffer ) ; } } // Field type can be primitive and serialzable
if ( ! ( _PRIMITIVES . contains ( fieldType . getName ( ) ) || ClassUtils . checkInterfaces ( fieldType , "java.io.Serializable" ) != null ) ) { passed = false ; errorBuffer = appendToBuffer ( this . component . getAbstractSbbClass ( ) + " sbb activity context interface field(" + fieldName + ") has wrong type, only primitives and serializable: " + fieldType , "7.5.1" , errorBuffer ) ; // we fail here
continue ; } if ( localNameToType . containsKey ( fieldName ) ) { Class storedType = localNameToType . get ( fieldName ) ; if ( ! storedType . equals ( fieldType ) ) { passed = false ; errorBuffer = appendToBuffer ( this . component . getAbstractSbbClass ( ) + " sbb activity context interface has wrong definition of parameter - setter and getter types do not match: " + fieldName + ", type1: " + fieldType . getName ( ) + " typ2:" + storedType . getName ( ) , "7.5.1" , errorBuffer ) ; // we fail here
continue ; } } else { // simply store
localNameToType . put ( fieldName , fieldType ) ; } } // FIXME : add check against components get aci fields ?
} finally { if ( ! passed ) { logger . error ( errorBuffer ) ; } } return passed ;


signature:
public class SbbComponentValidator { /** * 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 .
for ( ProfileSpecRefDescriptor profileReference : this . component . getDescriptor ( ) . getProfileSpecRefs ( ) ) { ProfileSpecificationComponent specComponent = this . repository . getComponentByID ( profileReference . getComponentID ( ) ) ; if ( specComponent == null ) { // should not happen
passed = false ; errorBuffer = appendToBuffer ( "Referenced " + profileReference . getComponentID ( ) + " 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 ( "Sbb is following 1.0 JSLEE contract, it must not reference 1.1 profile specification: " + profileReference . getComponentID ( ) , "1.3" , errorBuffer ) ; } } } } } finally { if ( ! passed ) { if ( logger . isEnabledFor ( Level . ERROR ) ) { logger . error ( errorBuffer ) ; } } } return passed ;


signature:
public class EventContextFactoryImpl { /** * ( non - Javadoc )
 * @ seeorg . mobicents . slee . container . event . EventContextFactory #
 * createActivityEndEventContext
 * ( org . mobicents . slee . container . activity . ActivityContext ,
 * org . mobicents . slee . container . event . EventUnreferencedCallback ) */
public EventContext createActivityEndEventContext ( ActivityContext ac , EventUnreferencedCallback unreferencedCallback ) { } }

implementation: final EventReferencesHandlerImpl referencesHandler = new EventReferencesHandlerImpl ( ) ; final EventContextData data = dataSource . newEventContextData ( ActivityEndEventImpl . EVENT_TYPE_ID , ActivityEndEventImpl . SINGLETON , ac , null , null , null , null , unreferencedCallback , referencesHandler ) ; final EventContextImpl eventContext = new ActivityEndEventContextImpl ( data , this ) ; referencesHandler . setEventContext ( eventContext ) ; return eventContext ;


signature:
public class EventContextFactoryImpl { /** * ( non - Javadoc )
 * @ see
 * org . mobicents . slee . container . event . EventContextFactory # createEventContext
 * ( javax . slee . EventTypeID , java . lang . Object ,
 * org . mobicents . slee . container . activity . ActivityContext ,
 * javax . slee . Address , javax . slee . ServiceID ,
 * org . mobicents . slee . container . event . EventProcessingSucceedCallback ,
 * org . mobicents . slee . container . event . EventProcessingFailedCallback ,
 * org . mobicents . slee . container . event . EventUnreferencedCallback ) */
public EventContext createEventContext ( EventTypeID eventTypeId , Object eventObject , ActivityContext ac , Address address , ServiceID serviceID , EventProcessingSucceedCallback succeedCallback , EventProcessingFailedCallback failedCallback , EventUnreferencedCallback unreferencedCallback ) { } }

implementation: final EventReferencesHandlerImpl referencesHandler = new EventReferencesHandlerImpl ( ) ; final EventContextData data = dataSource . newEventContextData ( eventTypeId , eventObject , ac , address , serviceID , succeedCallback , failedCallback , unreferencedCallback , referencesHandler ) ; final EventContextImpl eventContext = new EventContextImpl ( data , this ) ; referencesHandler . setEventContext ( eventContext ) ; return eventContext ;


signature:
public class ProfileProvisioningMBeanUtils { /** * ( non - Javadoc )
 * @ see javax . slee . management . ProfileProvisioningMBean # getProfileTables ( ) */
public Collection getProfileTables ( ) throws ManagementConsoleException { } }

implementation: try { return ( Collection ) mbeanServer . invoke ( profileProvisioningMBean , "getProfileTables" , new Object [ ] { } , new String [ ] { } ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; throw new ManagementConsoleException ( SleeManagementMBeanUtils . doMessage ( e ) ) ; }


signature:
public class ProfileProvisioningMBeanUtils { /** * ( non - Javadoc )
 * @ see javax . slee . management . ProfileProvisioningMBean # getProfilesByIndexedAttribute ( java . lang . String , java . lang . String , java . lang . Object ) */
public Collection getProfilesByIndexedAttribute ( String arg0 , String arg1 , Object arg2 ) throws ManagementConsoleException { } }

implementation:
// TODO Auto - generated method stub
return null ;


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

implementation: switch ( state ) { case SERVICE_INACTIVE : return INACTIVE ; case SERVICE_ACTIVE : return ACTIVE ; case SERVICE_STOPPING : return STOPPING ; default : throw new IllegalArgumentException ( "Invalid state: " + state ) ; }


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

implementation: if ( state == null ) throw new NullPointerException ( "state is null" ) ; if ( state . equalsIgnoreCase ( INACTIVE_STRING ) ) return INACTIVE ; if ( state . equalsIgnoreCase ( ACTIVE_STRING ) ) return ACTIVE ; if ( state . equalsIgnoreCase ( STOPPING_STRING ) ) return STOPPING ; throw new IllegalArgumentException ( "Invalid state: " + state ) ;


signature:
public class SleeProviderFactory { /** * Get an instance of a < code > SleeProvider < / code > peer class . This method is
 * equivalent to { @ link # getSleeProvider ( String , ClassLoader ) getSleeProvider ( peerClassName ,
 * SleeProviderFactory . class . getClassLoader ( ) ) } . In the case where the
 * SleeProviderFactory ' s class loader is < code > null < / code > ,
 * < code > ClassLoader . getSystemClassLoader ( ) < / code > is used instead .
 * @ param peerClassName the fully - qualified class name of a class that
 * implements the < code > SleeProvider < / code > interface .
 * @ return an instance of the specified class .
 * @ throws NullPointerException if < code > peerClassName < / code > is < code > null < / code > .
 * @ throws PeerUnavailableException if the peer class could not be instantiated
 * or did not implement the < code > SleeProvider < / code > interface . */
public static SleeProvider getSleeProvider ( String peerClassName ) throws NullPointerException , PeerUnavailableException { } }

implementation: ClassLoader classloader = SleeProviderFactory . class . getClassLoader ( ) ; if ( classloader == null ) classloader = ClassLoader . getSystemClassLoader ( ) ; return getSleeProvider ( peerClassName , classloader ) ;


signature:
public class SleeProviderFactory { /** * Get an instance of a < code > SleeProvider < / code > peer class using the specified
 * class loader .
 * @ param peerClassName the fully - qualified class name of a class that
 * implements the < code > SleeProvider < / code > interface .
 * @ param classloader the classloader to use to load the peer class .
 * @ return an instance of the specified class .
 * @ throws NullPointerException if < code > peerClassName < / code > or < code > classloader < / code >
 * is < code > null < / code > .
 * @ throws PeerUnavailableException if the peer class could not be instantiated
 * or did not implement the < code > SleeProvider < / code > interface . */
public static SleeProvider getSleeProvider ( String peerClassName , ClassLoader classloader ) throws NullPointerException , PeerUnavailableException { } }

implementation: if ( peerClassName == null ) throw new NullPointerException ( "peerClassName is null" ) ; if ( peerClassName . length ( ) == 0 ) throw new PeerUnavailableException ( "peerClassName is zero-length" ) ; try { return ( SleeProvider ) classloader . loadClass ( peerClassName ) . newInstance ( ) ; } catch ( Throwable t ) { throw new PeerUnavailableException ( "Peer class could not be instantiated" , t ) ; }


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

implementation:
VendorExtensionUtils . writeObject ( out , vendorDataSerializationEnabled ? vendorData : null ) ; if ( cause != null ) { out . writeBoolean ( true ) ; // serialize the cause inside a marshalled object to isolate
// the serialized data for it in the stream
out . writeObject ( new MarshalledObject ( cause ) ) ; // serialize a text form of the stack trace
StringWriter sw = new StringWriter ( ) ; PrintWriter pw = new PrintWriter ( sw ) ; cause . printStackTrace ( pw ) ; pw . flush ( ) ; out . writeUTF ( sw . getBuffer ( ) . toString ( ) ) ; } else { out . writeBoolean ( false ) ; }


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

implementation:
vendorData = VendorExtensionUtils . readObject ( in , vendorDataDeserializationEnabled ) ; if ( in . readBoolean ( ) ) { // attempt to deserialize the cause
try { cause = ( Throwable ) ( ( MarshalledObject ) in . readObject ( ) ) . get ( ) ; } catch ( ClassNotFoundException cnfe ) { // must have been a class not in standard classloaders and not remotely loadable
// do nothing now , we ' ll replace it with the string version included next in the stream
} String causeString = in . readUTF ( ) ; if ( cause == null ) { // replace the cause with a generic exception
// that includes the original stack trace in its message
cause = new Exception ( "Undeserializable cause, original cause stack trace follows: " + causeString ) ; } }


signature:
public class ProfileFacilityImpl { /** * Get a collection of ProfileID objects that identify all the profiles
 * contained in the specified profile table . The collection returned is
 * immutable . Any attempt to modify it , either directly or indirectly , will
 * result in a java . lang . UnsupportedOperationException being thrown .
 * Note : A profile identifier for the profile table ' s default profile will
 * not be included in the collection returned by this method as the default
 * profile has no such identifier .
 * This method is a required transactional method .
 * @ deprecated
 * @ param profileTableName
 * - the name of the profile table .
 * @ return a read - only collection of ProfileID objects identifying the
 * profiles contained in the specified profile table .
 * @ throws java . lang . NullPointerException
 * - if profileTableName is null .
 * @ throws UnrecognizedProfileTableNameException
 * - if a profile table with the specified name does not exist .
 * @ throws TransactionRolledbackLocalException
 * - if this method was invoked without a valid transaction
 * context and the transaction started by this method failed to
 * commit .
 * @ throws FacilityException
 * - if the profile identifies could not be obtained due to a
 * system - level failure . */
public Collection < ProfileID > getProfiles ( String profileTableName ) throws NullPointerException , UnrecognizedProfileTableNameException , TransactionRolledbackLocalException , FacilityException { } }

implementation: if ( logger . isTraceEnabled ( ) ) { logger . trace ( "getProfiles( profileTableName = " + profileTableName + " )" ) ; } profileManagement . getSleeContainer ( ) . getTransactionManager ( ) . mandateTransaction ( ) ; try { return profileManagement . getProfileTable ( profileTableName ) . getProfiles ( ) ; } catch ( NullPointerException e ) { throw e ; } catch ( UnrecognizedProfileTableNameException e ) { throw e ; } catch ( Throwable e ) { throw new FacilityException ( e . getMessage ( ) , e ) ; }


signature:
public class ProfileFacilityImpl { /** * Get a ProfileTableActivity object for a profile table .
 * This method is a required transactional method .
 * @ param profileTableName
 * - the name of the profile table .
 * @ return a ProfileTableActivity object for the profile table .
 * @ throws java . lang . NullPointerException
 * - if profileTableName is null .
 * @ throws UnrecognizedProfileTableNameException
 * - if a profile table with the specified name does not exist .
 * @ throws TransactionRolledbackLocalException
 * - if this method was invoked without a valid transaction
 * context and the transaction started by this method failed to
 * commit .
 * @ throws FacilityException
 * - if the activity could not be obtained due to a system - level
 * failure . This exception is also thrown if the method is
 * invoked on a ProfileFacility object provided to a resource
 * adaptor via its ResourceAdaptorContext . */
public ProfileTableActivity getProfileTableActivity ( String profileTableName ) throws NullPointerException , UnrecognizedProfileTableNameException , TransactionRolledbackLocalException , FacilityException { } }

implementation:
if ( logger . isTraceEnabled ( ) ) { logger . trace ( "getProfileTableActivity( profileTableName = " + profileTableName + " )" ) ; } final SleeTransactionManager sleeTransactionManager = profileManagement . getSleeContainer ( ) . getTransactionManager ( ) ; boolean terminateTx = sleeTransactionManager . requireTransaction ( ) ; try { return profileManagement . getProfileTable ( profileTableName ) . getActivity ( ) ; } catch ( NullPointerException e ) { throw e ; } catch ( UnrecognizedProfileTableNameException e ) { throw e ; } catch ( Throwable e ) { throw new FacilityException ( "Failed to obtain profile table." , e ) ; } finally { // never rollback
try { sleeTransactionManager . requireTransactionEnd ( terminateTx , false ) ; } catch ( Throwable e ) { throw new FacilityException ( e . getMessage ( ) , e ) ; } }


signature:
public class ProfileFacilityImpl { /** * Get a ProfileID object that identifies the profile contained in the
 * specified profile table , where the specified profile attribute is set to
 * the specified value . In the case of a profile attribute of an array type ,
 * the type of the specified value must be the base component type of the
 * array , not the array type itself , and the SLEE will return the profile
 * identifier of any profile that contains the value within the array .
 * Note : The profile table ' s default profile is not considered when
 * determining matching profiles as it has no profile identifier that can be
 * returned by this method .
 * This method is a required transactional method .
 * This method can only be invoked against profile tables created from SLEE
 * 1.0 profile specifications . Attempting to invoke it on a profile table
 * created from a SLEE 1.1 profile specification causes a FacilityException
 * to be thrown .
 * @ deprecated
 * @ param profileTableName
 * - the name of the profile table .
 * @ param attributeName
 * - the name of the profile ' s attribute to check .
 * @ param attributeValue
 * - the value to compare the attribute with . Returns : the
 * profile identifier for the first matching profile , or null if
 * no matching profile was found .
 * @ throws java . lang . NullPointerException
 * - if any attribute is null .
 * @ throws UnrecognizedProfileTableNameException
 * - if a profile table with the specified name does not exist .
 * @ throws UnrecognizedAttributeException
 * - if an attribute with the specified name is not defined in
 * the profile specification for the specified profile table .
 * @ throws AttributeNotIndexedException
 * - if the specified attribute is not indexed in the profile
 * specification for the specified profile table .
 * @ throws AttributeTypeMismatchException
 * - if the type of the supplied attribute value does not match
 * the type of the specified indexed attribute .
 * @ throws TransactionRolledbackLocalException
 * - if this method was invoked without a valid transaction
 * context and the transaction started by this method failed to
 * commit .
 * @ throws FacilityException
 * - if the profile identifier could not be obtained due to a
 * system - level failure . */
public ProfileID getProfileByIndexedAttribute ( java . lang . String profileTableName , java . lang . String attributeName , java . lang . Object attributeValue ) throws NullPointerException , UnrecognizedProfileTableNameException , UnrecognizedAttributeException , AttributeNotIndexedException , AttributeTypeMismatchException , TransactionRolledbackLocalException , FacilityException { } }

implementation: if ( logger . isTraceEnabled ( ) ) { logger . trace ( "getProfileByIndexedAttribute( profileTableName = " + profileTableName + " , attributeName = " + attributeName + " , attributeValue = " + attributeValue + " )" ) ; } profileManagement . getSleeContainer ( ) . getTransactionManager ( ) . mandateTransaction ( ) ; try { ProfileTableImpl profileTable = profileManagement . getProfileTable ( profileTableName ) ; if ( profileTable . getProfileSpecificationComponent ( ) . isSlee11 ( ) ) { throw new FacilityException ( "JAIN SLEE 1.1 Specs forbidden the usage of this method on SLEE 1.1 Profile Tables" ) ; } Collection < ProfileID > profileIDs = profileTable . getProfilesByAttribute ( attributeName , attributeValue , false ) ; if ( profileIDs . isEmpty ( ) ) { return null ; } else { return profileIDs . iterator ( ) . next ( ) ; } } catch ( NullPointerException e ) { throw e ; } catch ( UnrecognizedProfileTableNameException e ) { throw e ; } catch ( UnrecognizedAttributeException e ) { throw e ; } catch ( AttributeNotIndexedException e ) { throw e ; } catch ( AttributeTypeMismatchException e ) { throw e ; } catch ( Throwable e ) { throw new FacilityException ( e . getMessage ( ) , e ) ; }


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

implementation: Object jaxbPojo = buildJAXBPojo ( inputStream ) ; List < ProfileSpecificationDescriptorImpl > result = new ArrayList < ProfileSpecificationDescriptorImpl > ( ) ; boolean isSlee11 = false ; MProfileSpecJar mProfileSpecJar = null ; if ( jaxbPojo instanceof org . mobicents . slee . container . component . deployment . jaxb . slee . profile . ProfileSpecJar ) { mProfileSpecJar = new MProfileSpecJar ( ( org . mobicents . slee . container . component . deployment . jaxb . slee . profile . ProfileSpecJar ) jaxbPojo ) ; } else if ( jaxbPojo instanceof org . mobicents . slee . container . component . deployment . jaxb . slee11 . profile . ProfileSpecJar ) { mProfileSpecJar = new MProfileSpecJar ( ( org . mobicents . slee . container . component . deployment . jaxb . slee11 . profile . ProfileSpecJar ) jaxbPojo ) ; isSlee11 = true ; } else { throw new SLEEException ( "unexpected class of jaxb pojo built: " + ( jaxbPojo != null ? jaxbPojo . getClass ( ) : null ) ) ; } MSecurityPermissions securityPermissions = mProfileSpecJar . getSecurityPermissions ( ) ; for ( MProfileSpec mProfileSpec : mProfileSpecJar . getProfileSpec ( ) ) { result . add ( new ProfileSpecificationDescriptorImpl ( mProfileSpec , securityPermissions , isSlee11 ) ) ; } return result ;


signature:
public class AbstractOperation { /** * Method to display result of operation . */
public void displayResult ( ) { } }

implementation:
// default impl of display ;
if ( ! context . isQuiet ( ) ) { // Translate the result to text
String resultText = prepareResultText ( ) ; // render results to out
PrintWriter out = context . getWriter ( ) ; out . println ( resultText ) ; out . flush ( ) ; }


signature:
public class AbstractOperation { /** * Default implementation .
 * @ param prefix
 * @ param array
 * @ return */
protected String unfoldArray ( String prefix , Object [ ] array , PropertyEditor editor ) { } }

implementation:
// StringBuffer sb = new StringBuffer ( " \ n " ) ;
StringBuffer sb = new StringBuffer ( "[" ) ; for ( int index = 0 ; index < array . length ; index ++ ) { if ( editor != null ) { editor . setValue ( array [ index ] ) ; sb . append ( editor . getAsText ( ) ) ; } else { sb . append ( array [ index ] . toString ( ) ) ; } if ( index < array . length - 1 ) { sb . append ( CID_SEPARATOR ) ; // sb . append ( " \ n " ) ;
} } sb . append ( "]" ) ; return sb . toString ( ) ;


signature:
public class CongestionControlNotification { /** * ( non - Javadoc )
 * @ see javax . slee . management . NotificationSource # compareTo ( java . lang . Object ) */
public int compareTo ( Object obj ) { } }

implementation: if ( obj == this ) return 0 ; if ( obj == null ) throw new NullPointerException ( ) ; if ( obj . getClass ( ) == this . getClass ( ) ) { return ( ( CongestionControlNotification ) obj ) . localAddress . compareTo ( this . localAddress ) ; } else { return - 1 ; }


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

implementation:
if ( ! ( notification instanceof AlarmNotification ) ) return false ; synchronized ( knownAlarms ) { clearStaleTimeouts ( ) ; if ( knownAlarms . containsKey ( notification ) ) return false ; // we ' ve not seen this alarm before , or the period has expired since
// the first notification
knownAlarms . put ( notification , new Long ( System . currentTimeMillis ( ) ) ) ; return true ; }


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

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


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

implementation:
if ( ! ( notification instanceof UsageNotification ) ) return false ; UsageNotification usageNotification = ( UsageNotification ) notification ; if ( service != null ) { // SLEE 1.0 comparison
if ( ! service . equals ( usageNotification . getService ( ) ) ) return false ; if ( ! sbb . equals ( usageNotification . getSbb ( ) ) ) return false ; } else { // SLEE 1.1 comparison
if ( ! notificationSource . equals ( usageNotification . getNotificationSource ( ) ) ) return false ; } if ( ! usageNotification . getUsageParameterName ( ) . equals ( paramName ) ) return false ; long current = usageNotification . getValue ( ) ; try { return ( previous != threshold ) ? ( ( previous < threshold && current > threshold ) || // crossed + ve dir
( previous > threshold && current < threshold ) ) // crossed - ve dir
: ( getDirection ( previous , current ) == lastDir ) ; // crossed in last dir
} finally { if ( previous != current ) { lastDir = getDirection ( previous , current ) ; previous = current ; } }


signature:
public class SleeEndpointFireEventNotTransactedExecutor { /** * Executes a non transacted fire event operation .
 * @ param realHandle
 * @ param refHandle
 * @ param eventType
 * @ param event
 * @ param address
 * @ param receivableService
 * @ param eventFlags
 * @ throws ActivityIsEndingException
 * @ throws FireEventException
 * @ throws SLEEException
 * @ throws UnrecognizedActivityHandleException */
void execute ( final ActivityHandle realHandle , final ActivityHandle refHandle , final FireableEventType eventType , final Object event , final Address address , final ReceivableService receivableService , final int eventFlags ) throws ActivityIsEndingException , FireEventException , SLEEException , UnrecognizedActivityHandleException { } }

implementation: final SleeTransaction tx = super . suspendTransaction ( ) ; try { sleeEndpoint . _fireEvent ( realHandle , refHandle , eventType , event , address , receivableService , eventFlags , tx ) ; } finally { if ( tx != null ) { super . resumeTransaction ( tx ) ; } }


signature:
public class ConcreteProfileEntityFactoryGenerator { /** * Generates the profile entity factory class */
public Class < ? > generateClass ( ) { } }

implementation:
CtClass ctClass = null ; try { ClassPool classPool = profileComponent . getClassPool ( ) ; Collection < ProfileAttribute > profileAttributes = profileComponent . getProfileAttributes ( ) . values ( ) ; String className = profileEntityClass . getName ( ) + "F" ; ctClass = classPool . makeClass ( className ) ; CtClass profileEntityFactoryClass = classPool . get ( ProfileEntityFactory . class . getName ( ) ) ; CtClass [ ] interfaces = new CtClass [ ] { profileEntityFactoryClass } ; ctClass . setInterfaces ( interfaces ) ; // copy newInstance method from interface and generate body
CtMethod newInstanceMethod = profileEntityFactoryClass . getDeclaredMethod ( "newInstance" ) ; CtMethod newInstanceMethodCopy = CtNewMethod . copy ( newInstanceMethod , ctClass , null ) ; String newInstanceMethodCopyBody = "{ " + profileEntityClass . getName ( ) + " profileEntity = new " + profileEntityClass . getName ( ) + "();" + " profileEntity.setTableName($1); " + " profileEntity.setProfileName($2); " + " return profileEntity; " + "}" ; if ( logger . isTraceEnabled ( ) ) { logger . trace ( "\nAdding method named " + newInstanceMethodCopy . getName ( ) + " with body " + newInstanceMethodCopy + " , into class " + className ) ; } newInstanceMethodCopy . setBody ( newInstanceMethodCopyBody ) ; ctClass . addMethod ( newInstanceMethodCopy ) ; // copy copyAttributes method from interface and generate body
CtMethod copyAttributesMethod = profileEntityFactoryClass . getDeclaredMethod ( "copyAttributes" ) ; CtMethod copyAttributesMethodCopy = CtNewMethod . copy ( copyAttributesMethod , ctClass , null ) ; // body header
String copyAttributesMethodCopyBody = "{ " + profileEntityClass . getName ( ) + " newProfileEntity = (" + profileEntityClass . getName ( ) + ") $2; " + profileEntityClass . getName ( ) + " oldProfileEntity = (" + profileEntityClass . getName ( ) + ") $1; " ; // process fields copy
String profileEntityAttributeArrayValueClassName = null ; if ( System . getSecurityManager ( ) == null ) { for ( ProfileAttribute profileAttribute : profileAttributes ) { String accessorMethodSufix = ClassGeneratorUtils . getPojoCmpAccessorSufix ( profileAttribute . getName ( ) ) ; if ( profileAttribute . isArray ( ) ) { profileEntityAttributeArrayValueClassName = profileEntityAttributeArrayValueClasses . get ( profileAttribute . getName ( ) ) . getName ( ) ; copyAttributesMethodCopyBody += "if (oldProfileEntity.get" + accessorMethodSufix + "() != null) { " + // if the target list already exists then empty it so elements get deleted , otherwise create new
List . class . getName ( ) + " new" + profileAttribute . getName ( ) + " = newProfileEntity.get" + accessorMethodSufix + "(); " + "if (new" + profileAttribute . getName ( ) + " == null) { new" + profileAttribute . getName ( ) + " = new " + LinkedList . class . getName ( ) + "(); } else { new" + profileAttribute . getName ( ) + ".clear(); } " + // extract list to copy
List . class . getName ( ) + " old" + profileAttribute . getName ( ) + " = oldProfileEntity.get" + accessorMethodSufix + "(); " + // iterate each list element
"for (" + Iterator . class . getName ( ) + " i = old" + profileAttribute . getName ( ) + ".iterator(); i.hasNext();) { " + profileEntityAttributeArrayValueClassName + " oldArrayValue = (" + profileEntityAttributeArrayValueClassName + ") i.next(); " + profileEntityAttributeArrayValueClassName + " newArrayValue = new " + profileEntityAttributeArrayValueClassName + "(); " + // link to profile entity
"newArrayValue.setOwner( newProfileEntity ); " + // copy fields
"newArrayValue.setString( oldArrayValue.getString() ); " + "newArrayValue.setSerializable( (" + Serializable . class . getName ( ) + ") " + ObjectCloner . class . getName ( ) + ".makeDeepCopy(oldArrayValue.getSerializable()) ); " + "new" + profileAttribute . getName ( ) + ".add(newArrayValue); " + "} " + "newProfileEntity.set" + accessorMethodSufix + "(new" + profileAttribute . getName ( ) + "); };" ; } else { if ( profileAttribute . isPrimitive ( ) ) { // just copy value
copyAttributesMethodCopyBody += " newProfileEntity.set" + accessorMethodSufix + "(oldProfileEntity.get" + accessorMethodSufix + "()); " ; } else { // just copy value but do a deep copy
copyAttributesMethodCopyBody += " if (oldProfileEntity.get" + accessorMethodSufix + "() != null) { newProfileEntity.set" + accessorMethodSufix + "((" + profileAttribute . getType ( ) . getName ( ) + ")" + ObjectCloner . class . getName ( ) + ".makeDeepCopy(oldProfileEntity.get" + accessorMethodSufix + "())); }; " ; } } } } else { for ( ProfileAttribute profileAttribute : profileAttributes ) { String accessorMethodSufix = ClassGeneratorUtils . getPojoCmpAccessorSufix ( profileAttribute . getName ( ) ) ; if ( profileAttribute . isArray ( ) ) { profileEntityAttributeArrayValueClassName = profileEntityAttributeArrayValueClasses . get ( profileAttribute . getName ( ) ) . getName ( ) ; copyAttributesMethodCopyBody += "if (" + Utility . class . getName ( ) + ".makeSafeProxyCall(oldProfileEntity,\"get" + accessorMethodSufix + "\",null,null) != null) {" + "" + // if the target list already exists then empty it so elements get deleted , otherwise create new
List . class . getName ( ) + " new" + profileAttribute . getName ( ) + " = newProfileEntity.get" + accessorMethodSufix + "(); " + "if (new" + profileAttribute . getName ( ) + " == null) { new" + profileAttribute . getName ( ) + " = new " + LinkedList . class . getName ( ) + "(); } else { new" + profileAttribute . getName ( ) + ".clear(); } " + // extract list to copy
// List . class . getName ( ) + " old " + profileAttribute . getName ( ) + " = oldProfileEntity . get " + accessorMethodSufix + " ( ) ; " +
List . class . getName ( ) + " old" + profileAttribute . getName ( ) + " = (" + List . class . getName ( ) + ")" + Utility . class . getName ( ) + ".makeSafeProxyCall(oldProfileEntity,\"get" + accessorMethodSufix + "\",null,null);" + // iterate each list element
Iterator . class . getName ( ) + " i = " + Utility . class . getName ( ) + ".makeSafeProxyCall(old" + profileAttribute . getName ( ) + ",\"iterator\",null,null);" + "for (; " + Utility . class . getName ( ) + ".evaluateNext(i);) { " + profileEntityAttributeArrayValueClassName + " oldArrayValue = (" + profileEntityAttributeArrayValueClassName + ") i.next();" + profileEntityAttributeArrayValueClassName + " newArrayValue = new " + profileEntityAttributeArrayValueClassName + "(); " + // link to profile entity
"newArrayValue.setOwner( newProfileEntity ); " + // copy fields
"newArrayValue.setString( oldArrayValue.getString() ); " + "newArrayValue.setSerializable( (" + Serializable . class . getName ( ) + ") " + ObjectCloner . class . getName ( ) + ".makeDeepCopy(oldArrayValue.getSerializable()) ); " + "new" + profileAttribute . getName ( ) + ".add(newArrayValue); " + "} " + // " newProfileEntity . set " + accessorMethodSufix + " ( new " + profileAttribute . getName ( ) + " ) ; } ; " ;
Utility . class . getName ( ) + ".makeSafeProxyCall(newProfileEntity,\"set" + accessorMethodSufix + "\",new Class[]{" + Utility . class . getName ( ) + ".getReturnType(oldProfileEntity,\"get" + accessorMethodSufix + "\")},new Object[]{new" + profileAttribute . getName ( ) + "});}" ; } else { if ( profileAttribute . isPrimitive ( ) ) { // just copy value
// copyAttributesMethodCopyBody + =
// " newProfileEntity . set " + accessorMethodSufix + " ( oldProfileEntity . get " + accessorMethodSufix + " ( ) ) ; " ;
copyAttributesMethodCopyBody += "Object value = " + Utility . class . getName ( ) + ".makeSafeProxyCall(oldProfileEntity,\"get" + accessorMethodSufix + "\",null,null);" ; copyAttributesMethodCopyBody += Utility . class . getName ( ) + ".makeSafeProxyCall(newProfileEntity,\"set" + accessorMethodSufix + "\",new Class[]{" + Utility . class . getName ( ) + ".getReturnType(oldProfileEntity,\"get" + accessorMethodSufix + "\")},new Object[]{value});" ; } else { // just copy value but do a deep copy
copyAttributesMethodCopyBody += "if (" + Utility . class . getName ( ) + ".makeSafeProxyCall(oldProfileEntity,\"get" + accessorMethodSufix + "\",null,null) != null)  " + "{ Object value = " + Utility . class . getName ( ) + ".makeSafeProxyCall(oldProfileEntity,\"get" + accessorMethodSufix + "\",null,null);" // + " newProfileEntity . set " + accessorMethodSufix + " ( ( " + profileAttribute . getType ( ) . getName ( ) + " ) " + ObjectCloner . class . getName ( ) + " . makeDeepCopy ( value ) ) ; } ; "
+ Utility . class . getName ( ) + ".makeSafeProxyCall(newProfileEntity,\"set" + accessorMethodSufix + "\",new Class[]{" + Utility . class . getName ( ) + ".getReturnType(oldProfileEntity,\"get" + accessorMethodSufix + "\")},new Object[]{" + ObjectCloner . class . getName ( ) + ".makeDeepCopy(value)});" + "}" ; } } } } // body footer
copyAttributesMethodCopyBody += " }" ; if ( logger . isTraceEnabled ( ) ) { logger . trace ( "\nAdding method named " + copyAttributesMethodCopy . getName ( ) + " with body " + copyAttributesMethodCopyBody + " , into class " + className ) ; } copyAttributesMethodCopy . setBody ( copyAttributesMethodCopyBody ) ; ctClass . addMethod ( copyAttributesMethodCopy ) ; String deployDir = profileComponent . getDeploymentDir ( ) . getAbsolutePath ( ) ; // write class
if ( logger . isTraceEnabled ( ) ) { logger . trace ( "Writing ProfileEntityFactory generated class ( " + ctClass . getName ( ) + " ) to: " + deployDir ) ; } ctClass . writeFile ( deployDir ) ; return Thread . currentThread ( ) . getContextClassLoader ( ) . loadClass ( className ) ; } catch ( Throwable e ) { throw new SLEEException ( e . getMessage ( ) , e ) ; } finally { if ( ctClass != null ) { try { ctClass . defrost ( ) ; } catch ( Throwable e ) { logger . error ( e . getMessage ( ) , e ) ; } } }


signature:
public class ActivityContextNamingFacilityCacheData { /** * Binds the specified aci name with the specified activity context handle
 * @ param ach
 * @ param name
 * @ throws NameAlreadyBoundException */
public void bindName ( Object ach , String name ) throws NameAlreadyBoundException { } }

implementation: final Node node = getNode ( ) ; if ( node . hasChild ( name ) ) { throw new NameAlreadyBoundException ( "name already bound" ) ; } else { node . addChild ( Fqn . fromElements ( name ) ) . put ( CACHE_NODE_MAP_KEY , ach ) ; }


signature:
public class ActivityContextNamingFacilityCacheData { /** * Unbinds the specified aci name with the specified activity context id
 * @ param name
 * @ return
 * @ throws NameNotBoundException */
public Object unbindName ( String name ) throws NameNotBoundException { } }

implementation: final Node node = getNode ( ) ; final Node childNode = node . getChild ( name ) ; if ( childNode == null ) { throw new NameNotBoundException ( "name not bound" ) ; } else { final Object ach = childNode . get ( CACHE_NODE_MAP_KEY ) ; node . removeChild ( name ) ; return ach ; }


signature:
public class ActivityContextNamingFacilityCacheData { /** * Lookup of the activity context id bound to the specified aci name
 * @ param name
 * @ return */
public Object lookupName ( String name ) { } }

implementation: final Node childNode = getNode ( ) . getChild ( name ) ; if ( childNode == null ) { return null ; } else { return childNode . get ( CACHE_NODE_MAP_KEY ) ; }


signature:
public class ActivityContextNamingFacilityCacheData { /** * Retrieves a map of the bindings . Key is the aci name and Value is the activity context handle
 * @ return */
public Map getNameBindings ( ) { } }

implementation: Map result = new HashMap ( ) ; Node childNode = null ; Object name = null ; for ( Object obj : getNode ( ) . getChildren ( ) ) { childNode = ( Node ) obj ; name = childNode . getFqn ( ) . getLastElement ( ) ; result . put ( name , childNode . get ( CACHE_NODE_MAP_KEY ) ) ; } return result ;


signature:
public class MobicentsServiceMBeanSupport { /** * ( non - Javadoc )
 * @ see org . jboss . system . ServiceMBeanSupport # preRegister ( javax . management . MBeanServer , javax . management . ObjectName ) */
public ObjectName preRegister ( MBeanServer mbs , ObjectName oname ) throws Exception { } }

implementation: this . objectName = oname ; this . server = mbs ; return oname ;


signature:
public class NextSbbEntityFinder { /** * Retrieves the next sbb entity to handle the event .
 * @ param ac
 * @ param sleeEvent
 * @ param sbbEntitiesThatHandledCurrentEvent
 * @ return Result that indicates the next sbb entity to handle the event ,
 * note that sbb entities that are not entitled to * deliver * the
 * event ( service id is set or the event is not defined in sbb
 * descriptor ) will only be returned in case event is activity end
 * event . */
public Result next ( ActivityContext ac , EventContext sleeEvent , Set < SbbEntityID > sbbEntitiesThatHandledCurrentEvent , SleeContainer sleeContainer ) { } }

implementation:
SbbEntityID sbbEntityId = null ; SbbEntity sbbEntity = null ; EventEntryDescriptor mEventEntry = null ; // get the highest priority sbb from sbb entities attached to AC
for ( Iterator < SbbEntityID > iter = ac . getSortedSbbAttachmentSet ( sbbEntitiesThatHandledCurrentEvent ) . iterator ( ) ; iter . hasNext ( ) ; ) { sbbEntityId = iter . next ( ) ; sbbEntity = sleeContainer . getSbbEntityFactory ( ) . getSbbEntity ( sbbEntityId , true ) ; if ( sbbEntity == null ) { // ignore , sbb entity has been removed
continue ; } if ( eventRouterConfiguration . isConfirmSbbEntityAttachement ( ) && ! sbbEntity . isAttached ( ac . getActivityContextHandle ( ) ) ) { // detached by a concurrent tx , see Issue 2313
continue ; } if ( sleeEvent . getService ( ) != null && ! sleeEvent . getService ( ) . equals ( sbbEntityId . getServiceID ( ) ) ) { if ( ! sleeEvent . isActivityEndEvent ( ) ) { continue ; } else { return new Result ( sbbEntity , false ) ; } } // check event is allowed to be handled by the sbb
mEventEntry = sbbEntity . getSbbComponent ( ) . getDescriptor ( ) . getEventEntries ( ) . get ( sleeEvent . getEventTypeId ( ) ) ; if ( mEventEntry != null && mEventEntry . isReceived ( ) ) { return new Result ( sbbEntity , true ) ; } else { if ( ! sleeEvent . isActivityEndEvent ( ) ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Event is not received by sbb descriptor of entity " + sbbEntityId + ", will not deliver event to sbb entity ..." ) ; } continue ; } else { return new Result ( sbbEntity , false ) ; } } } return null ;


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

implementation: switch ( level ) { case LEVEL_OFF : return OFF ; case LEVEL_SEVERE : return SEVERE ; case LEVEL_WARNING : return WARNING ; case LEVEL_INFO : return INFO ; case LEVEL_CONFIG : return CONFIG ; case LEVEL_FINE : return FINE ; case LEVEL_FINER : return FINER ; case LEVEL_FINEST : return FINEST ; default : throw new IllegalArgumentException ( "Invalid level: " + level ) ; }


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

implementation: if ( level == null ) throw new NullPointerException ( "level is null" ) ; if ( level . equalsIgnoreCase ( OFF_STRING ) ) return OFF ; if ( level . equalsIgnoreCase ( SEVERE_STRING ) ) return SEVERE ; if ( level . equalsIgnoreCase ( WARNING_STRING ) ) return WARNING ; if ( level . equalsIgnoreCase ( INFO_STRING ) ) return INFO ; if ( level . equalsIgnoreCase ( CONFIG_STRING ) ) return CONFIG ; if ( level . equalsIgnoreCase ( FINE_STRING ) ) return FINE ; if ( level . equalsIgnoreCase ( FINER_STRING ) ) return FINER ; if ( level . equalsIgnoreCase ( FINEST_STRING ) ) return FINEST ; throw new IllegalArgumentException ( "Invalid level: " + level ) ;


signature:
public class TraceLevel { /** * Determine if this TraceLevel object represents a level that is higher than some other
 * TraceLevel object . For the purposes of the comparison OFF is considered a higher level
 * than SEVERE , and FINEST is the lowest level .
 * @ param other the < code > TraceLevel < / code > object to compare this with .
 * @ return < code > true < / code > if the level represented by this < code > TraceLevel < / code >
 * object is a higher level than the level represented by the specified
 * < code > TraceLevel < / code > object , < code > false < / code > otherwise .
 * @ throws NullPointerException if < code > other < / code > is < code > null < / code > . */
public boolean isHigherLevel ( TraceLevel other ) throws NullPointerException { } }

implementation: if ( other == null ) throw new NullPointerException ( "other is null" ) ; return this . level < other . level ;


signature:
public class ProfileManagementImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . container . management . ProfileManagement # installProfileSpecification ( org . mobicents . slee . core . component . profile . ProfileSpecificationComponent ) */
public void installProfileSpecification ( ProfileSpecificationComponent component ) throws DeploymentException { } }

implementation:
if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Installing " + component ) ; } try { JndiManagement jndiManagement = sleeContainer . getJndiManagement ( ) ; logger . debug ( "JndiManagement: " + jndiManagement + " for ProfileSpecificationComponent: " + component ) ; jndiManagement . componentInstall ( component ) ; jndiManagement . pushJndiContext ( component ) ; try { this . createJndiSpace ( component ) ; } finally { jndiManagement . popJndiContext ( ) ; } // FIXME : we wont use trace and alarm in 1.0 way wont we ?
ProfileEntityFramework profileEntityFramework = new JPAProfileEntityFramework ( component , configuration , sleeContainer . getTransactionManager ( ) ) ; profileEntityFramework . install ( ) ; sleeProfileClassCodeGenerator . process ( component ) ; profileTableFramework . loadProfileTables ( component ) ; } catch ( DeploymentException de ) { throw de ; } catch ( Throwable t ) { t . printStackTrace ( ) ; throw new SLEEException ( t . getMessage ( ) , t ) ; }


signature:
public class ProfileManagementImpl { /** * ( non - Javadoc )
 * @ see org . mobicents . slee . container . management . ProfileManagement # uninstallProfileSpecification ( org . mobicents . slee . core . component . profile . ProfileSpecificationComponent ) */
public void uninstallProfileSpecification ( ProfileSpecificationComponent component ) throws UnrecognizedProfileSpecificationException { } }

implementation:
Collection < String > profileTableNames = getDeclaredProfileTableNames ( component . getProfileSpecificationID ( ) ) ; for ( String profileTableName : profileTableNames ) { try { this . removeProfileTable ( profileTableName , true ) ; } catch ( Throwable e ) { throw new SLEEException ( e . getMessage ( ) , e ) ; } } // FIXME : For JBoss 7.2.0 . Final :
// we have a problem with org . hibernate . service . UnknownServiceException :
// Unknown service requested [ org . hibernate . event . service . spi . EventListenerRegistry ]
// see https : / / hibernate . atlassian . net / browse / HHH - 8586
// component . getProfileEntityFramework ( ) . uninstall ( ) ;