signature:
public class AllowedMethodsInformation { /** * throw an exception when a method cannot be invoked
 * @ param methodType the method
 * @ param callback the type of invocation that caused it to be disabled */
protected void throwException ( MethodType methodType , CurrentSynchronizationCallback . CallbackType callback ) { } }

implementation: throw EjbLogger . ROOT_LOGGER . cannotCallMethod ( methodType . getLabel ( ) , callback . name ( ) ) ;


signature:
public class SecurityDomainMergingProcessor { /** * Try to obtain the security domain configured in jboss - app . xml at the ear level if available
 * @ param deploymentUnit
 * @ return */
private String getJBossAppSecurityDomain ( final DeploymentUnit deploymentUnit ) { } }

implementation: String securityDomain = null ; DeploymentUnit parent = deploymentUnit . getParent ( ) ; if ( parent != null ) { final EarMetaData jbossAppMetaData = parent . getAttachment ( Attachments . EAR_METADATA ) ; if ( jbossAppMetaData instanceof JBossAppMetaData ) { securityDomain = ( ( JBossAppMetaData ) jbossAppMetaData ) . getSecurityDomain ( ) ; } } return securityDomain ;


signature:
public class WebComponentProcessor { /** * Gets all classes that are eligible for injection etc
 * @ param metaData
 * @ return */
private Set < String > getAllComponentClasses ( DeploymentUnit deploymentUnit , CompositeIndex index , WarMetaData metaData , TldsMetaData tldsMetaData ) { } }

implementation: final Set < String > classes = new HashSet < String > ( ) ; getAllComponentClasses ( metaData . getMergedJBossWebMetaData ( ) , classes ) ; if ( tldsMetaData == null ) return classes ; if ( tldsMetaData . getSharedTlds ( deploymentUnit ) != null ) for ( TldMetaData tldMetaData : tldsMetaData . getSharedTlds ( deploymentUnit ) ) { getAllComponentClasses ( tldMetaData , classes ) ; } if ( tldsMetaData . getTlds ( ) != null ) for ( Map . Entry < String , TldMetaData > tldMetaData : tldsMetaData . getTlds ( ) . entrySet ( ) ) { getAllComponentClasses ( tldMetaData . getValue ( ) , classes ) ; } getAllAsyncListenerClasses ( index , classes ) ; return classes ;


signature:
public class TimerServiceImpl { /** * { @ inheritDoc } */
@ Override public Timer createCalendarTimer ( ScheduleExpression schedule ) throws IllegalArgumentException , IllegalStateException , EJBException { } }

implementation: return this . createCalendarTimer ( schedule , null ) ;


signature:
public class TimerServiceImpl { /** * { @ inheritDoc } */
@ Override public Timer createCalendarTimer ( ScheduleExpression schedule , TimerConfig timerConfig ) throws IllegalArgumentException , IllegalStateException , EJBException { } }

implementation: assertTimerServiceState ( ) ; Serializable info = timerConfig == null ? null : timerConfig . getInfo ( ) ; boolean persistent = timerConfig == null || timerConfig . isPersistent ( ) ; return this . createCalendarTimer ( schedule , info , persistent , null ) ;


signature:
public class TimerServiceImpl { /** * { @ inheritDoc } */
@ Override public Timer createIntervalTimer ( Date initialExpiration , long intervalDuration , TimerConfig timerConfig ) throws IllegalArgumentException , IllegalStateException , EJBException { } }

implementation: assertTimerServiceState ( ) ; if ( initialExpiration == null ) { throw EJB3_TIMER_LOGGER . initialExpirationIsNullCreatingTimer ( ) ; } if ( initialExpiration . getTime ( ) < 0 ) { throw EJB3_TIMER_LOGGER . invalidInitialExpiration ( "initialExpiration.getTime()" ) ; } if ( intervalDuration < 0 ) { throw EJB3_TIMER_LOGGER . invalidInitialExpiration ( "intervalDuration" ) ; } return this . createTimer ( initialExpiration , intervalDuration , timerConfig . getInfo ( ) , timerConfig . isPersistent ( ) ) ;


signature:
public class TimerServiceImpl { /** * { @ inheritDoc } */
@ Override public Timer createIntervalTimer ( long initialDuration , long intervalDuration , TimerConfig timerConfig ) throws IllegalArgumentException , IllegalStateException , EJBException { } }

implementation: assertTimerServiceState ( ) ; if ( initialDuration < 0 ) { throw EJB3_TIMER_LOGGER . invalidInitialExpiration ( "intervalDuration" ) ; } if ( intervalDuration < 0 ) { throw EJB3_TIMER_LOGGER . invalidInitialExpiration ( "intervalDuration" ) ; } return this . createIntervalTimer ( new Date ( System . currentTimeMillis ( ) + initialDuration ) , intervalDuration , timerConfig ) ;


signature:
public class TimerServiceImpl { /** * { @ inheritDoc } */
@ Override public Timer createSingleActionTimer ( Date expiration , TimerConfig timerConfig ) throws IllegalArgumentException , IllegalStateException , EJBException { } }

implementation: assertTimerServiceState ( ) ; if ( expiration == null ) { throw EJB3_TIMER_LOGGER . expirationIsNull ( ) ; } if ( expiration . getTime ( ) < 0 ) { throw EJB3_TIMER_LOGGER . invalidExpirationActionTimer ( ) ; } return this . createTimer ( expiration , 0 , timerConfig . getInfo ( ) , timerConfig . isPersistent ( ) ) ;


signature:
public class TimerServiceImpl { /** * { @ inheritDoc } */
@ Override public Timer createSingleActionTimer ( long duration , TimerConfig timerConfig ) throws IllegalArgumentException , IllegalStateException , EJBException { } }

implementation: assertTimerServiceState ( ) ; if ( duration < 0 ) throw EJB3_TIMER_LOGGER . invalidDurationActionTimer ( ) ; return createTimer ( new Date ( System . currentTimeMillis ( ) + duration ) , 0 , timerConfig . getInfo ( ) , timerConfig . isPersistent ( ) ) ;


signature:
public class TimerServiceImpl { /** * { @ inheritDoc } */
@ Override public Timer createTimer ( long duration , Serializable info ) throws IllegalArgumentException , IllegalStateException , EJBException { } }

implementation: assertTimerServiceState ( ) ; if ( duration < 0 ) throw EJB3_TIMER_LOGGER . invalidDurationTimer ( ) ; return createTimer ( new Date ( System . currentTimeMillis ( ) + duration ) , 0 , info , true ) ;


signature:
public class TimerServiceImpl { /** * { @ inheritDoc } */
@ Override public Timer createTimer ( Date expiration , Serializable info ) throws IllegalArgumentException , IllegalStateException , EJBException { } }

implementation: assertTimerServiceState ( ) ; if ( expiration == null ) { throw EJB3_TIMER_LOGGER . expirationDateIsNull ( ) ; } if ( expiration . getTime ( ) < 0 ) { throw EJB3_TIMER_LOGGER . invalidExpirationTimer ( ) ; } return this . createTimer ( expiration , 0 , info , true ) ;


signature:
public class TimerServiceImpl { /** * { @ inheritDoc } */
@ Override public Timer createTimer ( long initialDuration , long intervalDuration , Serializable info ) throws IllegalArgumentException , IllegalStateException , EJBException { } }

implementation: assertTimerServiceState ( ) ; if ( initialDuration < 0 ) { throw EJB3_TIMER_LOGGER . invalidInitialDurationTimer ( ) ; } if ( intervalDuration < 0 ) { throw EJB3_TIMER_LOGGER . invalidIntervalTimer ( ) ; } return this . createTimer ( new Date ( System . currentTimeMillis ( ) + initialDuration ) , intervalDuration , info , true ) ;


signature:
public class TimerServiceImpl { /** * { @ inheritDoc } */
@ Override public Timer createTimer ( Date initialExpiration , long intervalDuration , Serializable info ) throws IllegalArgumentException , IllegalStateException , EJBException { } }

implementation: assertTimerServiceState ( ) ; if ( initialExpiration == null ) { throw EJB3_TIMER_LOGGER . initialExpirationDateIsNull ( ) ; } if ( initialExpiration . getTime ( ) < 0 ) { throw EJB3_TIMER_LOGGER . invalidExpirationTimer ( ) ; } if ( intervalDuration < 0 ) { throw EJB3_TIMER_LOGGER . invalidIntervalDurationTimer ( ) ; } return this . createTimer ( initialExpiration , intervalDuration , info , true ) ;


signature:
public class TimerServiceImpl { /** * { @ inheritDoc } */
@ Override public Collection < Timer > getTimers ( ) throws IllegalStateException , EJBException { } }

implementation:
assertTimerServiceState ( ) ; Object pk = currentPrimaryKey ( ) ; final Set < Timer > activeTimers = new HashSet < Timer > ( ) ; // get all active timers for this timerservice
synchronized ( this . timers ) { for ( final TimerImpl timer : this . timers . values ( ) ) { // Less disruptive way to get WFLY - 8457 fixed .
if ( timer . isActive ( ) || ( ! timer . isActive ( ) && timer . getState ( ) == TimerState . ACTIVE ) ) { if ( timer . getPrimaryKey ( ) == null || timer . getPrimaryKey ( ) . equals ( pk ) ) { activeTimers . add ( timer ) ; } } } } // get all active timers which are persistent , but haven ' t yet been
// persisted ( waiting for tx to complete ) that are in the current transaction
for ( final TimerImpl timer : getWaitingOnTxCompletionTimers ( ) . values ( ) ) { if ( timer . isActive ( ) ) { if ( timer . getPrimaryKey ( ) == null || timer . getPrimaryKey ( ) . equals ( pk ) ) { activeTimers . add ( timer ) ; } } } return activeTimers ;


signature:
public class TimerServiceImpl { /** * { @ inheritDoc } */
@ Override public Collection < Timer > getAllTimers ( ) throws IllegalStateException , EJBException { } }

implementation:
// query the registry
if ( this . timerServiceRegistry != null ) { return this . timerServiceRegistry . getAllActiveTimers ( ) ; } // if we don ' t have the registry ( shouldn ' t really happen ) which stores the timer services applicable for the EJB module to which
// this timer service belongs , then let ' s at least return the active timers that are applicable only for this timer service
return this . getTimers ( ) ;


signature:
public class TimerServiceImpl { /** * Create a { @ link javax . ejb . Timer }
 * @ param initialExpiration The { @ link java . util . Date } at which the first timeout should occur .
 * < p > If the date is in the past , then the timeout is triggered immediately
 * when the timer moves to { @ link TimerState # ACTIVE } < / p >
 * @ param intervalDuration The interval ( in milliseconds ) between consecutive timeouts for the newly created timer .
 * < p > Cannot be a negative value . A value of 0 indicates a single timeout action < / p >
 * @ param info { @ link java . io . Serializable } info that will be made available through the newly created timer ' s { @ link javax . ejb . Timer # getInfo ( ) } method
 * @ param persistent True if the newly created timer has to be persistent
 * @ return Returns the newly created timer
 * @ throws IllegalArgumentException If < code > initialExpiration < / code > is null or < code > intervalDuration < / code > is negative
 * @ throws IllegalStateException If this method was invoked during a lifecycle callback on the EJB */
private Timer createTimer ( Date initialExpiration , long intervalDuration , Serializable info , boolean persistent ) { } }

implementation:
if ( this . isLifecycleCallbackInvocation ( ) && ! this . isSingletonBeanInvocation ( ) ) { throw EJB3_TIMER_LOGGER . failToCreateTimerDoLifecycle ( ) ; } if ( initialExpiration == null ) { throw EJB3_TIMER_LOGGER . initialExpirationIsNull ( ) ; } if ( intervalDuration < 0 ) { throw EJB3_TIMER_LOGGER . invalidIntervalDuration ( ) ; } // create an id for the new timer instance
UUID uuid = UUID . randomUUID ( ) ; // create the timer
TimerImpl timer = TimerImpl . builder ( ) . setNewTimer ( true ) . setId ( uuid . toString ( ) ) . setInitialDate ( initialExpiration ) . setRepeatInterval ( intervalDuration ) . setInfo ( info ) . setPersistent ( persistent ) . setPrimaryKey ( currentPrimaryKey ( ) ) . setTimerState ( TimerState . CREATED ) . setTimedObjectId ( getInvoker ( ) . getTimedObjectId ( ) ) . build ( this ) ; // now " start " the timer . This involves , moving the timer to an ACTIVE state
// and scheduling the timer task
this . persistTimer ( timer , true ) ; this . startTimer ( timer ) ; // return the newly created timer
return timer ;


signature:
public class TimerServiceImpl { /** * Creates a calendar based { @ link javax . ejb . Timer }
 * @ param schedule The { @ link javax . ejb . ScheduleExpression } which will be used for creating scheduled timer tasks
 * for a calendar based timer
 * @ param info { @ link java . io . Serializable } info that will be made available through the newly created timer ' s { @ link javax . ejb . Timer # getInfo ( ) } method
 * @ param persistent True if the newly created timer has to be persistent
 * @ return Returns the newly created timer
 * @ throws IllegalArgumentException If the passed < code > schedule < / code > is null
 * @ throws IllegalStateException If this method was invoked during a lifecycle callback on the EJB */
private TimerImpl createCalendarTimer ( ScheduleExpression schedule , Serializable info , boolean persistent , Method timeoutMethod ) { } }

implementation:
if ( this . isLifecycleCallbackInvocation ( ) && ! this . isSingletonBeanInvocation ( ) ) { throw EJB3_TIMER_LOGGER . failToCreateTimerDoLifecycle ( ) ; } if ( schedule == null ) { throw EJB3_TIMER_LOGGER . scheduleIsNull ( ) ; } // generate an id for the timer
UUID uuid = UUID . randomUUID ( ) ; // create the timer
TimerImpl timer = CalendarTimer . builder ( ) . setAutoTimer ( timeoutMethod != null ) . setScheduleExprSecond ( schedule . getSecond ( ) ) . setScheduleExprMinute ( schedule . getMinute ( ) ) . setScheduleExprHour ( schedule . getHour ( ) ) . setScheduleExprDayOfWeek ( schedule . getDayOfWeek ( ) ) . setScheduleExprDayOfMonth ( schedule . getDayOfMonth ( ) ) . setScheduleExprMonth ( schedule . getMonth ( ) ) . setScheduleExprYear ( schedule . getYear ( ) ) . setScheduleExprStartDate ( schedule . getStart ( ) ) . setScheduleExprEndDate ( schedule . getEnd ( ) ) . setScheduleExprTimezone ( schedule . getTimezone ( ) ) . setTimeoutMethod ( timeoutMethod ) . setTimerState ( TimerState . CREATED ) . setId ( uuid . toString ( ) ) . setPersistent ( persistent ) . setPrimaryKey ( currentPrimaryKey ( ) ) . setTimedObjectId ( getInvoker ( ) . getTimedObjectId ( ) ) . setInfo ( info ) . setNewTimer ( true ) . build ( this ) ; this . persistTimer ( timer , true ) ; // now " start " the timer . This involves , moving the timer to an ACTIVE state
// and scheduling the timer task
this . startTimer ( timer ) ; // return the timer
return timer ;


signature:
public class TimerServiceImpl { /** * Returns the { @ link javax . ejb . Timer } corresponding to the passed { @ link javax . ejb . TimerHandle }
 * @ param handle The { @ link javax . ejb . TimerHandle } for which the { @ link javax . ejb . Timer } is being looked for */
public TimerImpl getTimer ( TimerHandle handle ) { } }

implementation: TimerHandleImpl timerHandle = ( TimerHandleImpl ) handle ; TimerImpl timer = timers . get ( timerHandle . getId ( ) ) ; if ( timer != null ) { return timer ; } return getWaitingOnTxCompletionTimers ( ) . get ( timerHandle . getId ( ) ) ;


signature:
public class TimerServiceImpl { /** * Persists the passed < code > timer < / code > .
 * If the passed timer is null or is non - persistent ( i . e . { @ link javax . ejb . Timer # isPersistent ( ) } returns false ) ,
 * then this method acts as a no - op
 * @ param timer */
public void persistTimer ( final TimerImpl timer , boolean newTimer ) { } }

implementation: if ( timer == null ) { return ; } if ( timer . isTimerPersistent ( ) ) { try { if ( timerPersistence . getOptionalValue ( ) == null ) { EJB3_TIMER_LOGGER . timerPersistenceNotEnable ( ) ; return ; } final ContextTransactionManager transactionManager = ContextTransactionManager . getInstance ( ) ; Transaction clientTX = transactionManager . getTransaction ( ) ; if ( newTimer || timer . isCanceled ( ) ) { if ( clientTX == null ) { transactionManager . begin ( ) ; } try { if ( newTimer ) timerPersistence . getValue ( ) . addTimer ( timer ) ; else timerPersistence . getValue ( ) . persistTimer ( timer ) ; if ( clientTX == null ) transactionManager . commit ( ) ; } catch ( Exception e ) { if ( clientTX == null ) { try { transactionManager . rollback ( ) ; } catch ( Exception ee ) { EjbLogger . EJB3_TIMER_LOGGER . timerUpdateFailedAndRollbackNotPossible ( ee ) ; } } throw e ; } } else { new TaskPostPersist ( timer ) . persistTimer ( ) ; } } catch ( Throwable t ) { this . setRollbackOnly ( ) ; throw new RuntimeException ( t ) ; } }


signature:
public class TimerServiceImpl { /** * Suspends any currently scheduled tasks for { @ link javax . ejb . Timer } s
 * Note that , suspend does < b > not < / b > cancel the { @ link javax . ejb . Timer } . Instead ,
 * it just cancels the < b > next scheduled timeout < / b > . So once the { @ link javax . ejb . Timer }
 * is restored ( whenever that happens ) , the { @ link javax . ejb . Timer } will continue to
 * timeout at appropriate times . */
public void suspendTimers ( ) { } }

implementation:
// get all active timers ( persistent / non - persistent inclusive )
Collection < Timer > timers = this . getTimers ( ) ; for ( Timer timer : timers ) { if ( ! ( timer instanceof TimerImpl ) ) { continue ; } // suspend the timer
( ( TimerImpl ) timer ) . suspend ( ) ; }


signature:
public class TimerServiceImpl { /** * Restores persisted timers , corresponding to this timerservice , which are eligible for any new timeouts .
 * This includes timers whose { @ link TimerState } is < b > neither < / b > of the following :
 * < ul >
 * < li > { @ link TimerState # CANCELED } < / li >
 * < li > { @ link TimerState # EXPIRED } < / li >
 * < / ul >
 * All such restored timers will be schedule for their next timeouts .
 * @ param autoTimers */
public void restoreTimers ( final List < ScheduleTimer > autoTimers ) { } }

implementation:
// get the persisted timers which are considered active
List < TimerImpl > restorableTimers = this . getActivePersistentTimers ( ) ; // timers are removed from the list as they are loaded
final List < ScheduleTimer > newAutoTimers = new LinkedList < ScheduleTimer > ( autoTimers ) ; if ( EJB3_TIMER_LOGGER . isDebugEnabled ( ) ) { EJB3_TIMER_LOGGER . debug ( "Found " + restorableTimers . size ( ) + " active persistentTimers for timedObjectId: " + getInvoker ( ) . getTimedObjectId ( ) ) ; } // now " start " each of the restorable timer . This involves , moving the timer to an ACTIVE state
// and scheduling the timer task
for ( final TimerImpl activeTimer : restorableTimers ) { if ( activeTimer . isAutoTimer ( ) ) { CalendarTimer calendarTimer = ( CalendarTimer ) activeTimer ; boolean found = false ; // so we know we have an auto timer . We need to try and match it up with the auto timers .
ListIterator < ScheduleTimer > it = newAutoTimers . listIterator ( ) ; while ( it . hasNext ( ) ) { ScheduleTimer timer = it . next ( ) ; final String methodName = timer . getMethod ( ) . getName ( ) ; final String [ ] params = new String [ timer . getMethod ( ) . getParameterTypes ( ) . length ] ; for ( int i = 0 ; i < timer . getMethod ( ) . getParameterTypes ( ) . length ; ++ i ) { params [ i ] = timer . getMethod ( ) . getParameterTypes ( ) [ i ] . getName ( ) ; } if ( doesTimeoutMethodMatch ( calendarTimer . getTimeoutMethod ( ) , methodName , params ) ) { // the timers have the same method .
// now lets make sure the schedule is the same
// and the timer does not change the persistence
if ( this . doesScheduleMatch ( calendarTimer . getScheduleExpression ( ) , timer . getScheduleExpression ( ) ) && timer . getTimerConfig ( ) . isPersistent ( ) ) { it . remove ( ) ; found = true ; break ; } } } if ( ! found ) { activeTimer . setTimerState ( TimerState . CANCELED , null ) ; } else { // ensure state switch to active if was TIMEOUT in the DB
// if the persistence is shared it must be ensured to not update
// timers of other nodes in the cluster
activeTimer . setTimerState ( TimerState . ACTIVE , null ) ; calendarTimer . handleRestorationCalculation ( ) ; } try { this . persistTimer ( activeTimer , false ) ; } catch ( Exception e ) { EJB3_TIMER_LOGGER . failedToPersistTimerOnStartup ( activeTimer , e ) ; } if ( found ) { startTimer ( activeTimer ) ; EJB3_TIMER_LOGGER . debugv ( "Started existing auto timer: {0}" , activeTimer ) ; } } else if ( ! ineligibleTimerStates . contains ( activeTimer . getState ( ) ) ) { startTimer ( activeTimer ) ; } EJB3_TIMER_LOGGER . debugv ( "Started timer: {0}" , activeTimer ) ; } for ( ScheduleTimer timer : newAutoTimers ) { this . loadAutoTimer ( timer . getScheduleExpression ( ) , timer . getTimerConfig ( ) , timer . getMethod ( ) ) ; }


signature:
public class TimerServiceImpl { /** * Registers a timer with a transaction ( if any in progress ) and then moves
 * the timer to an active state , so that it becomes eligible for timeouts */
protected void startTimer ( TimerImpl timer ) { } }

implementation:
// if there ' s no transaction , then trigger a schedule immediately .
// Else , the timer will be scheduled on tx synchronization callback
if ( ! transactionActive ( ) ) { this . timers . put ( timer . getId ( ) , timer ) ; // set active if the timer is started if it was read
// from persistence as current running to ensure correct schedule here
timer . setTimerState ( TimerState . ACTIVE , null ) ; // create and schedule a timer task
this . registerTimerResource ( timer . getId ( ) ) ; timer . scheduleTimeout ( true ) ; } else { addWaitingOnTxCompletionTimer ( timer ) ; registerSynchronization ( new TimerCreationTransactionSynchronization ( timer ) ) ; }


signature:
public class TimerServiceImpl { /** * Returns true if the { @ link CurrentInvocationContext } represents a lifecycle
 * callback invocation . Else returns false .
 * This method internally relies on { @ link CurrentInvocationContext # get ( ) } to obtain
 * the current invocation context .
 * < ul >
 * < li > If the context is available then it looks for the method that was invoked .
 * The absence of a method indicates a lifecycle callback . < / li >
 * < li > If the context is < i > not < / i > available , then this method returns false ( i . e .
 * it doesn ' t consider the current invocation as a lifecycle callback ) . This is
 * for convenience , to allow the invocation of { @ link javax . ejb . TimerService } methods
 * in the absence of { @ link CurrentInvocationContext } < / li >
 * < / ul >
 * @ return */
protected boolean isLifecycleCallbackInvocation ( ) { } }

implementation:
final InterceptorContext currentInvocationContext = CurrentInvocationContext . get ( ) ; if ( currentInvocationContext == null ) { return false ; } // If the method in current invocation context is null ,
// then it represents a lifecycle callback invocation
Method invokedMethod = currentInvocationContext . getMethod ( ) ; if ( invokedMethod == null ) { // it ' s a lifecycle callback
return true ; } // not a lifecycle callback
return false ;


signature:
public class TimerServiceImpl { /** * Creates and schedules a { @ link TimerTask } for the next timeout of the passed < code > timer < / code > */
protected void scheduleTimeout ( TimerImpl timer , boolean newTimer ) { } }

implementation:
synchronized ( scheduledTimerFutures ) { if ( ! newTimer && ! scheduledTimerFutures . containsKey ( timer . getId ( ) ) ) { // this timer has been cancelled by another thread . We just return
return ; } Date nextExpiration = timer . getNextExpiration ( ) ; if ( nextExpiration == null ) { EJB3_TIMER_LOGGER . nextExpirationIsNull ( timer ) ; return ; } // create the timer task
final TimerTask < ? > timerTask = timer . getTimerTask ( ) ; // find out how long is it away from now
long delay = nextExpiration . getTime ( ) - System . currentTimeMillis ( ) ; // if in past , then trigger immediately
if ( delay < 0 ) { delay = 0 ; } long intervalDuration = timer . getInterval ( ) ; final Task task = new Task ( timerTask , ejbComponentInjectedValue . getValue ( ) . getControlPoint ( ) ) ; if ( intervalDuration > 0 ) { EJB3_TIMER_LOGGER . debugv ( "Scheduling timer {0} at fixed rate, starting at {1} milliseconds from now with repeated interval={2}" , timer , delay , intervalDuration ) ; // schedule the task
this . timerInjectedValue . getValue ( ) . scheduleAtFixedRate ( task , delay , intervalDuration ) ; // maintain it in timerservice for future use ( like cancellation )
this . scheduledTimerFutures . put ( timer . getId ( ) , task ) ; } else { EJB3_TIMER_LOGGER . debugv ( "Scheduling a single action timer {0} starting at {1} milliseconds from now" , timer , delay ) ; // schedule the task
this . timerInjectedValue . getValue ( ) . schedule ( task , delay ) ; // maintain it in timerservice for future use ( like cancellation )
this . scheduledTimerFutures . put ( timer . getId ( ) , task ) ; } }


signature:
public class TimerServiceImpl { /** * Cancels any scheduled { @ link java . util . concurrent . Future } corresponding to the passed < code > timer < / code >
 * @ param timer */
protected void cancelTimeout ( final TimerImpl timer ) { } }

implementation: synchronized ( this . scheduledTimerFutures ) { java . util . TimerTask timerTask = this . scheduledTimerFutures . remove ( timer . getId ( ) ) ; if ( timerTask != null ) { timerTask . cancel ( ) ; } }


signature:
public class TimerServiceImpl { /** * Returns an unmodifiable view of timers in the current transaction that are waiting for the transaction
 * to finish */
private Map < String , TimerImpl > getWaitingOnTxCompletionTimers ( ) { } }

implementation: Map < String , TimerImpl > timers = null ; if ( getTransaction ( ) != null ) { timers = ( Map < String , TimerImpl > ) tsr . getResource ( waitingOnTxCompletionKey ) ; } return timers == null ? Collections . < String , TimerImpl > emptyMap ( ) : timers ;


signature:
public class TimerServiceImpl { /** * Marks the transaction for rollback
 * NOTE : This method will soon be removed , once this timer service
 * implementation becomes " managed " */
private void setRollbackOnly ( ) { } }

implementation: try { Transaction tx = ContextTransactionManager . getInstance ( ) . getTransaction ( ) ; if ( tx != null ) { tx . setRollbackOnly ( ) ; } } catch ( IllegalStateException ise ) { EJB3_TIMER_LOGGER . ignoringException ( ise ) ; } catch ( SystemException se ) { EJB3_TIMER_LOGGER . ignoringException ( se ) ; }


signature:
public class TimerServiceImpl { /** * Check if a persistent timer is already executed from a different instance
 * or should be executed .
 * For non - persistent timer it always return < code > true < / code > .
 * @ param timer the timer which should be checked
 * @ return < code > true < / code > if the timer is not persistent or the persistent timer should start */
public boolean shouldRun ( TimerImpl timer ) { } }

implementation:
// check peristent without further check to prevent from Exception ( WFLY - 6152)
return ! timer . isTimerPersistent ( ) || timerPersistence . getValue ( ) . shouldRun ( timer , ContextTransactionManager . getInstance ( ) ) ;


signature:
public class ImplicitLocalViewProcessor { /** * Returns true if the passed < code > beanClass < / code > is eligible for implicit no - interface view . Else returns false .
 * EJB3.1 spec , section 4.9.8 states the rules for an implicit no - interface view on a bean class .
 * If the " implements " clause of the bean class is empty then the bean is considered to be exposing a no - interface view .
 * During this implements clause check , the { @ link java . io . Serializable } or { @ link java . io . Externalizable } or
 * any class from javax . ejb . * packages are excluded .
 * @ param beanClass The bean class .
 * @ return */
private boolean exposesNoInterfaceView ( Class < ? > beanClass ) { } }

implementation:
Class < ? > [ ] interfaces = beanClass . getInterfaces ( ) ; if ( interfaces . length == 0 ) { return true ; } // As per section 4.9.8 ( bullet 1.3 ) of EJB3.1 spec
// java . io . Serializable ; java . io . Externalizable ; any of the interfaces defined by the javax . ejb
// are excluded from interface check
List < Class < ? > > implementedInterfaces = new ArrayList < Class < ? > > ( Arrays . asList ( interfaces ) ) ; List < Class < ? > > filteredInterfaces = this . filterInterfaces ( implementedInterfaces ) ; // Now that we have removed the interfaces that should be excluded from the check ,
// if the filtered interfaces collection is empty then this bean can be considered for no - interface view
return filteredInterfaces . isEmpty ( ) ;


signature:
public class ImplicitLocalViewProcessor { /** * Returns the default local view class of the { @ link Class beanClass } , if one is present .
 * EJB3.1 spec , section 4.9.7 specifies the rules for a default local view of a bean . If the bean implements
 * just one interface , then that interface is returned as the default local view by this method .
 * If no such , interface is found , then this method returns null .
 * @ param beanClass The bean class
 * @ return */
private Class < ? > getDefaultLocalView ( Class < ? > beanClass ) { } }

implementation: Class < ? > [ ] interfaces = beanClass . getInterfaces ( ) ; if ( interfaces . length == 0 ) { return null ; } List < Class < ? > > implementedInterfaces = new ArrayList < Class < ? > > ( Arrays . asList ( interfaces ) ) ; List < Class < ? > > filteredInterfaces = this . filterInterfaces ( implementedInterfaces ) ; if ( filteredInterfaces . isEmpty ( ) || filteredInterfaces . size ( ) > 1 ) { return null ; } return filteredInterfaces . get ( 0 ) ;


signature:
public class ImplicitLocalViewProcessor { /** * Returns a filtered list for the passed < code > interfaces < / code > list , excluding the
 * { @ link java . io . Serializable } , { @ link java . io . Externalizable } and any interfaces belonging to < code > javax . ejb < / code >
 * package .
 * @ param interfaces The list of interfaces
 * @ return */
private List < Class < ? > > filterInterfaces ( List < Class < ? > > interfaces ) { } }

implementation: if ( interfaces == null ) { return null ; } List < Class < ? > > filteredInterfaces = new ArrayList < Class < ? > > ( ) ; for ( Class < ? > intf : interfaces ) { if ( intf . equals ( java . io . Serializable . class ) || intf . equals ( java . io . Externalizable . class ) || intf . getName ( ) . startsWith ( "javax.ejb." ) ) { continue ; } filteredInterfaces . add ( intf ) ; } return filteredInterfaces ;


signature:
public class TransportConfigOperationHandlers { /** * Process the acceptor information .
 * @ param context the operation context
 * @ param configuration the ActiveMQ configuration
 * @ param params the detyped operation parameters
 * @ param bindings the referenced socket bindings
 * @ throws OperationFailedException */
static void processAcceptors ( final OperationContext context , final Configuration configuration , final ModelNode params , final Set < String > bindings ) throws OperationFailedException { } }

implementation:
final Map < String , TransportConfiguration > acceptors = new HashMap < > ( ) ; if ( params . hasDefined ( ACCEPTOR ) ) { for ( final Property property : params . get ( ACCEPTOR ) . asPropertyList ( ) ) { final String acceptorName = property . getName ( ) ; final ModelNode config = property . getValue ( ) ; final Map < String , Object > parameters = getParameters ( context , config , ACCEPTOR_KEYS_MAP ) ; final Map < String , Object > extraParameters = getExtraParameters ( TransportConstants . ALLOWABLE_ACCEPTOR_KEYS , parameters ) ; final String clazz = config . get ( FACTORY_CLASS . getName ( ) ) . asString ( ) ; ModelNode socketBinding = GenericTransportDefinition . SOCKET_BINDING . resolveModelAttribute ( context , config ) ; if ( socketBinding . isDefined ( ) ) { bindings . add ( socketBinding . asString ( ) ) ; // uses the parameters to pass the socket binding name that will be read in ActiveMQServerService . start ( )
parameters . put ( GenericTransportDefinition . SOCKET_BINDING . getName ( ) , socketBinding . asString ( ) ) ; } acceptors . put ( acceptorName , new TransportConfiguration ( clazz , parameters , acceptorName , extraParameters ) ) ; } } if ( params . hasDefined ( REMOTE_ACCEPTOR ) ) { for ( final Property property : params . get ( REMOTE_ACCEPTOR ) . asPropertyList ( ) ) { final String acceptorName = property . getName ( ) ; final ModelNode config = property . getValue ( ) ; final Map < String , Object > parameters = getParameters ( context , config , ACCEPTOR_KEYS_MAP ) ; final Map < String , Object > extraParameters = getExtraParameters ( TransportConstants . ALLOWABLE_ACCEPTOR_KEYS , parameters ) ; final String binding = config . get ( RemoteTransportDefinition . SOCKET_BINDING . getName ( ) ) . asString ( ) ; bindings . add ( binding ) ; // uses the parameters to pass the socket binding name that will be read in ActiveMQServerService . start ( )
parameters . put ( RemoteTransportDefinition . SOCKET_BINDING . getName ( ) , binding ) ; acceptors . put ( acceptorName , new TransportConfiguration ( NettyAcceptorFactory . class . getName ( ) , parameters , acceptorName , extraParameters ) ) ; } } if ( params . hasDefined ( IN_VM_ACCEPTOR ) ) { for ( final Property property : params . get ( IN_VM_ACCEPTOR ) . asPropertyList ( ) ) { final String acceptorName = property . getName ( ) ; final ModelNode config = property . getValue ( ) ; final Map < String , Object > parameters = getParameters ( context , config , ACCEPTOR_KEYS_MAP ) ; final Map < String , Object > extraParameters = getExtraParameters ( IN_VM_ALLOWABLE_KEYS , parameters ) ; parameters . put ( SERVER_ID_PROP_NAME , InVMTransportDefinition . SERVER_ID . resolveModelAttribute ( context , config ) . asInt ( ) ) ; acceptors . put ( acceptorName , new TransportConfiguration ( InVMAcceptorFactory . class . getName ( ) , parameters , acceptorName , extraParameters ) ) ; } } if ( params . hasDefined ( HTTP_ACCEPTOR ) ) { for ( final Property property : params . get ( HTTP_ACCEPTOR ) . asPropertyList ( ) ) { final String acceptorName = property . getName ( ) ; final ModelNode config = property . getValue ( ) ; final Map < String , Object > parameters = getParameters ( context , config , ACCEPTOR_KEYS_MAP ) ; final Map < String , Object > extraParameters = getExtraParameters ( TransportConstants . ALLOWABLE_ACCEPTOR_KEYS , parameters ) ; parameters . put ( TransportConstants . HTTP_UPGRADE_ENABLED_PROP_NAME , true ) ; acceptors . put ( acceptorName , new TransportConfiguration ( NettyAcceptorFactory . class . getName ( ) , parameters , acceptorName , extraParameters ) ) ; } } configuration . setAcceptorConfigurations ( new HashSet < > ( acceptors . values ( ) ) ) ;


signature:
public class TransportConfigOperationHandlers { /** * Extract extra parameters from the map of parameters .
 * @ param allowedKeys : the keys for allowed parameters .
 * @ param parameters all the parameters ( allowed and extra ) .
 * @ return a Map of extra parameters ( those that are not allowed ) . */
private static Map < String , Object > getExtraParameters ( final Set < String > allowedKeys , final Map < String , Object > parameters ) { } }

implementation: Map < String , Object > extraParameters = new HashMap < > ( ) ; for ( Map . Entry < String , Object > parameter : parameters . entrySet ( ) ) { if ( ! allowedKeys . contains ( parameter . getKey ( ) ) ) { extraParameters . put ( parameter . getKey ( ) , parameter . getValue ( ) ) ; } } for ( String extraParam : extraParameters . keySet ( ) ) { parameters . remove ( extraParam ) ; } return extraParameters ;


signature:
public class TransportConfigOperationHandlers { /** * Get the parameters .
 * @ param context the operation context
 * @ param config the transport configuration
 * @ param mapping Mapping betwen WildFly parameters ( keys ) and Artemis constants ( values )
 * @ return the extracted parameters
 * @ throws OperationFailedException if an expression can not be resolved */
public static Map < String , Object > getParameters ( final OperationContext context , final ModelNode config , final Map < String , String > mapping ) throws OperationFailedException { } }

implementation: Map < String , String > fromModel = CommonAttributes . PARAMS . unwrap ( context , config ) ; Map < String , Object > parameters = new HashMap < > ( ) ; for ( Map . Entry < String , String > entry : fromModel . entrySet ( ) ) { parameters . put ( mapping . getOrDefault ( entry . getKey ( ) , entry . getKey ( ) ) , entry . getValue ( ) ) ; } return parameters ;


signature:
public class TransportConfigOperationHandlers { /** * Process the connector information .
 * @ param context the operation context
 * @ param configuration the ActiveMQ configuration
 * @ param params the detyped operation parameters
 * @ param bindings the referenced socket bindings
 * @ throws OperationFailedException */
static Map < String , TransportConfiguration > processConnectors ( final OperationContext context , final String configServerName , final ModelNode params , final Set < String > bindings ) throws OperationFailedException { } }

implementation:
final Map < String , TransportConfiguration > connectors = new HashMap < String , TransportConfiguration > ( ) ; if ( params . hasDefined ( CONNECTOR ) ) { for ( final Property property : params . get ( CONNECTOR ) . asPropertyList ( ) ) { final String connectorName = property . getName ( ) ; final ModelNode config = property . getValue ( ) ; final Map < String , Object > parameters = getParameters ( context , config , CONNECTORS_KEYS_MAP ) ; final Map < String , Object > extraParameters = getExtraParameters ( TransportConstants . ALLOWABLE_CONNECTOR_KEYS , parameters ) ; ModelNode socketBinding = GenericTransportDefinition . SOCKET_BINDING . resolveModelAttribute ( context , config ) ; if ( socketBinding . isDefined ( ) ) { bindings . add ( socketBinding . asString ( ) ) ; // uses the parameters to pass the socket binding name that will be read in ActiveMQServerService . start ( )
parameters . put ( GenericTransportDefinition . SOCKET_BINDING . getName ( ) , socketBinding . asString ( ) ) ; } final String clazz = FACTORY_CLASS . resolveModelAttribute ( context , config ) . asString ( ) ; connectors . put ( connectorName , new TransportConfiguration ( clazz , parameters , connectorName , extraParameters ) ) ; } } if ( params . hasDefined ( REMOTE_CONNECTOR ) ) { for ( final Property property : params . get ( REMOTE_CONNECTOR ) . asPropertyList ( ) ) { final String connectorName = property . getName ( ) ; final ModelNode config = property . getValue ( ) ; final Map < String , Object > parameters = getParameters ( context , config , CONNECTORS_KEYS_MAP ) ; final Map < String , Object > extraParameters = getExtraParameters ( TransportConstants . ALLOWABLE_CONNECTOR_KEYS , parameters ) ; final String binding = config . get ( RemoteTransportDefinition . SOCKET_BINDING . getName ( ) ) . asString ( ) ; bindings . add ( binding ) ; // uses the parameters to pass the socket binding name that will be read in ActiveMQServerService . start ( )
parameters . put ( RemoteTransportDefinition . SOCKET_BINDING . getName ( ) , binding ) ; connectors . put ( connectorName , new TransportConfiguration ( NettyConnectorFactory . class . getName ( ) , parameters , connectorName , extraParameters ) ) ; } } if ( params . hasDefined ( IN_VM_CONNECTOR ) ) { for ( final Property property : params . get ( IN_VM_CONNECTOR ) . asPropertyList ( ) ) { final String connectorName = property . getName ( ) ; final ModelNode config = property . getValue ( ) ; final Map < String , Object > parameters = getParameters ( context , config , CONNECTORS_KEYS_MAP ) ; final Map < String , Object > extraParameters = getExtraParameters ( IN_VM_ALLOWABLE_KEYS , parameters ) ; parameters . put ( CONNECTORS_KEYS_MAP . get ( InVMTransportDefinition . SERVER_ID . getName ( ) ) , InVMTransportDefinition . SERVER_ID . resolveModelAttribute ( context , config ) . asInt ( ) ) ; connectors . put ( connectorName , new TransportConfiguration ( InVMConnectorFactory . class . getName ( ) , parameters , connectorName , extraParameters ) ) ; } } if ( params . hasDefined ( HTTP_CONNECTOR ) ) { for ( final Property property : params . get ( HTTP_CONNECTOR ) . asPropertyList ( ) ) { final String connectorName = property . getName ( ) ; final ModelNode config = property . getValue ( ) ; final Map < String , Object > parameters = getParameters ( context , config , CONNECTORS_KEYS_MAP ) ; final Map < String , Object > extraParameters = getExtraParameters ( TransportConstants . ALLOWABLE_CONNECTOR_KEYS , parameters ) ; final String binding = HTTPConnectorDefinition . SOCKET_BINDING . resolveModelAttribute ( context , config ) . asString ( ) ; bindings . add ( binding ) ; // ARTEMIS - 803 Artemis knows that is must not offset the HTTP port when it is used by colocated backups
parameters . put ( TransportConstants . HTTP_UPGRADE_ENABLED_PROP_NAME , true ) ; parameters . put ( TransportConstants . HTTP_UPGRADE_ENDPOINT_PROP_NAME , HTTPConnectorDefinition . ENDPOINT . resolveModelAttribute ( context , config ) . asString ( ) ) ; // uses the parameters to pass the socket binding name that will be read in ActiveMQServerService . start ( )
parameters . put ( HTTPConnectorDefinition . SOCKET_BINDING . getName ( ) , binding ) ; ModelNode serverNameModelNode = HTTPConnectorDefinition . SERVER_NAME . resolveModelAttribute ( context , config ) ; // use the name of this server if the server - name attribute is undefined
String serverName = serverNameModelNode . isDefined ( ) ? serverNameModelNode . asString ( ) : configServerName ; parameters . put ( ACTIVEMQ_SERVER_NAME , serverName ) ; connectors . put ( connectorName , new TransportConfiguration ( NettyConnectorFactory . class . getName ( ) , parameters , connectorName , extraParameters ) ) ; } } return connectors ;


signature: public class TransportConfigOperationHandlers { public static Map < String , Boolean > listOutBoundSocketBinding ( OperationContext context , Collection < String > names ) throws OperationFailedException { } }

implementation: Map < String , Boolean > result = new HashMap < > ( ) ; Resource root = context . readResourceFromRoot ( PathAddress . EMPTY_ADDRESS , false ) ; Set < String > groups = root . getChildrenNames ( ModelDescriptionConstants . SOCKET_BINDING_GROUP ) ; for ( String groupName : groups ) { Resource socketBindingGroup = context . readResourceFromRoot ( PathAddress . pathAddress ( ModelDescriptionConstants . SOCKET_BINDING_GROUP , groupName ) ) ; for ( String name : names ) { if ( socketBindingGroup . getChildrenNames ( ModelDescriptionConstants . SOCKET_BINDING ) . contains ( name ) ) { result . put ( name , Boolean . FALSE ) ; } else if ( socketBindingGroup . getChildrenNames ( ModelDescriptionConstants . LOCAL_DESTINATION_OUTBOUND_SOCKET_BINDING ) . contains ( name ) || socketBindingGroup . getChildrenNames ( ModelDescriptionConstants . REMOTE_DESTINATION_OUTBOUND_SOCKET_BINDING ) . contains ( name ) ) { result . put ( name , Boolean . TRUE ) ; } } } if ( result . size ( ) != names . size ( ) ) { for ( String name : names ) { if ( ! result . containsKey ( name ) ) { throw MessagingLogger . ROOT_LOGGER . noSocketBinding ( name ) ; } } } return result ;


signature:
public class UndertowService { /** * The old deployment unit service name . This is still registered as an alias , however { { @ link # deploymentServiceName ( ServiceName ) } }
 * should be used instead .
 * @ param serverName The server name
 * @ param virtualHost The virtual host
 * @ param contextPath The context path
 * @ return The legacy deployment service alias */
@ Deprecated public static ServiceName deploymentServiceName ( final String serverName , final String virtualHost , final String contextPath ) { } }

implementation: return WEB_DEPLOYMENT_BASE . append ( serverName ) . append ( virtualHost ) . append ( "" . equals ( contextPath ) ? "/" : contextPath ) ;


signature:
public class Configurator { /** * Turn type into class .
 * @ param type the type
 * @ return class */
public static Class < ? > toClass ( Type type ) { } }

implementation: if ( type instanceof Class ) { return ( Class ) type ; } else if ( type instanceof ParameterizedType ) { ParameterizedType pt = ( ParameterizedType ) type ; return toClass ( pt . getRawType ( ) ) ; } else { throw PojoLogger . ROOT_LOGGER . unknownType ( type ) ; }


signature:
public class Configurator { /** * Convert a value
 * @ param clazz the class
 * @ param value the value
 * @ param replaceProperties whether to replace system properties
 * @ param trim whether to trim string value
 * @ return the value or null if there is no editor
 * @ throws Throwable for any error */
@ SuppressWarnings ( "unchecked" ) public static Object convertValue ( Class < ? > clazz , Object value , boolean replaceProperties , boolean trim ) throws Throwable { } }

implementation:
if ( clazz == null ) return value ; if ( value == null ) return null ; Class < ? > valueClass = value . getClass ( ) ; // If we have a string , trim and replace any system properties when requested
if ( valueClass == String . class ) { String string = ( String ) value ; if ( trim ) string = string . trim ( ) ; if ( replaceProperties ) value = PropertiesValueResolver . replaceProperties ( string ) ; } if ( clazz . isAssignableFrom ( valueClass ) ) return value ; // First see if this is an Enum
if ( clazz . isEnum ( ) ) { Class < ? extends Enum > eclazz = clazz . asSubclass ( Enum . class ) ; return Enum . valueOf ( eclazz , value . toString ( ) ) ; } // Next look for a property editor
if ( valueClass == String . class ) { PropertyEditor editor = PropertyEditorManager . findEditor ( clazz ) ; if ( editor != null ) { editor . setAsText ( ( String ) value ) ; return editor . getValue ( ) ; } } // Try a static clazz . valueOf ( value )
try { Method method = clazz . getMethod ( "valueOf" , valueClass ) ; int modifiers = method . getModifiers ( ) ; if ( Modifier . isPublic ( modifiers ) && Modifier . isStatic ( modifiers ) && clazz . isAssignableFrom ( method . getReturnType ( ) ) ) return method . invoke ( null , value ) ; } catch ( Exception ignored ) { } if ( valueClass == String . class ) { try { Constructor constructor = clazz . getConstructor ( valueClass ) ; if ( Modifier . isPublic ( constructor . getModifiers ( ) ) ) return constructor . newInstance ( value ) ; } catch ( Exception ignored ) { } } return value ;


signature:
public class Configurator { /** * Get types from values .
 * @ param values the values
 * @ return the values ' types */
public static String [ ] getTypes ( ValueConfig [ ] values ) { } }

implementation: if ( values == null || values . length == 0 ) return NO_PARAMS_TYPES ; String [ ] types = new String [ values . length ] ; for ( int i = 0 ; i < types . length ; i ++ ) types [ i ] = values [ i ] . getType ( ) ; return types ;


signature:
public class Configurator { /** * Find method info
 * @ param index the deployment reflection index
 * @ param classInfo the class info
 * @ param name the method name
 * @ param paramTypes the parameter types
 * @ param isStatic must the method be static
 * @ param isPublic must the method be public
 * @ param strict is strict about method modifiers
 * @ return the method info
 * @ throws IllegalArgumentException when no such method */
@ SuppressWarnings ( "unchecked" ) public static Method findMethod ( DeploymentReflectionIndex index , Class classInfo , String name , String [ ] paramTypes , boolean isStatic , boolean isPublic , boolean strict ) throws IllegalArgumentException { } }

implementation: if ( name == null ) throw PojoLogger . ROOT_LOGGER . nullName ( ) ; if ( classInfo == null ) throw PojoLogger . ROOT_LOGGER . nullClassInfo ( ) ; if ( paramTypes == null ) paramTypes = NO_PARAMS_TYPES ; Class current = classInfo ; while ( current != null ) { ClassReflectionIndex cri = index . getClassIndex ( classInfo ) ; Method result = locateMethod ( cri , name , paramTypes , isStatic , isPublic , strict ) ; if ( result != null ) return result ; current = current . getSuperclass ( ) ; } throw PojoLogger . ROOT_LOGGER . methodNotFound ( name , Arrays . toString ( paramTypes ) , classInfo . getName ( ) ) ;


signature:
public class Configurator { /** * Find method info
 * @ param classInfo the class info
 * @ param name the method name
 * @ param paramTypes the parameter types
 * @ param isStatic must the method be static
 * @ param isPublic must the method be public
 * @ param strict is strict about method modifiers
 * @ return the method info or null if not found */
@ SuppressWarnings ( "unchecked" ) private static Method locateMethod ( ClassReflectionIndex classInfo , String name , String [ ] paramTypes , boolean isStatic , boolean isPublic , boolean strict ) { } }

implementation: Collection < Method > methods = classInfo . getMethods ( ) ; if ( methods != null ) { for ( Method method : methods ) { if ( name . equals ( method . getName ( ) ) && equals ( paramTypes , method . getParameterTypes ( ) ) && ( strict == false || ( Modifier . isStatic ( method . getModifiers ( ) ) == isStatic && Modifier . isPublic ( method . getModifiers ( ) ) == isPublic ) ) ) return method ; } } return null ;


signature:
public class Configurator { /** * A simple null and length check .
 * @ param typeNames the type names
 * @ param typeInfos the type infos
 * @ return false if either argument is null or lengths differ , else true */
protected static boolean simpleCheck ( String [ ] typeNames , Class < ? > [ ] typeInfos ) { } }

implementation: return typeNames != null && typeInfos != null && typeNames . length == typeInfos . length ;


signature:
public class PersistenceUnitXmlParser { /** * Parse the persistence unit definitions based on persistence _ 2_0 . xsd .
 * @ param reader
 * @ param propertyReplacer
 * @ return
 * @ throws XMLStreamException */
private static PersistenceUnitMetadata parsePU ( XMLStreamReader reader , Version version , final PropertyReplacer propertyReplacer ) throws XMLStreamException { } }

implementation:
PersistenceUnitMetadata pu = new PersistenceUnitMetadataImpl ( ) ; List < String > classes = new ArrayList < String > ( 1 ) ; List < String > jarFiles = new ArrayList < String > ( 1 ) ; List < String > mappingFiles = new ArrayList < String > ( 1 ) ; Properties properties = new Properties ( ) ; // set defaults
pu . setTransactionType ( PersistenceUnitTransactionType . JTA ) ; pu . setValidationMode ( ValidationMode . AUTO ) ; pu . setSharedCacheMode ( SharedCacheMode . UNSPECIFIED ) ; pu . setPersistenceProviderClassName ( Configuration . PROVIDER_CLASS_DEFAULT ) ; if ( version . equals ( Version . JPA_1_0 ) ) { pu . setPersistenceXMLSchemaVersion ( "1.0" ) ; } else if ( version . equals ( Version . JPA_2_0 ) ) { pu . setPersistenceXMLSchemaVersion ( "2.0" ) ; } else if ( version . equals ( Version . JPA_2_1 ) ) { pu . setPersistenceXMLSchemaVersion ( "2.1" ) ; } else { pu . setPersistenceXMLSchemaVersion ( "2.2" ) ; } final int count = reader . getAttributeCount ( ) ; for ( int i = 0 ; i < count ; i ++ ) { final String value = reader . getAttributeValue ( i ) ; if ( traceEnabled ) { ROOT_LOGGER . tracef ( "parse persistence.xml: attribute value(%d) = %s" , i , value ) ; } final String attributeNamespace = reader . getAttributeNamespace ( i ) ; if ( attributeNamespace != null && ! attributeNamespace . isEmpty ( ) ) { continue ; } final Attribute attribute = Attribute . forName ( reader . getAttributeLocalName ( i ) ) ; switch ( attribute ) { case NAME : pu . setPersistenceUnitName ( value ) ; break ; case TRANSACTIONTYPE : if ( value . equalsIgnoreCase ( "RESOURCE_LOCAL" ) ) pu . setTransactionType ( PersistenceUnitTransactionType . RESOURCE_LOCAL ) ; break ; default : throw unexpectedAttribute ( reader , i ) ; } } // until the ending PERSISTENCEUNIT tag
while ( reader . hasNext ( ) && reader . nextTag ( ) != END_ELEMENT ) { final Element element = Element . forName ( reader . getLocalName ( ) ) ; if ( traceEnabled ) { ROOT_LOGGER . tracef ( "parse persistence.xml: element=%s" , element . getLocalName ( ) ) ; } switch ( element ) { case CLASS : classes . add ( getElement ( reader , propertyReplacer ) ) ; break ; case DESCRIPTION : final String description = getElement ( reader , propertyReplacer ) ; break ; case EXCLUDEUNLISTEDCLASSES : String text = getElement ( reader , propertyReplacer ) ; if ( text == null || text . isEmpty ( ) ) { // the spec has examples where an empty
// exclude - unlisted - classes element has the same
// effect as setting it to true
pu . setExcludeUnlistedClasses ( true ) ; } else { pu . setExcludeUnlistedClasses ( Boolean . valueOf ( text ) ) ; } break ; case JARFILE : String file = getElement ( reader , propertyReplacer ) ; jarFiles . add ( file ) ; break ; case JTADATASOURCE : pu . setJtaDataSourceName ( getElement ( reader , propertyReplacer ) ) ; break ; case NONJTADATASOURCE : pu . setNonJtaDataSourceName ( getElement ( reader , propertyReplacer ) ) ; break ; case MAPPINGFILE : mappingFiles . add ( getElement ( reader , propertyReplacer ) ) ; break ; case PROPERTIES : parseProperties ( reader , properties , propertyReplacer ) ; break ; case PROVIDER : pu . setPersistenceProviderClassName ( getElement ( reader , propertyReplacer ) ) ; break ; case SHAREDCACHEMODE : String cm = getElement ( reader , propertyReplacer ) ; pu . setSharedCacheMode ( SharedCacheMode . valueOf ( cm ) ) ; break ; case VALIDATIONMODE : String validationMode = getElement ( reader , propertyReplacer ) ; pu . setValidationMode ( ValidationMode . valueOf ( validationMode ) ) ; break ; default : throw unexpectedElement ( reader ) ; } } if ( traceEnabled ) { ROOT_LOGGER . trace ( "parse persistence.xml: reached ending persistence-unit tag" ) ; } pu . setManagedClassNames ( classes ) ; pu . setJarFiles ( jarFiles ) ; pu . setMappingFiles ( mappingFiles ) ; pu . setProperties ( properties ) ; return pu ;


signature:
public class CNBindingEnumeration { /** * Returns the next binding in the list .
 * @ throws NamingException any naming exception . */
public java . lang . Object next ( ) throws NamingException { } }

implementation: if ( more && counter >= _bindingList . value . length ) { getMore ( ) ; } if ( more && counter < _bindingList . value . length ) { org . omg . CosNaming . Binding bndg = _bindingList . value [ counter ] ; counter ++ ; return mapBinding ( bndg ) ; } else { throw new NoSuchElementException ( ) ; }


signature:
public class CNBindingEnumeration { /** * Get the next batch using _ bindingIter . Update the ' more ' field . */
private boolean getMore ( ) throws NamingException { } }

implementation:
try { more = _bindingIter . next_n ( batchsize , _bindingList ) ; counter = 0 ; // reset
} catch ( Exception e ) { more = false ; NamingException ne = IIOPLogger . ROOT_LOGGER . errorGettingBindingList ( ) ; ne . setRootCause ( e ) ; throw ne ; } return more ;


signature:
public class CNBindingEnumeration { /** * Constructs a JNDI Binding object from the COS Naming binding
 * object .
 * @ throws org . omg . CosNaming . NamingContextPackage . CannotProceed Unable to obtain a continuation context
 * @ throws org . omg . CosNaming . NamingContextPackage . InvalidNameCNCtx Name not understood .
 * @ throws NamingException One of the above . */
private javax . naming . Binding mapBinding ( org . omg . CosNaming . Binding bndg ) throws NamingException { } }

implementation:
java . lang . Object obj = _ctx . callResolve ( bndg . binding_name ) ; Name cname = org . wildfly . iiop . openjdk . naming . jndi . CNNameParser . cosNameToName ( bndg . binding_name ) ; try { obj = NamingManager . getObjectInstance ( obj , cname , _ctx , _env ) ; } catch ( NamingException e ) { throw e ; } catch ( Exception e ) { NamingException ne = IIOPLogger . ROOT_LOGGER . errorGeneratingObjectViaFactory ( ) ; ne . setRootCause ( e ) ; throw ne ; } // Use cname . toString ( ) instead of bindingName because the name
// in the binding should be a composite name
String cnameStr = cname . toString ( ) ; javax . naming . Binding jbndg = new javax . naming . Binding ( cnameStr , obj ) ; NameComponent [ ] comps = _ctx . makeFullName ( bndg . binding_name ) ; String fullName = org . wildfly . iiop . openjdk . naming . jndi . CNNameParser . cosNameToInsString ( comps ) ; jbndg . setNameInNamespace ( fullName ) ; return jbndg ;


signature:
public class ResourceDefinitionInjectionSource { /** * Add the specified properties .
 * @ param annotationProperties an array of propertyName = propertyValue strings
 * @ param propertyReplacer if not null all property names and values will be processed by the replacer . */
public void addProperties ( final String [ ] annotationProperties , final PropertyReplacer propertyReplacer ) { } }

implementation: if ( annotationProperties != null ) { for ( String annotationProperty : annotationProperties ) { if ( propertyReplacer != null ) { annotationProperty = propertyReplacer . replaceProperties ( annotationProperty ) ; } final int index = annotationProperty . indexOf ( '=' ) ; String propertyName ; String propertyValue ; if ( index != - 1 ) { propertyName = annotationProperty . substring ( 0 , index ) ; propertyValue = annotationProperty . length ( ) > index ? annotationProperty . substring ( index + 1 , annotationProperty . length ( ) ) : "" ; } else { propertyName = annotationProperty ; propertyValue = "" ; } this . properties . put ( propertyName , propertyValue ) ; } }


signature:
public class ResourceDefinitionInjectionSource { /** * Add the specified properties .
 * @ param descriptorProperties the metadata properties to add */
public void addProperties ( final PropertiesMetaData descriptorProperties ) { } }

implementation: if ( descriptorProperties != null ) { for ( PropertyMetaData descriptorProperty : descriptorProperties ) { this . properties . put ( descriptorProperty . getName ( ) , descriptorProperty . getValue ( ) ) ; } }


signature:
public class CDIExtension { /** * Discover all classes that implements HealthCheckProcedure */
public void observeResources ( @ Observes @ WithAnnotations ( { } }

implementation: Health . class } ) ProcessAnnotatedType < ? extends HealthCheck > event ) { AnnotatedType < ? extends HealthCheck > annotatedType = event . getAnnotatedType ( ) ; Class < ? extends HealthCheck > javaClass = annotatedType . getJavaClass ( ) ; MicroProfileHealthLogger . LOGGER . infof ( "Discovered health check procedure %s" , javaClass ) ; delegates . add ( annotatedType ) ;


signature:
public class CDIExtension { /** * Instantiates < em > unmanaged instances < / em > of HealthCheckProcedure and
 * handle manually their CDI creation lifecycle .
 * Add them to the { @ link SmallRyeHealthReporter } . */
private void afterDeploymentValidation ( @ Observes final AfterDeploymentValidation avd , BeanManager bm ) { } }

implementation: for ( AnnotatedType delegate : delegates ) { try { Unmanaged < HealthCheck > unmanagedHealthCheck = new Unmanaged < HealthCheck > ( bm , delegate . getJavaClass ( ) ) ; UnmanagedInstance < HealthCheck > healthCheckInstance = unmanagedHealthCheck . newInstance ( ) ; HealthCheck healthCheck = healthCheckInstance . produce ( ) . inject ( ) . postConstruct ( ) . get ( ) ; healthCheckInstances . add ( healthCheckInstance ) ; healthReporter . addHealthCheck ( healthCheck ) ; } catch ( Exception e ) { throw new RuntimeException ( "Failed to register health bean" , e ) ; } }


signature:
public class CDIExtension { /** * Called when the deployment is undeployed .
 * Remove all the instances of { @ link HealthCheck } from the { @ link SmallRyeHealthReporter } .
 * Handle manually their CDI destroy lifecycle . */
public void close ( @ Observes final BeforeShutdown bs ) { } }

implementation: healthCheckInstances . forEach ( healthCheck -> { healthReporter . removeHealthCheck ( healthCheck . get ( ) ) ; healthCheck . preDestroy ( ) . dispose ( ) ; } ) ; healthCheckInstances . clear ( ) ;


signature:
public class EjbIIOPService { /** * Returns a corba reference for the given locator
 * @ param locator The locator
 * @ return The corba reference */
public org . omg . CORBA . Object referenceForLocator ( final EJBLocator < ? > locator ) { } }

implementation: final EJBComponent ejbComponent = ejbComponentInjectedValue . getValue ( ) ; try { final String earApplicationName = ejbComponent . getEarApplicationName ( ) == null ? "" : ejbComponent . getEarApplicationName ( ) ; if ( locator . getBeanName ( ) . equals ( ejbComponent . getComponentName ( ) ) && locator . getAppName ( ) . equals ( earApplicationName ) && locator . getModuleName ( ) . equals ( ejbComponent . getModuleName ( ) ) && locator . getDistinctName ( ) . equals ( ejbComponent . getDistinctName ( ) ) ) { if ( locator instanceof EJBHomeLocator ) { return ( org . omg . CORBA . Object ) ejbHome ; } else if ( locator instanceof StatelessEJBLocator ) { return beanReferenceFactory . createReference ( beanRepositoryIds [ 0 ] ) ; } else if ( locator instanceof StatefulEJBLocator ) { final Marshaller marshaller = factory . createMarshaller ( configuration ) ; final ByteArrayOutputStream stream = new ByteArrayOutputStream ( ) ; marshaller . start ( new OutputStreamByteOutput ( stream ) ) ; marshaller . writeObject ( ( ( StatefulEJBLocator < ? > ) locator ) . getSessionId ( ) ) ; marshaller . finish ( ) ; return beanReferenceFactory . createReferenceWithId ( stream . toByteArray ( ) , beanRepositoryIds [ 0 ] ) ; } else if ( locator instanceof EntityEJBLocator ) { final Marshaller marshaller = factory . createMarshaller ( configuration ) ; final ByteArrayOutputStream stream = new ByteArrayOutputStream ( ) ; marshaller . start ( new OutputStreamByteOutput ( stream ) ) ; marshaller . writeObject ( ( ( EntityEJBLocator < ? > ) locator ) . getPrimaryKey ( ) ) ; marshaller . finish ( ) ; return beanReferenceFactory . createReferenceWithId ( stream . toByteArray ( ) , beanRepositoryIds [ 0 ] ) ; } throw EjbLogger . ROOT_LOGGER . unknownEJBLocatorType ( locator ) ; } else { throw EjbLogger . ROOT_LOGGER . incorrectEJBLocatorForBean ( locator , ejbComponent . getComponentName ( ) ) ; } } catch ( Exception e ) { throw EjbLogger . ROOT_LOGGER . couldNotCreateCorbaObject ( e , locator ) ; }


signature:
public class EjbIIOPService { /** * Gets a handle for the given ejb locator .
 * @ param locator The locator to get the handle for
 * @ return The { @ link org . jboss . ejb . client . EJBHandle } or { @ link org . jboss . ejb . client . EJBHomeHandle } */
public Object handleForLocator ( final EJBLocator < ? > locator ) { } }

implementation: final org . omg . CORBA . Object reference = referenceForLocator ( locator ) ; if ( locator instanceof EJBHomeLocator ) { return new HomeHandleImplIIOP ( orb . getValue ( ) . object_to_string ( reference ) ) ; } return new HandleImplIIOP ( orb . getValue ( ) . object_to_string ( reference ) ) ;


signature:
public class EjbIIOPService { /** * ( Re ) binds an object to a name in a given CORBA naming context , creating
 * any non - existent intermediate contexts along the way .
 * This method is synchronized on the class object , if multiple services attempt to bind the
 * same context name at once it will fail
 * @ param ctx a reference to the COSNaming service .
 * @ param strName the name under which the CORBA object is to be bound .
 * @ param obj the CORBA object to be bound .
 * @ throws Exception if an error occurs while binding the object . */
public static synchronized void rebind ( final NamingContextExt ctx , final String strName , final org . omg . CORBA . Object obj ) throws Exception { } }

implementation: final NameComponent [ ] name = ctx . to_name ( strName ) ; NamingContext intermediateCtx = ctx ; for ( int i = 0 ; i < name . length - 1 ; i ++ ) { final NameComponent [ ] relativeName = new NameComponent [ ] { name [ i ] } ; try { intermediateCtx = NamingContextHelper . narrow ( intermediateCtx . resolve ( relativeName ) ) ; } catch ( NotFound e ) { intermediateCtx = intermediateCtx . bind_new_context ( relativeName ) ; } } intermediateCtx . rebind ( new NameComponent [ ] { name [ name . length - 1 ] } , obj ) ;


signature:
public class SecurityDomainService { /** * { @ inheritDoc } */
@ Override public void start ( StartContext context ) throws StartException { } }

implementation: SecurityLogger . ROOT_LOGGER . debugf ( "Starting SecurityDomainService(%s)" , name ) ; if ( applicationPolicy != null ) { final ApplicationPolicyRegistration applicationPolicyRegistration = ( ApplicationPolicyRegistration ) configurationValue . getValue ( ) ; applicationPolicyRegistration . addApplicationPolicy ( applicationPolicy . getName ( ) , applicationPolicy ) ; } final JNDIBasedSecurityManagement securityManagement = ( JNDIBasedSecurityManagement ) securityManagementValue . getValue ( ) ; AuthenticationCacheFactory cacheFactory = null ; if ( "infinispan" . equals ( cacheType ) ) { cacheFactory = ( ) -> this . cacheValue . getValue ( ) ; } else if ( "default" . equals ( cacheType ) ) { cacheFactory = new DefaultAuthenticationCacheFactory ( ) ; } SecurityDomainContext sdc ; try { sdc = securityManagement . createSecurityDomainContext ( name , cacheFactory , jsseSecurityDomain ) ; } catch ( Exception e ) { throw SecurityLogger . ROOT_LOGGER . unableToStartException ( "SecurityDomainService" , e ) ; } if ( jsseSecurityDomain != null ) { try { jsseSecurityDomain . reloadKeyAndTrustStore ( ) ; } catch ( Exception e ) { throw SecurityLogger . ROOT_LOGGER . unableToStartException ( "SecurityDomainService" , e ) ; } } securityManagement . getSecurityManagerMap ( ) . put ( name , sdc ) ; this . securityDomainContext = sdc ;


signature:
public class SecurityDomainService { /** * { @ inheritDoc } */
@ Override public void stop ( StopContext context ) { } }

implementation:
SecurityLogger . ROOT_LOGGER . debugf ( "Stopping security domain service %s" , name ) ; final JNDIBasedSecurityManagement securityManagement = ( JNDIBasedSecurityManagement ) securityManagementValue . getValue ( ) ; securityManagement . removeSecurityDomain ( name ) ; // TODO clear auth cache ?
final ApplicationPolicyRegistration applicationPolicyRegistration = ( ApplicationPolicyRegistration ) configurationValue . getValue ( ) ; applicationPolicyRegistration . removeApplicationPolicy ( name ) ;


signature:
public class ModelNodes { /** * Returns the value of the node as an Enum value .
 * @ param value a model node
 * @ return the value of the node as an Enum . */
public static < E extends Enum < E > > E asEnum ( ModelNode value , Class < E > targetClass ) { } }

implementation: return Enum . valueOf ( targetClass , value . asString ( ) ) ;


signature:
public class ModelNodes { /** * Returns the optional boolean value of the specified { @ link ModelNode } .
 * @ param value the model node
 * @ return an optional value */
public static Optional < Boolean > optionalBoolean ( ModelNode value ) { } }

implementation: return value . isDefined ( ) ? Optional . of ( value . asBoolean ( ) ) : Optional . empty ( ) ;


signature:
public class ModelNodes { /** * Returns the optional double value of the specified { @ link ModelNode } .
 * @ param value the model node
 * @ return an optional value */
public static OptionalDouble optionalDouble ( ModelNode value ) { } }

implementation: return value . isDefined ( ) ? OptionalDouble . of ( value . asDouble ( ) ) : OptionalDouble . empty ( ) ;


signature:
public class ModelNodes { /** * Returns the optional float value of the specified { @ link ModelNode } .
 * @ param value the model node
 * @ return an optional value */
public static Optional < Float > optionalFloat ( ModelNode value ) { } }

implementation: return value . isDefined ( ) ? Optional . of ( asFloat ( value ) ) : Optional . empty ( ) ;


signature:
public class ModelNodes { /** * Returns the optional int value of the specified { @ link ModelNode } .
 * @ param value the model node
 * @ return an optional value */
public static OptionalInt optionalInt ( ModelNode value ) { } }

implementation: return value . isDefined ( ) ? OptionalInt . of ( value . asInt ( ) ) : OptionalInt . empty ( ) ;


signature:
public class ModelNodes { /** * Returns the optional long value of the specified { @ link ModelNode } .
 * @ param value the model node
 * @ return an optional value */
public static OptionalLong optionalLong ( ModelNode value ) { } }

implementation: return value . isDefined ( ) ? OptionalLong . of ( value . asInt ( ) ) : OptionalLong . empty ( ) ;


signature:
public class ModelNodes { /** * Returns the optional string value of the specified { @ link ModelNode } .
 * @ param value the model node
 * @ return an optional value */
public static Optional < String > optionalString ( ModelNode value ) { } }

implementation: return value . isDefined ( ) ? Optional . of ( value . asString ( ) ) : Optional . empty ( ) ;


signature:
public class ModelNodes { /** * Returns the optional property value of the specified { @ link ModelNode } .
 * @ param value the model node
 * @ return an optional value */
public static Optional < Property > optionalProperty ( ModelNode value ) { } }

implementation: return value . isDefined ( ) ? Optional . of ( value . asProperty ( ) ) : Optional . empty ( ) ;


signature:
public class ModelNodes { /** * Returns the optional property list value of the specified { @ link ModelNode } .
 * @ param value the model node
 * @ return an optional value */
public static Optional < List < Property > > optionalPropertyList ( ModelNode value ) { } }

implementation: return value . isDefined ( ) ? Optional . of ( value . asPropertyList ( ) ) : Optional . empty ( ) ;


signature:
public class ModelNodes { /** * Returns the optional list value of the specified { @ link ModelNode } .
 * @ param value the model node
 * @ return an optional value */
public static Optional < List < ModelNode > > optionalList ( ModelNode value ) { } }

implementation: return value . isDefined ( ) ? Optional . of ( value . asList ( ) ) : Optional . empty ( ) ;


signature:
public class ModelNodes { /** * Returns the optional enum value of the specified { @ link ModelNode } .
 * @ param value the model node
 * @ return an optional value */
public static < E extends Enum < E > > Optional < E > optionalEnum ( ModelNode value , Class < E > targetClass ) { } }

implementation: return value . isDefined ( ) ? Optional . of ( asEnum ( value , targetClass ) ) : Optional . empty ( ) ;


signature:
public class EarStructureProcessor { /** * Creates a { @ link ResourceRoot } for the passed { @ link VirtualFile file } and adds it to the list of { @ link ResourceRoot } s
 * in the { @ link DeploymentUnit deploymentUnit }
 * @ param deploymentUnit The deployment unit
 * @ param file The file for which the resource root will be created
 * @ param markAsSubDeployment If this is true , then the { @ link ResourceRoot } that is created will be marked as a subdeployment
 * through a call to { @ link SubDeploymentMarker # mark ( org . jboss . as . server . deployment . module . ResourceRoot ) }
 * @ param explodeDuringMount If this is true then the { @ link VirtualFile file } will be exploded during mount ,
 * while creating the { @ link ResourceRoot }
 * @ return Returns the created { @ link ResourceRoot }
 * @ throws IOException */
private ResourceRoot createResourceRoot ( final DeploymentUnit deploymentUnit , final VirtualFile file , final boolean markAsSubDeployment , final boolean explodeDuringMount ) throws IOException { } }

implementation: final boolean war = file . getName ( ) . toLowerCase ( Locale . ENGLISH ) . endsWith ( WAR_EXTENSION ) ; final Closeable closable = file . isFile ( ) ? mount ( file , explodeDuringMount ) : exportExplodedWar ( war , file , deploymentUnit ) ; final MountHandle mountHandle = new MountHandle ( closable ) ; final ResourceRoot resourceRoot = new ResourceRoot ( file , mountHandle ) ; deploymentUnit . addToAttachmentList ( Attachments . RESOURCE_ROOTS , resourceRoot ) ; if ( markAsSubDeployment ) { SubDeploymentMarker . mark ( resourceRoot ) ; } if ( war ) { resourceRoot . putAttachment ( Attachments . INDEX_RESOURCE_ROOT , false ) ; SubExplodedDeploymentMarker . mark ( resourceRoot ) ; } return resourceRoot ;


signature:
public class OperationDefinitionHelper { /** * Create a { @ code SimpleOperationDefinitionBuilder } for the given operationName and flag it as
 * < strong > read only and runtime only < / strong > . */
public static SimpleOperationDefinitionBuilder runtimeReadOnlyOperation ( String operationName , ResourceDescriptionResolver resolver ) { } }

implementation: return new SimpleOperationDefinitionBuilder ( operationName , resolver ) . setRuntimeOnly ( ) . setReadOnly ( ) ;


signature:
public class OperationDefinitionHelper { /** * Create a { @ code SimpleOperationDefinitionBuilder } for the given operationName and flag it as
 * < strong > runtime only < / strong > . */
public static SimpleOperationDefinitionBuilder runtimeOnlyOperation ( String operationName , ResourceDescriptionResolver resolver ) { } }

implementation: return new SimpleOperationDefinitionBuilder ( operationName , resolver ) . setRuntimeOnly ( ) ;


signature:
public class JaccInterceptor { /** * Returns an array of { @ link Principal } representing the roles associated with the identity
 * invoking the EJB . This method will check performs checks against run as identities in order to
 * resolve the correct set of roles to be granted .
 * @ param securityIdentity the identity invoking the EJB
 * @ return an array of { @ link Principal } representing the roles associated with the identity */
public static Principal [ ] getGrantedRoles ( SecurityIdentity securityIdentity ) { } }

implementation: Set < String > roles = new HashSet < > ( ) ; for ( String s : securityIdentity . getRoles ( "ejb" ) ) { roles . add ( s ) ; } List < Principal > list = new ArrayList < > ( ) ; Function < String , Principal > mapper = roleName -> ( Principal ) ( ) -> roleName ; for ( String role : roles ) { Principal principal = mapper . apply ( role ) ; list . add ( principal ) ; } return list . toArray ( NO_PRINCIPALS ) ;


signature:
public class Utils { /** * Ensure InputStream actually skips ahead the required number of bytes
 * @ param is
 * @ param amount
 * @ throws IOException */
public static void skip ( InputStream is , long amount ) throws IOException { } }

implementation: long leftToSkip = amount ; long amountSkipped = 0 ; while ( leftToSkip > 0 && amountSkipped >= 0 ) { amountSkipped = is . skip ( leftToSkip ) ; leftToSkip -= amountSkipped ; }


signature:
public class Messaging13SubsystemParser { /** * [ AS7-5808 ] Support space - separated roles names for backwards compatibility and comma - separated ones for compatibility with
 * HornetQ configuration .
 * Roles are persisted using space character delimiter in { @ link MessagingXMLWriter } . */
@ Override protected List < String > parseRolesAttribute ( XMLExtendedStreamReader reader , int index ) throws XMLStreamException { } }

implementation: String roles = reader . getAttributeValue ( index ) ; return asList ( roles . split ( "[,\\s]+" ) ) ;


signature:
public class Messaging13SubsystemParser { /** * Check that not both elements have been defined */
protected static void checkNotBothElements ( XMLExtendedStreamReader reader , Set < Element > seen , Element element1 , Element element2 ) throws XMLStreamException { } }

implementation: if ( seen . contains ( element1 ) && seen . contains ( element2 ) ) { throw new XMLStreamException ( MessagingLogger . ROOT_LOGGER . onlyOneRequired ( element1 . getLocalName ( ) , element2 . getLocalName ( ) ) , reader . getLocation ( ) ) ; }


signature:
public class DynamicIIOPStub { /** * Sends a request message to the server , receives the reply from the
 * server , and returns an < code > Object < / code > result to the caller . */
public Object invoke ( String operationName , final StubStrategy stubStrategy , Object [ ] params ) throws Throwable { } }

implementation:
if ( operationName . equals ( "_get_handle" ) && this instanceof javax . ejb . EJBObject ) { if ( handle == null ) { handle = new HandleImplIIOP ( this ) ; } return handle ; } else if ( operationName . equals ( "_get_homeHandle" ) && this instanceof javax . ejb . EJBHome ) { if ( handle == null ) { handle = new HomeHandleImplIIOP ( this ) ; } return handle ; } else { // FIXME
// all invocations are now made using remote invocation
// local invocations between two different applications cause
// ClassCastException between Stub and Interface
// ( two different modules are loading the classes )
// problem was unnoticeable with JacORB because it uses
// remote invocations to all stubs to which interceptors are
// registered and a result all that JacORB always used
// remote invocations
// remote call path
// To check whether this is a local stub or not we must call
// org . omg . CORBA . portable . ObjectImpl . _ is _ local ( ) , and _ not _
// javax . rmi . CORBA . Util . isLocal ( Stub s ) , which in Sun ' s JDK
// always return false .
InputStream in = null ; try { try { OutputStream out = ( OutputStream ) _request ( operationName , true ) ; stubStrategy . writeParams ( out , params ) ; tracef ( "sent request: %s" , operationName ) ; in = ( InputStream ) _invoke ( out ) ; if ( stubStrategy . isNonVoid ( ) ) { trace ( "received reply" ) ; final InputStream finalIn = in ; return doPrivileged ( new PrivilegedAction < Object > ( ) { public Object run ( ) { return stubStrategy . readRetval ( finalIn ) ; } } ) ; } else { return null ; } } catch ( final ApplicationException ex ) { trace ( "got application exception" ) ; in = ( InputStream ) ex . getInputStream ( ) ; final InputStream finalIn1 = in ; throw doPrivileged ( new PrivilegedAction < Exception > ( ) { public Exception run ( ) { return stubStrategy . readException ( ex . getId ( ) , finalIn1 ) ; } } ) ; } catch ( RemarshalException ex ) { trace ( "got remarshal exception" ) ; return invoke ( operationName , stubStrategy , params ) ; } } catch ( SystemException ex ) { if ( EjbLogger . EJB3_INVOCATION_LOGGER . isTraceEnabled ( ) ) { EjbLogger . EJB3_INVOCATION_LOGGER . trace ( "CORBA system exception in IIOP stub" , ex ) ; } throw Util . mapSystemException ( ex ) ; } finally { _releaseReply ( in ) ; } }


signature:
public class DynamicIIOPStub { /** * Sends a request message to the server , receives the reply from the
 * server , and returns a < code > boolean < / code > result to the caller . */
public boolean invokeBoolean ( String operationName , StubStrategy stubStrategy , Object [ ] params ) throws Throwable { } }

implementation: return ( ( Boolean ) invoke ( operationName , stubStrategy , params ) ) . booleanValue ( ) ;


signature:
public class DynamicIIOPStub { /** * Sends a request message to the server , receives the reply from the
 * server , and returns a < code > byte < / code > result to the caller . */
public byte invokeByte ( String operationName , StubStrategy stubStrategy , Object [ ] params ) throws Throwable { } }

implementation: return ( ( Number ) invoke ( operationName , stubStrategy , params ) ) . byteValue ( ) ;


signature:
public class DynamicIIOPStub { /** * Sends a request message to the server , receives the reply from the
 * server , and returns a < code > char < / code > result to the caller . */
public char invokeChar ( String operationName , StubStrategy stubStrategy , Object [ ] params ) throws Throwable { } }

implementation: return ( ( Character ) invoke ( operationName , stubStrategy , params ) ) . charValue ( ) ;


signature:
public class DynamicIIOPStub { /** * Sends a request message to the server , receives the reply from the
 * server , and returns a < code > short < / code > result to the caller . */
public short invokeShort ( String operationName , StubStrategy stubStrategy , Object [ ] params ) throws Throwable { } }

implementation: return ( ( Number ) invoke ( operationName , stubStrategy , params ) ) . shortValue ( ) ;


signature:
public class DynamicIIOPStub { /** * Sends a request message to the server , receives the reply from the
 * server , and returns an < code > int < / code > result to the caller . */
public int invokeInt ( String operationName , StubStrategy stubStrategy , Object [ ] params ) throws Throwable { } }

implementation: return ( ( Number ) invoke ( operationName , stubStrategy , params ) ) . intValue ( ) ;


signature:
public class DynamicIIOPStub { /** * Sends a request message to the server , receives the reply from the
 * server , and returns a < code > long < / code > result to the caller . */
public long invokeLong ( String operationName , StubStrategy stubStrategy , Object [ ] params ) throws Throwable { } }

implementation: return ( ( Number ) invoke ( operationName , stubStrategy , params ) ) . longValue ( ) ;


signature:
public class DynamicIIOPStub { /** * Sends a request message to the server , receives the reply from the
 * server , and returns a < code > float < / code > result to the caller . */
public float invokeFloat ( String operationName , StubStrategy stubStrategy , Object [ ] params ) throws Throwable { } }

implementation: return ( ( Number ) invoke ( operationName , stubStrategy , params ) ) . floatValue ( ) ;


signature:
public class DynamicIIOPStub { /** * Sends a request message to the server , receives the reply from the
 * server , and returns a < code > double < / code > result to the caller . */
public double invokeDouble ( String operationName , StubStrategy stubStrategy , Object [ ] params ) throws Throwable { } }

implementation: return ( ( Number ) invoke ( operationName , stubStrategy , params ) ) . doubleValue ( ) ;


signature:
public class AddressSettingAdd { /** * Create a setting .
 * @ param context the operation context
 * @ param config the detyped config
 * @ return the address settings
 * @ throws OperationFailedException if the model is invalid */
static AddressSettings createSettings ( final OperationContext context , final ModelNode config ) throws OperationFailedException { } }

implementation:
final AddressSettings settings = new AddressSettings ( ) ; if ( config . hasDefined ( AddressSettingDefinition . ADDRESS_FULL_MESSAGE_POLICY . getName ( ) ) ) { final AddressFullMessagePolicy addressPolicy = AddressFullMessagePolicy . valueOf ( AddressSettingDefinition . ADDRESS_FULL_MESSAGE_POLICY . resolveModelAttribute ( context , config ) . asString ( ) ) ; settings . setAddressFullMessagePolicy ( addressPolicy ) ; } if ( config . hasDefined ( DEAD_LETTER_ADDRESS . getName ( ) ) ) { settings . setDeadLetterAddress ( asSimpleString ( DEAD_LETTER_ADDRESS . resolveModelAttribute ( context , config ) , null ) ) ; } if ( config . hasDefined ( AddressSettingDefinition . LAST_VALUE_QUEUE . getName ( ) ) ) { settings . setDefaultLastValueQueue ( AddressSettingDefinition . LAST_VALUE_QUEUE . resolveModelAttribute ( context , config ) . asBoolean ( ) ) ; } if ( config . hasDefined ( AddressSettingDefinition . MAX_DELIVERY_ATTEMPTS . getName ( ) ) ) { settings . setMaxDeliveryAttempts ( AddressSettingDefinition . MAX_DELIVERY_ATTEMPTS . resolveModelAttribute ( context , config ) . asInt ( ) ) ; } if ( config . hasDefined ( AddressSettingDefinition . MAX_SIZE_BYTES . getName ( ) ) ) { settings . setMaxSizeBytes ( AddressSettingDefinition . MAX_SIZE_BYTES . resolveModelAttribute ( context , config ) . asLong ( ) ) ; } if ( config . hasDefined ( AddressSettingDefinition . MESSAGE_COUNTER_HISTORY_DAY_LIMIT . getName ( ) ) ) { settings . setMessageCounterHistoryDayLimit ( AddressSettingDefinition . MESSAGE_COUNTER_HISTORY_DAY_LIMIT . resolveModelAttribute ( context , config ) . asInt ( ) ) ; } if ( config . hasDefined ( CommonAttributes . EXPIRY_ADDRESS . getName ( ) ) ) { settings . setExpiryAddress ( asSimpleString ( EXPIRY_ADDRESS . resolveModelAttribute ( context , config ) , null ) ) ; } if ( config . hasDefined ( AddressSettingDefinition . EXPIRY_DELAY . getName ( ) ) ) { settings . setExpiryDelay ( AddressSettingDefinition . EXPIRY_DELAY . resolveModelAttribute ( context , config ) . asLong ( ) ) ; } if ( config . hasDefined ( AddressSettingDefinition . REDELIVERY_DELAY . getName ( ) ) ) { settings . setRedeliveryDelay ( AddressSettingDefinition . REDELIVERY_DELAY . resolveModelAttribute ( context , config ) . asLong ( ) ) ; } if ( config . hasDefined ( AddressSettingDefinition . REDELIVERY_MULTIPLIER . getName ( ) ) ) { settings . setRedeliveryMultiplier ( AddressSettingDefinition . REDELIVERY_MULTIPLIER . resolveModelAttribute ( context , config ) . asDouble ( ) ) ; } if ( config . hasDefined ( AddressSettingDefinition . MAX_REDELIVERY_DELAY . getName ( ) ) ) { settings . setMaxRedeliveryDelay ( AddressSettingDefinition . MAX_REDELIVERY_DELAY . resolveModelAttribute ( context , config ) . asLong ( ) ) ; } if ( config . hasDefined ( AddressSettingDefinition . REDISTRIBUTION_DELAY . getName ( ) ) ) { settings . setRedistributionDelay ( AddressSettingDefinition . REDISTRIBUTION_DELAY . resolveModelAttribute ( context , config ) . asLong ( ) ) ; } if ( config . hasDefined ( AddressSettingDefinition . PAGE_SIZE_BYTES . getName ( ) ) ) { settings . setPageSizeBytes ( AddressSettingDefinition . PAGE_SIZE_BYTES . resolveModelAttribute ( context , config ) . asLong ( ) ) ; } if ( config . hasDefined ( AddressSettingDefinition . PAGE_MAX_CACHE_SIZE . getName ( ) ) ) { settings . setPageCacheMaxSize ( AddressSettingDefinition . PAGE_MAX_CACHE_SIZE . resolveModelAttribute ( context , config ) . asInt ( ) ) ; } if ( config . hasDefined ( AddressSettingDefinition . SEND_TO_DLA_ON_NO_ROUTE . getName ( ) ) ) { settings . setSendToDLAOnNoRoute ( AddressSettingDefinition . SEND_TO_DLA_ON_NO_ROUTE . resolveModelAttribute ( context , config ) . asBoolean ( ) ) ; } if ( config . hasDefined ( AddressSettingDefinition . SLOW_CONSUMER_CHECK_PERIOD . getName ( ) ) ) { settings . setSlowConsumerCheckPeriod ( AddressSettingDefinition . SLOW_CONSUMER_CHECK_PERIOD . resolveModelAttribute ( context , config ) . asLong ( ) ) ; } if ( config . hasDefined ( AddressSettingDefinition . SLOW_CONSUMER_POLICY . getName ( ) ) ) { final SlowConsumerPolicy slowConsumerPolicy = SlowConsumerPolicy . valueOf ( AddressSettingDefinition . SLOW_CONSUMER_POLICY . resolveModelAttribute ( context , config ) . asString ( ) ) ; settings . setSlowConsumerPolicy ( slowConsumerPolicy ) ; } if ( config . hasDefined ( AddressSettingDefinition . SLOW_CONSUMER_THRESHOLD . getName ( ) ) ) { settings . setSlowConsumerThreshold ( AddressSettingDefinition . SLOW_CONSUMER_THRESHOLD . resolveModelAttribute ( context , config ) . asLong ( ) ) ; } // always set the auto - create | delete - jms - queues attributes as their default attribute values differ from Artemis defaults .
settings . setAutoCreateJmsQueues ( AddressSettingDefinition . AUTO_CREATE_JMS_QUEUES . resolveModelAttribute ( context , config ) . asBoolean ( ) ) ; settings . setAutoDeleteJmsQueues ( AddressSettingDefinition . AUTO_DELETE_JMS_QUEUES . resolveModelAttribute ( context , config ) . asBoolean ( ) ) ; settings . setAutoCreateQueues ( AddressSettingDefinition . AUTO_CREATE_QUEUES . resolveModelAttribute ( context , config ) . asBoolean ( ) ) ; settings . setAutoDeleteQueues ( AddressSettingDefinition . AUTO_DELETE_QUEUES . resolveModelAttribute ( context , config ) . asBoolean ( ) ) ; settings . setAutoCreateAddresses ( AddressSettingDefinition . AUTO_CREATE_ADDRESSES . resolveModelAttribute ( context , config ) . asBoolean ( ) ) ; settings . setAutoDeleteAddresses ( AddressSettingDefinition . AUTO_DELETE_ADDRESSES . resolveModelAttribute ( context , config ) . asBoolean ( ) ) ; return settings ;


signature:
public class EEModuleDescription { /** * Adds or retrieves an existing EEModuleClassDescription for the local module . This method should only be used
 * for classes that reside within the current deployment unit , usually by annotation scanners that are attaching annotation
 * information .
 * This
 * @ param className The class name
 * @ return The new or existing { @ link EEModuleClassDescription } */
public EEModuleClassDescription addOrGetLocalClassDescription ( final String className ) { } }

implementation: if ( className == null ) { throw EeLogger . ROOT_LOGGER . nullVar ( "className" , "module" , moduleName ) ; } EEModuleClassDescription ret = classDescriptions . get ( className ) ; if ( ret == null ) { classDescriptions . put ( className , ret = new EEModuleClassDescription ( className ) ) ; } return ret ;


signature:
public class EEModuleDescription { /** * Add a component to this module .
 * @ param description the component description */
public void addComponent ( ComponentDescription description ) { } }

implementation: final String componentName = description . getComponentName ( ) ; final String componentClassName = description . getComponentClassName ( ) ; if ( componentName == null ) { throw EeLogger . ROOT_LOGGER . nullVar ( "componentName" , "module" , moduleName ) ; } if ( componentClassName == null ) { throw EeLogger . ROOT_LOGGER . nullVar ( "componentClassName" , "module" , moduleName ) ; } if ( componentsByName . containsKey ( componentName ) ) { throw EeLogger . ROOT_LOGGER . componentAlreadyDefined ( componentName ) ; } componentsByName . put ( componentName , description ) ; List < ComponentDescription > list = componentsByClassName . get ( componentClassName ) ; if ( list == null ) { componentsByClassName . put ( componentClassName , list = new ArrayList < ComponentDescription > ( 1 ) ) ; } list . add ( description ) ;


signature:
public class ModuleGroupSingletonProvider { /** * Maps a top level class loader to all CL ' s in the deployment */
public static void addClassLoaders ( ClassLoader topLevel , Set < ClassLoader > allClassLoaders ) { } }

implementation: deploymentClassLoaders . put ( topLevel , allClassLoaders ) ;


signature:
public class SimpleWriteAttributeOperationTransformer { /** * { @ inheritDoc } */
@ Override public TransformedOperation transformOperation ( TransformationContext context , PathAddress address , ModelNode operation ) { } }

implementation: String name = Operations . getAttributeName ( operation ) ; ModelNode value = Operations . getAttributeValue ( operation ) ; ModelNode legacyOperation = org . jboss . as . controller . client . helpers . Operations . createWriteAttributeOperation ( this . addressTransformer . transform ( address ) . toModelNode ( ) , name , value ) ; return new TransformedOperation ( legacyOperation , OperationResultTransformer . ORIGINAL_RESULT ) ;


signature:
public class InMemoryNamingStore { /** * { @ inheritDoc } */
public void bind ( Name name , Object object ) throws NamingException { } }

implementation: bind ( name , object , object . getClass ( ) ) ;


signature:
public class InMemoryNamingStore { /** * { @ inheritDoc } */
public void bind ( final Name name , final Object object , final Class < ? > bindType ) throws NamingException { } }

implementation: if ( isLastComponentEmpty ( name ) ) { throw emptyNameException ( ) ; } writeLock . lock ( ) ; try { root . accept ( new BindVisitor ( true , name , object , bindType . getName ( ) ) ) ; } finally { writeLock . unlock ( ) ; }


signature:
public class InMemoryNamingStore { /** * { @ inheritDoc } */
public void rebind ( Name name , Object object ) throws NamingException { } }

implementation: rebind ( name , object , object . getClass ( ) ) ;


signature:
public class InMemoryNamingStore { /** * { @ inheritDoc } */
public void rebind ( final Name name , final Object object , final Class < ? > bindType ) throws NamingException { } }

implementation: if ( isLastComponentEmpty ( name ) ) { throw emptyNameException ( ) ; } writeLock . lock ( ) ; try { root . accept ( new RebindVisitor ( name , object , bindType . getName ( ) ) ) ; } finally { writeLock . unlock ( ) ; }


signature:
public class InMemoryNamingStore { /** * Unbind the entry in the provided location . This will remove the node in the tree and no longer manage it .
 * @ param name The entry name
 * @ throws NamingException */
public void unbind ( final Name name ) throws NamingException { } }

implementation: if ( isLastComponentEmpty ( name ) ) { throw emptyNameException ( ) ; } writeLock . lock ( ) ; try { root . accept ( new UnbindVisitor ( name ) ) ; } finally { writeLock . unlock ( ) ; }


signature:
public class InMemoryNamingStore { /** * Lookup the object value of a binding node in the tree .
 * @ param name The entry name
 * @ return The object value of the binding
 * @ throws NamingException */
public Object lookup ( final Name name ) throws NamingException { } }

implementation: if ( isEmpty ( name ) ) { final Name emptyName = new CompositeName ( "" ) ; return new NamingContext ( emptyName , this , new Hashtable < String , Object > ( ) ) ; } return root . accept ( new LookupVisitor ( name ) ) ;


signature:
public class InMemoryNamingStore { /** * List all NameClassPair instances at a given location in the tree .
 * @ param name The entry name
 * @ return The NameClassPair instances
 * @ throws NamingException */
public List < NameClassPair > list ( final Name name ) throws NamingException { } }

implementation: final Name nodeName = name . isEmpty ( ) ? new CompositeName ( "" ) : name ; return root . accept ( new ListVisitor ( nodeName ) ) ;


signature:
public class InMemoryNamingStore { /** * List all the Binding instances at a given location in the tree .
 * @ param name The entry name
 * @ return The Binding instances
 * @ throws NamingException */
public List < Binding > listBindings ( final Name name ) throws NamingException { } }

implementation: final Name nodeName = name . isEmpty ( ) ? new CompositeName ( "" ) : name ; return root . accept ( new ListBindingsVisitor ( nodeName ) ) ;


signature:
public class InMemoryNamingStore { /** * Add a { @ code NamingListener } to the naming event coordinator .
 * @ param target The target name to add the listener to
 * @ param scope The listener scope
 * @ param listener The listener */
public void addNamingListener ( final Name target , final int scope , final NamingListener listener ) { } }

implementation: final NamingEventCoordinator coordinator = eventCoordinator ; if ( coordinator != null ) { coordinator . addListener ( target . toString ( ) , scope , listener ) ; }


signature:
public class InMemoryNamingStore { /** * Remove a { @ code NamingListener } from the naming event coordinator .
 * @ param listener The listener */
public void removeNamingListener ( final NamingListener listener ) { } }

implementation: final NamingEventCoordinator coordinator = eventCoordinator ; if ( coordinator != null ) { coordinator . removeListener ( listener ) ; }


signature:
public class JAASIdentityManagerImpl { /** * Get the Principal given the authenticated Subject . Currently the first principal that is not of type { @ code Group } is
 * considered or the single principal inside the CallerPrincipal group .
 * @ param subject
 * @ return the authenticated principal */
private Principal getPrincipal ( Subject subject ) { } }

implementation: Principal principal = null ; Principal callerPrincipal = null ; if ( subject != null ) { Set < Principal > principals = subject . getPrincipals ( ) ; if ( principals != null && ! principals . isEmpty ( ) ) { for ( Principal p : principals ) { if ( ! ( p instanceof Group ) && principal == null ) { principal = p ; } if ( p instanceof Group ) { Group g = Group . class . cast ( p ) ; if ( g . getName ( ) . equals ( SecurityConstants . CALLER_PRINCIPAL_GROUP ) && callerPrincipal == null ) { Enumeration < ? extends Principal > e = g . members ( ) ; if ( e . hasMoreElements ( ) ) callerPrincipal = e . nextElement ( ) ; } } } } } return callerPrincipal == null ? principal : callerPrincipal ;


signature:
public class AppClientXml { /** * Read the < server / > element based on version 1.0 of the schema .
 * @ param reader the xml stream reader
 * @ param address address of the parent resource of any resources this method will add
 * @ param list the list of boot operations to which any new operations should be added
 * @ throws XMLStreamException if a parsing error occurs */
private void readServerElement_1_0 ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > list ) throws XMLStreamException { } }

implementation:
parseNamespaces ( reader , address , list ) ; String serverName = null ; // attributes
final int count = reader . getAttributeCount ( ) ; for ( int i = 0 ; i < count ; i ++ ) { switch ( Namespace . forUri ( reader . getAttributeNamespace ( i ) ) ) { case NONE : { final String value = reader . getAttributeValue ( i ) ; final Attribute attribute = Attribute . forName ( reader . getAttributeLocalName ( i ) ) ; switch ( attribute ) { case NAME : { serverName = value ; break ; } default : throw unexpectedAttribute ( reader , i ) ; } break ; } case XML_SCHEMA_INSTANCE : { switch ( Attribute . forName ( reader . getAttributeLocalName ( i ) ) ) { case SCHEMA_LOCATION : { parseSchemaLocations ( reader , address , list , i ) ; break ; } case NO_NAMESPACE_SCHEMA_LOCATION : { // todo , jeez
break ; } default : { throw unexpectedAttribute ( reader , i ) ; } } break ; } default : throw unexpectedAttribute ( reader , i ) ; } } setServerName ( address , list , serverName ) ; // elements - sequence
Element element = nextElement ( reader , DOMAIN_1_0 ) ; if ( element == Element . EXTENSIONS ) { extensionXml . parseExtensions ( reader , address , DOMAIN_1_0 , list ) ; element = nextElement ( reader , DOMAIN_1_0 ) ; } // System properties
if ( element == Element . SYSTEM_PROPERTIES ) { parseSystemProperties ( reader , address , DOMAIN_1_0 , list , true ) ; element = nextElement ( reader , DOMAIN_1_0 ) ; } if ( element == Element . PATHS ) { parsePaths ( reader , address , DOMAIN_1_0 , list , true ) ; element = nextElement ( reader , DOMAIN_1_0 ) ; } // Single profile
if ( element == Element . PROFILE ) { parseServerProfile ( reader , address , list ) ; element = nextElement ( reader , DOMAIN_1_0 ) ; } // Interfaces
final Set < String > interfaceNames = new HashSet < String > ( ) ; if ( element == Element . INTERFACES ) { parseInterfaces ( reader , interfaceNames , address , DOMAIN_1_0 , list , true ) ; element = nextElement ( reader , DOMAIN_1_0 ) ; } // Single socket binding group
if ( element == Element . SOCKET_BINDING_GROUP ) { parseSocketBindingGroup ( reader , interfaceNames , address , DOMAIN_1_0 , list ) ; element = nextElement ( reader , DOMAIN_1_0 ) ; } if ( element != null ) { throw unexpectedElement ( reader ) ; }


signature:
public class RaXmlDependencyProcessor { /** * Add dependencies for modules required for ra deployments
 * @ param phaseContext the deployment unit context
 * @ throws org . jboss . as . server . deployment . DeploymentUnitProcessingException */
public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } }

implementation:
final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; if ( phaseContext . getDeploymentUnit ( ) . getAttachment ( ConnectorXmlDescriptor . ATTACHMENT_KEY ) == null ) { return ; // Skip non ra deployments
} CopyOnWriteArrayListMultiMap < String , ServiceName > resourceAdaptersMap = phaseContext . getDeploymentUnit ( ) . getAttachment ( ResourceAdaptersSubsystemService . ATTACHMENT_KEY ) ; String deploymentUnitPrefix = "" ; if ( deploymentUnit . getParent ( ) != null ) { deploymentUnitPrefix = deploymentUnit . getParent ( ) . getName ( ) + "#" ; } final String deploymentUnitName = deploymentUnitPrefix + deploymentUnit . getName ( ) ; if ( resourceAdaptersMap != null && resourceAdaptersMap . get ( deploymentUnitName ) != null ) { for ( ServiceName serviceName : resourceAdaptersMap . get ( deploymentUnitName ) ) { phaseContext . addDeploymentDependency ( serviceName , AttachmentKey . create ( ModifiableResourceAdapter . class ) ) ; } }