idx int64 0 41.2k | question stringlengths 73 5.81k | target stringlengths 5 918 |
|---|---|---|
25,700 | public void setConfig ( LWMConfig meConfig ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setConfig" , new Object [ ] { meConfig } ) ; _highMessageThreshold = ( ( JsMessagingEngine ) meConfig ) . getMEThreshold ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "setConfig" ) ; } | setConfig is implemented from the interface JsEngineComponent and is used to set properties on the MP |
25,701 | public void setCustomProperty ( String propertyName , String propertyValue ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setCustomProperty" , new Object [ ] { propertyName , propertyValue } ) ; _customProperties . setProperty ( propertyName , propertyValue ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "setCustomProperty" ) ; } | setCustomProperty is implemented from the interface JsEngineComponent and is used to set properties on the MP |
25,702 | public JsDestinationAddress getProxyHandlerDestAddr ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getProxyHandlerDestAddr" ) ; SibTr . exit ( tc , "getProxyHandlerDestAddr" , _proxyHandlerDestAddr ) ; } return _proxyHandlerDestAddr ; } | Method to return the name of the Subscription Proxy Queue used to receive the proxy updates |
25,703 | public SearchResultsObjectPool getSearchResultsObjectPool ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getSearchResultsObjectPool" ) ; SibTr . exit ( tc , "getSearchResultsObjectPool" , _connectionToMP ) ; } return _searchResultsPool ; } | Gets the SearchResultsObjectPool instance |
25,704 | public MPCoreConnection getSystemConnection ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getSystemConnection" ) ; SibTr . exit ( tc , "getSystemConnection" , _connectionToMP ) ; } return _connectionToMP ; } | Method to return the connection that the SYSTEM queue was created on . This connection is used wherever an internal producerSession or consumerSession is required . |
25,705 | public SIBUuid8 getMessagingEngineUuid ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getMessagingEngineUuid" ) ; SIBUuid8 uuid = _persistentStore . getMessagingEngineUuid ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getMessagingEngineUuid" , uuid ) ; return uuid ; } | Returns the messagingEngineUuid |
25,706 | public static ControlMessageFactory getControlMessageFactory ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getControlMessageFactory" ) ; if ( _controlMessageFactory == null ) _controlMessageFactory = ( ControlMessageFactory ) getSingletonInstance ( SIMPConstants . CONTROL_MESSAGE_FACTORY ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getControlMessageFactory" , _controlMessageFactory ) ; return _controlMessageFactory ; } | Creates the control message factory single instance |
25,707 | public static JsMessageHandleFactory getJsMessageHandleFactory ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getJsMessageHandleFactory" ) ; if ( _jsMessageHandleFactory == null ) _jsMessageHandleFactory = ( JsMessageHandleFactory ) getSingletonInstance ( SIMPConstants . JS_MESSAGE_HANDLE_FACTORY ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getJsMessageHandleFactory" , _jsMessageHandleFactory ) ; return _jsMessageHandleFactory ; } | Creates the message handle factory single instance |
25,708 | public void add ( Item item , TransactionCommon transaction ) throws MessageStoreException , SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "add" , new Object [ ] { item , transaction } ) ; Transaction msTran = resolveAndEnlistMsgStoreTransaction ( transaction ) ; _persistentStore . addItem ( item , msTran ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "add" ) ; } | Add an item to the Message Processor ItemStream . |
25,709 | public SIMPTransactionManager getTXManager ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getTXManager" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getTXManager" , _txManager ) ; return _txManager ; } | Get the Transaction Manager |
25,710 | public BatchHandler getTargetBatchHandler ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getTargetBatchHandler" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getTargetBatchHandler" , _targetBatchHandler ) ; return _targetBatchHandler ; } | Get the Target Batch Handler |
25,711 | public BatchHandler getSourceBatchHandler ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getSourceBatchHandler" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getSourceBatchHandler" , _sourceBatchHandler ) ; return _sourceBatchHandler ; } | Get the Source Batch Handler |
25,712 | public BatchHandler getPublicationBatchHandler ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getPublicationBatchHandler" ) ; SibTr . exit ( tc , "getPublicationBatchHandler" , _sourceBatchHandler ) ; } return _publicationBatchHandler ; } | Get the Publication Batch Handler |
25,713 | public DestinationLocationManager getDestinationLocationManager ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getDestinationLocationManager" ) ; SibTr . exit ( tc , "getDestinationLocationManager" , _destinationLocationManager ) ; } return _destinationLocationManager ; } | Returns the destinationLocationManager . |
25,714 | public LinkManager getLinkManager ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getLinkManager" ) ; SibTr . exit ( tc , "getLinkManager" ) ; } return _linkManager ; } | Returns the LinkManager . |
25,715 | MQLinkManager getMQLinkManager ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getMQLinkManager" ) ; SibTr . exit ( tc , "getMQLinkManager" ) ; } return _mqLinkManager ; } | Returns the MQLinkManager . |
25,716 | public Set getSIBDestinationLocalitySet ( String busName , String uuid , boolean newSet ) throws SIBExceptionDestinationNotFound , SIBExceptionBase { return _localistySet ; } | Hence just setting set to the current ME UUID |
25,717 | public void setDiscardMsgsAfterQueueDeletion ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "setDiscardMsgsAfterQueueDeletion" ) ; SibTr . exit ( tc , "setDiscardMsgsAfterQueueDeletion" ) ; } _discardMsgsAfterQueueDeletion = true ; } | Set _discardMsgsAfterQueueDeletion to true . |
25,718 | public SIBUuid8 mapMeNameToUuid ( String name ) { SIBUuid8 result = null ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "mapMeNameToUuid" , name ) ; if ( name != null ) { if ( name . equals ( getMessagingEngineName ( ) ) ) result = getMessagingEngineUuid ( ) ; else ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "mapMeNameToUuid" , result ) ; return result ; } | Map the name of an ME to its Uuid . |
25,719 | final public boolean isSingleServer ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "isSingleServer" ) ; if ( ! _singleServerSet ) { JsAdminService service = JsMainAdminComponentImpl . getJsAdminService ( ) ; if ( service . isInitialized ( ) ) _isSingleServer = service . isStandaloneServer ( ) ; else _isSingleServer = true ; _singleServerSet = true ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "isSingleServer" , new Boolean ( _isSingleServer ) ) ; return _isSingleServer ; } | Returns whether the ME is running as part of a stand alone server . |
25,720 | public void setRuntimeEventListener ( RuntimeEventListener listener ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setRuntimeEventListener" , listener ) ; _runtimeEventListener = listener ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "setRuntimeEventListener" ) ; } | Set MessageProcessor s RuntimeEventListener . |
25,721 | public RuntimeEventListener getRuntimeEventListener ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getRuntimeEventListener" ) ; SibTr . exit ( tc , "getRuntimeEventListener" , _runtimeEventListener ) ; } return _runtimeEventListener ; } | Get MessageProcessor s RuntimeEventListener . |
25,722 | private void fireNotAuthenticatedEvent ( String userName ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "fireNotAuthenticatedEvent" , userName ) ; if ( _runtimeEventListener != null ) { String message = nls . getFormattedMessage ( "USER_NOT_AUTHORIZED_ERROR_CWSIP0301" , new Object [ ] { userName , getMessagingEngineName ( ) , getMessagingEngineBus ( ) } , null ) ; Properties props = new Properties ( ) ; props . put ( SibNotificationConstants . KEY_OPERATION , SibNotificationConstants . OPERATION_CONNECT ) ; props . put ( SibNotificationConstants . KEY_SECURITY_USERID , userName ) ; props . put ( SibNotificationConstants . KEY_SECURITY_REASON , SibNotificationConstants . SECURITY_REASON_NOT_AUTHENTICATED ) ; _runtimeEventListener . runtimeEventOccurred ( _engine , SibNotificationConstants . TYPE_SIB_SECURITY_NOT_AUTHENTICATED , message , props ) ; } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Null RuntimeEventListener, cannot fire event" ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "fireNotAuthenticatedEvent" ) ; } | Fire an event notification of type TYPE_SIB_SECURITY_NOT_AUTHENTICATED with reason SECURITY_REASON_NOT_AUTHENTICATED . |
25,723 | public Alarm create ( long delta , int percentLate , AlarmListener listener , Object context ) throws SIErrorException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "create" , new Object [ ] { this , Long . valueOf ( delta ) , Integer . valueOf ( percentLate ) , listener , context } ) ; long time = System . currentTimeMillis ( ) + delta ; if ( time < 0 ) { SIErrorException e = new SIErrorException ( nls . getFormattedMessage ( "INTERNAL_MESSAGING_ERROR_CWSIP0001" , new Object [ ] { "com.ibm.ws.sib.processor.utils.am.MPAlarmManager" , "1:269:1.28" } , null ) ) ; FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.utils.am.MPAlarmManager.create" , "1:274:1.28" , this ) ; SibTr . exception ( tc , e ) ; SibTr . error ( tc , "INTERNAL_MESSAGING_ERROR_CWSIP0001" , new Object [ ] { "com.ibm.ws.sib.processor.utils.am.MPAlarmManager" , "1:280:1.28" } ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "MPAlarmManager" , e ) ; throw e ; } long latest = time + ( ( delta / 100 ) * percentLate ) ; MPAlarmImpl alarm = ( MPAlarmImpl ) _alarmPool . remove ( ) ; if ( alarm == null ) { alarm = new MPAlarmImpl ( time , latest , listener , context , index ++ ) ; } else { alarm . reset ( time , latest , listener , context , index ++ ) ; } synchronized ( _pendingAlarmsLock ) { MPAlarmImpl insertPoint = ( MPAlarmImpl ) _pendingAlarms . getLast ( ) ; if ( insertPoint == null ) { _pendingAlarms . put ( alarm ) ; } else { if ( insertPoint . time ( ) > time ) { do { insertPoint = insertPoint . previous ( ) ; } while ( insertPoint != null && insertPoint . time ( ) > time ) ; } if ( insertPoint == null ) { _pendingAlarms . insertAtTop ( alarm ) ; } else { _pendingAlarms . insertAfter ( alarm , insertPoint ) ; } } if ( _nextAlarm == MPAlarmThread . SUSPEND || time < _nextAlarm ) { _nextAlarm = time ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { long now = System . currentTimeMillis ( ) ; SibTr . debug ( tc , "now " + now + "Alarm Start : " + listener + " - " + ( time - now ) + " (" + ( latest - now ) + ")" ) ; SibTr . debug ( tc , "" + _pendingAlarms ) ; } } _alarmThread . requestNextWakeup ( _nextAlarm ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "create" , alarm ) ; return alarm ; } | Create a new alarm . |
25,724 | public synchronized void cancelAll ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "cancelAll" , this ) ; _cancelAll = true ; LinkedList oldPendingList = null ; LinkedList oldFiredList = null ; synchronized ( _firedAlarmsLock ) { synchronized ( _pendingAlarmsLock ) { oldPendingList = _pendingAlarms ; _pendingAlarms = new LinkedList ( ) ; oldFiredList = _firedAlarms ; _firedAlarms = new LinkedList ( ) ; _nextAlarm = MPAlarmThread . SUSPEND ; _cancelAll = false ; } } MPAlarmImpl alarm = ( MPAlarmImpl ) oldPendingList . getFirst ( ) ; while ( alarm != null ) { MPAlarmImpl next = alarm . next ( ) ; alarm . cancel ( ) ; oldPendingList . remove ( alarm ) ; _alarmPool . add ( alarm ) ; alarm = next ; } alarm = ( MPAlarmImpl ) oldFiredList . getFirst ( ) ; while ( alarm != null ) { MPAlarmImpl next = alarm . next ( ) ; alarm . cancel ( ) ; oldFiredList . remove ( alarm ) ; _alarmPool . add ( alarm ) ; alarm = next ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "cancelAll" ) ; } | cancel all of the alarms which are currenly registered . |
25,725 | public void stopThread ( StoppableThreadCache threadCache ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "stopThread" ) ; cancelAll ( ) ; _alarmThread . finishAlarmThread ( ) ; threadCache . deregisterThread ( this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "stopThread" ) ; } | Tell the alarm manager to finish and stop it s alarm thread . |
25,726 | public void setExcludeClassLevelInterceptors ( boolean exclude ) throws EJBConfigurationException { if ( ivBindingStyle == BindingStyle . STYLE3 || ivBindingStyle == BindingStyle . STYLE4 ) { ivExcludeClassLevelInterceptors = ( exclude ) ? Boolean . TRUE : Boolean . FALSE ; } else { Tr . error ( tc , "INVALID_EXCLUDE_CLASS_INTERCEPTORS_CNTR0224E" , new Object [ ] { ivEjbName } ) ; throw new EJBConfigurationException ( "exclude-class-interceptors element can only be applied to a method of EJB" ) ; } } | Set whether to exclude class level interceptors from a method level EJBInterceptorBinding object . |
25,727 | public void setExcludeDefaultInterceptors ( boolean exclude ) throws EJBConfigurationException { if ( ivBindingStyle == BindingStyle . STYLE1 ) { Tr . error ( tc , "INVALID_EXCLUDE_DEFAULT_INTERCEPTORS_CNTR0225E" ) ; throw new EJBConfigurationException ( " CNTR0225E: Invalid use of the exclude-default-interceptors" + " element in interceptor-binding for EJB name \"*\"" ) ; } else { ivExcludeDefaultLevelInterceptors = ( exclude ) ? Boolean . TRUE : Boolean . FALSE ; } } | Set whether to exclude default interceptors from either a class or method level EJBInterceptorBinding object . |
25,728 | public void dump ( ) { Object allData [ ] = new Object [ ] { this , "EJBName = " + ivEjbName , "method name = " + ivMethodName , "method parameters = " + ivMethodParms , "binding style = " + ivBindingStyle , "exclude default inteceptors = " + ivExcludeDefaultLevelInterceptors , "exclude class inteceptors = " + ivExcludeClassLevelInterceptors , } ; int totalLength = allData . length ; String [ ] interceptorOrder = null ; if ( ivInterceptorOrder != null ) { interceptorOrder = new String [ ivInterceptorOrder . size ( ) ] ; interceptorOrder = ivInterceptorOrder . toArray ( interceptorOrder ) ; totalLength += interceptorOrder . length + 2 ; } String [ ] interceptorNames = null ; if ( ivInterceptorClassNames != null ) { interceptorNames = new String [ ivInterceptorClassNames . size ( ) ] ; interceptorNames = ivInterceptorClassNames . toArray ( interceptorNames ) ; totalLength += interceptorNames . length + 2 ; } int index = 0 ; Object dumpData [ ] = new Object [ totalLength ] ; System . arraycopy ( allData , 0 , dumpData , index , allData . length ) ; index += allData . length ; if ( interceptorOrder != null ) { dumpData [ index ++ ] = "Interceptor Order: " ; dumpData [ index ++ ] = " " ; System . arraycopy ( interceptorOrder , 0 , dumpData , index , interceptorOrder . length ) ; index += interceptorOrder . length ; } if ( interceptorNames != null ) { dumpData [ index ++ ] = "Interceptor Class Names: " ; dumpData [ index ++ ] = " " ; System . arraycopy ( interceptorNames , 0 , dumpData , index , interceptorNames . length ) ; index += interceptorNames . length ; } Tr . dump ( tc , "-- EJBInterceptorBinding Dump --" , dumpData ) ; Tr . dump ( tc , "-- EJBInterceptorBinding Dump End --" ) ; } | Perform a Tr . dump of this EJBInterceptorBinding object . |
25,729 | public Object nextElemNoEx ( ) { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( ivElementIndex >= ivBucketSize ) { if ( ! findNextBucket ( ) ) { return null ; } } if ( isTraceOn && tc . isDebugEnabled ( ) ) ivElementsReturned ++ ; return ivBucket [ ivElementIndex ++ ] ; } | d532639 . 2 |
25,730 | public void dispose ( ) { if ( _cacheFile != null && _dirty ) { PrintStream out = null ; try { File parent = _cacheFile . getParentFile ( ) ; if ( parent . isDirectory ( ) || parent . mkdirs ( ) ) { out = new PrintStream ( _cacheFile ) ; for ( List < Resource > bundleInfoList : _cacheBySymbolicName . values ( ) ) { for ( Resource bundleInfo : bundleInfoList ) { out . println ( bundleInfo ) ; } } } } catch ( IOException e ) { } finally { Utils . tryToClose ( out ) ; } } _bundleLocations . clear ( ) ; _cacheBySymbolicName . clear ( ) ; } | This method is called once provisioning is over . It flushes the cache and clears up memory . After this is called future calls to public methods will fail . |
25,731 | public File selectBundle ( String baseLocation , final String symbolicName , final VersionRange versionRange ) { readCache ( ) ; return selectResource ( baseLocation , symbolicName , versionRange ) ; } | This method selects bundles based on the input criteria . The first parameter is the baseLocation . This can be null the empty string a directory a comma separated list of directories or a file path relative to the install . If it is a file path then that exact bundle is returned irrespective of other selection parameters . If it is null or the empty string it is assumed to be a bundle in lib dir . If it is a directory or a comma separated directory then the subsequent matching rules will be used to choose a matching bundle in the specified directories . |
25,732 | protected synchronized void includeBaseLocation ( String baseLocation ) { _locations . add ( baseLocation ) ; if ( _cacheRead ) { File [ ] files = new File ( _installDir , baseLocation ) . listFiles ( new FileFilter ( ) { public boolean accept ( File arg0 ) { return arg0 . getName ( ) . endsWith ( ".jar" ) && ! ! ! _bundleLocations . contains ( arg0 ) ; } } ) ; if ( files != null ) { for ( File f : files ) { BundleInfo bInfo ; try { bInfo = new BundleInfo ( f , baseLocation ) ; if ( bInfo . symbolicName != null ) { _dirty = true ; addToCache ( bInfo ) ; } } catch ( IOException e ) { } } } } } | This method scans the provided location under the install dir . It looks at all the jar files in that directory and provided the file isn t in the cache it ll read the manifest and add it into memory . |
25,733 | @ FFDCIgnore ( IOException . class ) private synchronized void readCache ( ) { if ( ! ! ! _cacheRead ) { BufferedReader reader = null ; try { if ( _cacheFile != null && _cacheFile . exists ( ) && _cacheFile . isFile ( ) ) { reader = new BufferedReader ( new FileReader ( _cacheFile ) ) ; String line ; while ( ( line = reader . readLine ( ) ) != null ) { try { BundleInfo bInfo = new BundleInfo ( line ) ; if ( bInfo . file . exists ( ) && bInfo . symbolicName != null ) { addToCache ( bInfo ) ; } } catch ( IOException e ) { } } } } catch ( IOException e ) { _bundleLocations . clear ( ) ; _cacheBySymbolicName . clear ( ) ; } finally { Utils . tryToClose ( reader ) ; } _cacheRead = true ; for ( String loc : new HashSet < String > ( _locations ) ) { includeBaseLocation ( loc ) ; } } } | This method reads the cache . Each line in the file represents a different bundle . The BundleInfo constructor reads the cache line and validates the data re - reading from the bundle manifest if required . |
25,734 | private void addToCache ( BundleInfo bInfo ) { List < Resource > info = _cacheBySymbolicName . get ( bInfo . symbolicName ) ; if ( info == null ) { info = new ArrayList < Resource > ( ) ; info . add ( bInfo ) ; } info = _cacheBySymbolicName . putIfAbsent ( bInfo . symbolicName , info ) ; if ( info != null ) { synchronized ( info ) { info . add ( bInfo ) ; } } _bundleLocations . add ( bInfo . file ) ; } | This method adds into the cache . Adding into the cache requires updating a map and a set . |
25,735 | public static int registerDiagnosticModule ( DiagnosticModule diagnosticModule , String packageName ) { if ( modules . containsKey ( packageName ) ) { return 1 ; } try { diagnosticModule . init ( ) ; } catch ( Throwable th ) { return 3 ; } modules . put ( packageName , diagnosticModule ) ; return 0 ; } | Register a diagnostic module |
25,736 | public static boolean deregisterDiagnosticModule ( String packageName ) { if ( modules . containsKey ( packageName ) ) { modules . remove ( packageName ) ; return true ; } else return false ; } | Deregister a diagnostic module for a package |
25,737 | public Subject replaceCallerSubject ( Subject callerSubject ) { SubjectThreadContext subjectThreadContext = getSubjectThreadContext ( ) ; Subject replacedCallerSubject = subjectThreadContext . getCallerSubject ( ) ; subjectThreadContext . setCallerSubject ( callerSubject ) ; return replacedCallerSubject ; } | Replaces the caller subject on the thread and returns the replaced subject . |
25,738 | public Subject replaceInvocationSubject ( Subject invocationSubject ) { SubjectThreadContext subjectThreadContext = getSubjectThreadContext ( ) ; Subject replacedInvocationSubject = subjectThreadContext . getInvocationSubject ( ) ; subjectThreadContext . setInvocationSubject ( invocationSubject ) ; return replacedInvocationSubject ; } | Replaces the invocation subject on the thread and returns the replaced subject . |
25,739 | public static InstallKernel getInstance ( File installRoot ) { if ( installKernel == null ) { installKernel = new InstallKernelImpl ( installRoot ) ; } return installKernel ; } | Return the singleton instance of InstallKernel . The instance will be reset if the installRoot is changed . |
25,740 | public boolean hasNext ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "hasNext" , this ) ; boolean hasNext = false ; if ( ( ! _empty ) && ( ( _singleObject != null ) || ( ( _iterator1 != null ) && ( _iterator1 . hasNext ( ) ) ) || ( ( _iterator2 != null ) && ( _iterator2 . hasNext ( ) ) ) ) ) { hasNext = true ; } if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "hasNext" , new Boolean ( hasNext ) ) ; return hasNext ; } | Returns a boolean flag to indicate if this LogCursorImpl has further objects to return . |
25,741 | public static String getPid ( ) { if ( pid == null ) { String runtimeName = ManagementFactory . getRuntimeMXBean ( ) . getName ( ) ; if ( runtimeName == null ) { pid = "unknown" ; } else { int index = runtimeName . indexOf ( '@' ) ; if ( index < 0 ) { pid = runtimeName ; } else { pid = runtimeName . substring ( 0 , index ) ; } } } return pid ; } | Retrieves process ID for the current process . |
25,742 | public URBridgeEntity createObject ( Entity entity , URBridge urBridge , Map < String , String > attrMap , String baseEntryName , Map < String , String > entityConfigMap ) throws WIMException { String entityType = entity . getTypeName ( ) ; URBridgeEntity obj = null ; if ( Service . DO_GROUP . equals ( entityType ) || Entity . getSubEntityTypes ( Service . DO_GROUP ) . contains ( entityType ) ) { obj = new URBridgeGroup ( entity , urBridge , attrMap , baseEntryName , entityConfigMap ) ; } else if ( Service . DO_LOGIN_ACCOUNT . equals ( entityType ) || Entity . getSubEntityTypes ( Service . DO_LOGIN_ACCOUNT ) . contains ( entityType ) ) { obj = new URBridgePerson ( entity , urBridge , attrMap , baseEntryName , entityConfigMap ) ; } else { throw new WIMApplicationException ( WIMMessageKey . ENTITY_TYPE_NOT_SUPPORTED , Tr . formatMessage ( tc , WIMMessageKey . ENTITY_TYPE_NOT_SUPPORTED , WIMMessageHelper . generateMsgParms ( entityType ) ) ) ; } return obj ; } | Create a URBridgeEntity from input parameters . With inheritance this allows Users and Groups to be treated identically . |
25,743 | private void takeCloseLock ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "takeCloseLock" ) ; while ( true ) { try { closeLock . readLock ( ) . lockInterruptibly ( ) ; break ; } catch ( InterruptedException e ) { } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "takeCloseLock" ) ; } | Take a reader lock on the close synchronization primative . |
25,744 | private void releaseCloseLock ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "releaseCloseLock" ) ; closeLock . readLock ( ) . unlock ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "releaseCloseLock" ) ; } | Release a reader lock on the close synchronization primative . |
25,745 | private static void initialize ( ) throws AsyncException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "initialize" ) ; } capabilities = aio_init ( MAX_IDENTIFIERS , AsyncException . class ) ; aioInitialized = AIO_INITIALIZED ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "initialize: " + capabilities ) ; } } | Initialize the provider . |
25,746 | public static void shutdown ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "shutdown" ) ; } synchronized ( oneAtATime ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "have lock" ) ; } if ( aioInitialized == AIO_INITIALIZED ) { aioInitialized = AIO_SHUTDOWN ; closeAllCompletionPorts ( ) ; try { aio_shutdown ( ) ; } catch ( AsyncException ae ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "AsyncException occured while shutting down: " + ae . getMessage ( ) ) ; } } } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "shutdown" ) ; } } | Shutdown the AIO library . |
25,747 | public static IAsyncProvider getInstance ( ) { if ( instance != null ) { return instance ; } try { return createInstance ( ) ; } catch ( AsyncException x ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Error getting async provider instance, exception: " + x . getMessage ( ) ) ; } FFDCFilter . processException ( x , "com.ibm.io.async.AsyncLibrary" , "331" ) ; return null ; } } | Get the singleton instance of the async library . |
25,748 | public static synchronized IAsyncProvider createInstance ( ) throws AsyncException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "createInstance" ) ; } if ( instance == null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "instance is null. Instantiating new AsyncLibrary " ) ; } instance = new AsyncLibrary ( ) ; } if ( ( aioInitialized == AIO_NOT_INITIALIZED ) || ( aioInitialized == AIO_SHUTDOWN ) ) { initialize ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "createInstance" ) ; } return instance ; } | Find or create the AIO provider . |
25,749 | public static IOException getIOException ( String desc , int code ) { return new IOException ( desc + ErrorMessageCache . get ( code ) ) ; } | Get an IOException instance for the input description and native AIO return coded . |
25,750 | public CompatibilityMap getCompatibility ( JSchema access ) throws JMFSchemaViolationException { CompatibilityMap ans = null ; if ( compMaps == null ) compMaps = new HashedArray ( COMP_MAP_BUCKETS , 2 ) ; else ans = ( CompatibilityMap ) compMaps . get ( access . getID ( ) ) ; if ( ans != null ) return ans ; ans = new CompatibilityMap ( access , this ) ; compMaps . set ( ans ) ; return ans ; } | Find the CompatibilityMap from a given access JSchema to this JSchema |
25,751 | public int getAccessor ( String name ) { if ( name == null ) name = "" ; StringTokenizer path = new StringTokenizer ( name , "/" ) ; JMFType pos = getEffectiveType ( jsTypeTree ) ; while ( pos != null && path . hasMoreTokens ( ) ) pos = findChild ( getEffectiveType ( pos ) , path . nextToken ( ) ) ; if ( pos instanceof JSVariant && ( ( JSVariant ) pos ) . getBoxed ( ) != null ) return ( ( JSVariant ) pos ) . getBoxed ( ) . getAccessor ( "" ) ; else if ( pos instanceof JSField ) return ( ( JSField ) pos ) . getAccessor ( ) ; else return - 1 ; } | Resolve a symbolic name to an accessor |
25,752 | private JMFType findChild ( JMFType start , String segment ) { if ( start instanceof JSPrimitive || start instanceof JSDynamic || start instanceof JSEnum ) return null ; if ( segment . charAt ( 0 ) == '[' ) return findChildByIndex ( start , Integer . parseInt ( segment . substring ( 1 , segment . length ( ) - 1 ) ) ) ; if ( start instanceof JSVariant ) return findVariantChildByName ( ( JSVariant ) start , segment ) ; else return findTupleChildByName ( ( JSTuple ) start , segment ) ; } | called on it . |
25,753 | private JMFType findVariantChildByName ( JSVariant var , String name ) { for ( int i = 0 ; i < var . getCaseCount ( ) ; i ++ ) { JMFType theCase = getEffectiveType ( var . getCase ( i ) ) ; String caseName = theCase . getFeatureName ( ) ; if ( caseName != null && caseName . equals ( name ) ) return theCase ; } return null ; } | Find the child of a variant by name |
25,754 | private JMFType findTupleChildByName ( JSTuple tup , String name ) { for ( int i = 0 ; i < tup . getFieldCount ( ) ; i ++ ) { JMFType theField = getEffectiveType ( tup . getField ( i ) ) ; String fieldName = theField . getFeatureName ( ) ; if ( fieldName != null && fieldName . equals ( name ) ) return theField ; } return null ; } | Find the child of a tuple by name |
25,755 | public int getCaseIndex ( int accessor , String name ) { JMFFieldDef field = getFieldDef ( accessor ) ; if ( ! ( field instanceof JSVariant ) ) return - 1 ; JMFType target = findVariantChildByName ( ( JSVariant ) field , name ) ; if ( target != null ) return getEffectiveSiblingPosition ( target ) ; else return - 1 ; } | Resolve a case name to a case index |
25,756 | public String getPathName ( int accessor ) { JMFFieldDef field = getFieldDef ( accessor ) ; if ( field == null ) return null ; if ( field instanceof JSVariant && ( ( JSVariant ) field ) . getBoxed ( ) != null ) return null ; return getPathName ( field ) ; } | Return the most informative possible path name for an accessor |
25,757 | public String getPathName ( JMFType type ) { if ( type instanceof JSVariant ) { JMFType boxedBy = ( ( JSVariant ) type ) . getBoxedBy ( ) ; if ( boxedBy != null ) type = boxedBy ; } JMFType parent = type . getParent ( ) ; while ( parent instanceof JSRepeated ) parent = parent . getParent ( ) ; if ( parent == null ) return "" ; String prePath = getPathName ( parent ) ; if ( type instanceof JSRepeated ) return prePath ; String segment = type . getFeatureName ( ) ; if ( segment == null ) segment = "[" + getEffectiveSiblingPosition ( type ) + "]" ; if ( prePath . length ( ) > 0 ) return prePath + "/" + segment ; else return segment ; } | Return the most informative possible path name for a JMFType |
25,758 | private void initialize ( Map context ) { context . put ( jsTypeTree , this ) ; List tmpFields = new ArrayList ( ) ; List tmpVariants = new ArrayList ( ) ; number ( jsTypeTree , context , false , 0 , tmpFields , tmpVariants ) ; fields = ( JSField [ ] ) tmpFields . toArray ( new JSField [ 0 ] ) ; variants = ( JSVariant [ ] ) tmpVariants . toArray ( new JSVariant [ 0 ] ) ; int boxLen = 0 ; for ( int i = 0 ; i < fields . length ; i ++ ) if ( fields [ i ] instanceof JSVariant ) boxLen += ( ( JSVariant ) fields [ i ] ) . box ( context ) . getAccessorCount ( ) ; boxed = new int [ boxLen ] [ ] ; int boxIndex = 0 ; for ( int i = 0 ; i < fields . length ; i ++ ) if ( fields [ i ] instanceof JSVariant ) for ( int j = 0 ; j < ( ( JSVariant ) fields [ i ] ) . getBoxed ( ) . getAccessorCount ( ) ; j ++ ) boxed [ boxIndex ++ ] = new int [ ] { i , j } ; setAccessors ( 0 , this ) ; jsTypeTree . setMultiChoiceCount ( ) ; if ( serialForm == null ) { name = jsTypeTree . getFeatureName ( ) ; if ( name == null ) name = "" ; try { byte [ ] utfname = name . getBytes ( "UTF8" ) ; serialForm = new byte [ 2 + utfname . length + 2 + jsTypeTree . encodedTypeLength ( ) ] ; ArrayUtil . writeShort ( serialForm , 0 , ( short ) utfname . length ) ; System . arraycopy ( utfname , 0 , serialForm , 2 , utfname . length ) ; int limits [ ] = new int [ ] { 2 + utfname . length , serialForm . length } ; JSType . setCount ( serialForm , limits , version ) ; jsTypeTree . encodeType ( serialForm , limits ) ; } catch ( UnsupportedEncodingException e ) { FFDCFilter . processException ( e , "initialize" , "604" ) ; IllegalArgumentException ex = new IllegalArgumentException ( ) ; ex . initCause ( e ) ; throw ex ; } } schemaID = CryptoHash . hash ( serialForm ) ; schemaLongID = Long . valueOf ( schemaID ) ; } | calculates the multiChoiceCounts for each node in the tree . |
25,759 | private void setAccessors ( int bias , JMFSchema schema ) { int nextBoxBias = bias + fields . length + variants . length ; for ( int i = 0 ; i < fields . length ; i ++ ) { JSField field = fields [ i ] ; if ( field instanceof JSVariant ) { JSchema boxed = ( JSchema ) ( ( JSVariant ) field ) . getBoxed ( ) ; boxed . setAccessors ( nextBoxBias , schema ) ; JSVariant boxVar = ( JSVariant ) boxed . getJMFType ( ) ; field . setAccessor ( boxVar . getAccessor ( boxed ) , boxed ) ; field . setAccessor ( boxVar . getAccessor ( schema ) , schema ) ; ( ( JSVariant ) field ) . setBoxAccessor ( i + bias , schema ) ; nextBoxBias += boxed . getAccessorCount ( ) ; } else field . setAccessor ( i + bias , schema ) ; } for ( int i = 0 ; i < variants . length ; i ++ ) variants [ i ] . setAccessor ( i + bias + fields . length , schema ) ; } | permits retrieval of accessors relative to box schemas as well as the public schema . |
25,760 | protected String getBaseURL ( HttpServletRequest request ) { String reqPrefix = request . getRequestURL ( ) . toString ( ) ; String pathInfo = request . getPathInfo ( ) == null ? "" : request . getPathInfo ( ) ; if ( ! "/" . equals ( pathInfo ) || reqPrefix . endsWith ( "/" ) ) { StringBuilder sb = new StringBuilder ( ) ; URI uri = URI . create ( reqPrefix ) ; sb . append ( uri . getScheme ( ) ) . append ( "://" ) . append ( uri . getRawAuthority ( ) ) ; sb . append ( request . getContextPath ( ) ) ; reqPrefix = sb . toString ( ) ; } return reqPrefix ; } | Calculate the base URL based on the HttpServletRequest instance |
25,761 | public synchronized void postInvoke ( int id , EJSDeployedSupport s ) throws RemoteException { super . postInvoke ( id , s ) ; final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "postInvoke" ) ; } if ( ivSfFailoverClient != null ) { if ( ivContainerTx == null ) { ivContainerTx = container . getCurrentContainerTx ( ) ; } ContainerAS containerAS = ivContainerTx . getContainerAS ( ) ; if ( containerAS == null ) { if ( ivContainerTx . isBmtActive ( s . methodInfo ) ) { ivSfFailoverClient . stickyUOW ( beanId , true ) ; } else { ivSfFailoverClient . stickyUOW ( beanId , false ) ; } } else { if ( containerAS . isBmasActive ( s . methodInfo ) ) { ivSfFailoverClient . stickyUOW ( beanId , true ) ; } else { ivSfFailoverClient . stickyUOW ( beanId , false ) ; } } } if ( isTraceOn && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "postInvoke" ) ; } } | LIDB2018 - 1 - added method . |
25,762 | public static int copyWsByteBuffer ( WsByteBuffer src , WsByteBuffer dst , int amount ) { int amountCopied = amount ; int dstRemaining = dst . remaining ( ) ; int srcRemaining = src . remaining ( ) ; if ( amountCopied > dstRemaining ) amountCopied = dstRemaining ; if ( amountCopied > srcRemaining ) amountCopied = srcRemaining ; if ( amountCopied > 0 ) { int srcLimit = src . limit ( ) ; src . limit ( src . position ( ) + amountCopied ) ; dst . put ( src ) ; src . limit ( srcLimit ) ; } return amountCopied ; } | Copies up to amount bytes from src to dst . Returns the number of bytes actually copied . |
25,763 | public void processNack ( ControlNack nm ) throws SIResourceException { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "processNack" , nm ) ; long startstamp = nm . getStartTick ( ) ; long endstamp = nm . getEndTick ( ) ; synchronized ( this ) { iststream . setCursor ( startstamp ) ; boolean changed = false ; TickRange tr = iststream . getNext ( ) ; TickRange tr2 ; do { if ( tr . type == TickRange . Unknown ) { changed = true ; long maxStartstamp = max ( tr . startstamp , startstamp ) ; long minEndstamp = min ( tr . endstamp , endstamp ) ; upControl . sendNackMessage ( null , null , null , maxStartstamp , minEndstamp , priority , reliability , streamID ) ; } tr2 = tr ; tr = iststream . getNext ( ) ; } while ( ( tr . startstamp <= endstamp ) && ( tr2 != tr ) ) ; if ( changed ) { tr = new TickRange ( TickRange . Requested , startstamp , endstamp ) ; iststream . writeRange ( tr ) ; new ReqExpiryHandle ( tr ) ; } } if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "processNack" ) ; } | This method sends Nacks for any ticks within the range startstamp to endstamp which are in Unknown state Those in Requested should already be being satisfied |
25,764 | public void processAckExpected ( long stamp ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "processAckExpected" , new Object [ ] { new Long ( stamp ) } ) ; synchronized ( this ) { sendAck ( ) ; if ( stamp > iack ) { try { upControl . sendNackMessage ( null , null , null , iack + 1 , stamp , priority , reliability , streamID ) ; } catch ( SIResourceException e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.gd.InternalInputStream.processAckExpected" , "1:379:1.42" , this ) ; SibTr . exception ( tc , e ) ; SibTr . error ( tc , "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.gd.InternalInputStream" , "1:386:1.42" , e } ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "processAckExpected" , e ) ; throw new SIErrorException ( nls . getFormattedMessage ( "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.gd.InternalInputStream" , "1:397:1.42" , e } , null ) , e ) ; } } } if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "processAckExpected" ) ; } | This method will send an Ack up to the current aggregated Ack prefix and send a Nack for any ticks after this |
25,765 | public HttpRequestMessageImpl getRequest ( ) { HttpRequestMessageImpl req = ( HttpRequestMessageImpl ) this . reqPool . get ( ) ; if ( null == req ) { req = new HttpRequestMessageImpl ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "getRequest(): " + req ) ; } return req ; } | Retrieve an uninitialized request message . |
25,766 | public HttpRequestMessageImpl getRequest ( HttpInboundServiceContext hsc ) { HttpRequestMessageImpl req = getRequest ( ) ; req . init ( hsc ) ; return req ; } | Retrieve an incoming request object from the factory . |
25,767 | public HttpRequestMessageImpl getRequest ( HttpOutboundServiceContext hsc ) { HttpRequestMessageImpl req = getRequest ( ) ; req . init ( hsc ) ; return req ; } | Retrieve an outgoing request object from the factory . |
25,768 | public void releaseRequest ( HttpRequestMessageImpl request ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "releaseRequest: " + request ) ; } this . reqPool . put ( request ) ; } | Return a request object to the factory for pooling . |
25,769 | public HttpResponseMessageImpl getResponse ( ) { HttpResponseMessageImpl resp = ( HttpResponseMessageImpl ) this . respPool . get ( ) ; if ( null == resp ) { resp = new HttpResponseMessageImpl ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "getResponse(): " + resp ) ; } return resp ; } | Retrieve an uninitialized response message . |
25,770 | public HttpResponseMessageImpl getResponse ( HttpInboundServiceContext hsc ) { HttpResponseMessageImpl resp = getResponse ( ) ; resp . init ( hsc ) ; return resp ; } | Retrieve an outgoing response object from the factory . |
25,771 | public HttpResponseMessageImpl getResponse ( HttpOutboundServiceContext hsc ) { HttpResponseMessageImpl resp = getResponse ( ) ; resp . init ( hsc ) ; return resp ; } | Retrieve an incoming response object from the factory . |
25,772 | public void releaseResponse ( HttpResponseMessageImpl response ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "releaseResponse: " + response ) ; } this . respPool . put ( response ) ; } | Return a response object to the factory for pooling . |
25,773 | public void releaseTrailers ( HttpTrailersImpl h ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "releaseTrailers: " + h ) ; } this . hdrPool . put ( h ) ; } | Return a trailers object to the pool . |
25,774 | public void setStartUpWeight ( Integer weight ) { this . previousWeight = this . startUpWeight ; if ( weight != null ) { if ( weight . intValue ( ) >= 0 ) this . startUpWeight = weight ; else this . startUpWeight = DEFAULT_STARTUP ; } else { this . startUpWeight = DEFAULT_STARTUP ; } if ( this . context != null ) this . context . addToStartWeightList ( this ) ; } | Sets the startUpWeight . A null value is translated to the default weight . |
25,775 | public synchronized CommsServerByteBuffer allocate ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "allocate" ) ; CommsServerByteBuffer buff = ( CommsServerByteBuffer ) super . allocate ( ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "allocate" , buff ) ; return buff ; } | Gets a CommsString from the pool . Any CommsString returned will be initially null . |
25,776 | public static String getOption ( String key , boolean forceFormat , Object ... args ) { String option = options . getString ( key ) ; if ( forceFormat || args . length > 0 ) { return MessageFormat . format ( option , args ) ; } else { return option ; } } | get the string from options resource bundle . if forceFormat is set to true or args has value the code invokes MessageFormat . format method even args is not set . This is for processing double single quotes . Since NLS_MESSAGEFORMAT_ALL is set for options resource bundle every single quote character which needs to be treated as a single quote is escaped by another single quote . Otherwise MessageFormat . format method will treat a single quote as the beginning and ending of the quote . So all of the texts needs to be processed by MessageFormat no matter whether it has variables . |
25,777 | protected UIComponent createVerbatimComponentFromBodyContent ( ) { UIOutput verbatimComp = null ; if ( bodyContent != null ) { String strContent = bodyContent . getString ( ) ; if ( strContent != null ) { String trimmedContent = strContent . trim ( ) ; if ( trimmedContent . length ( ) > 0 && ! isComment ( strContent ) ) { verbatimComp = createVerbatimComponent ( ) ; verbatimComp . setValue ( strContent ) ; } } bodyContent . clearBody ( ) ; } return verbatimComp ; } | Creates a UIComponent from the BodyContent |
25,778 | protected void encodeBegin ( ) throws IOException { if ( log . isLoggable ( Level . FINE ) ) { log . fine ( "Entered encodeBegin for client-Id: " + _componentInstance . getClientId ( getFacesContext ( ) ) ) ; } _componentInstance . encodeBegin ( getFacesContext ( ) ) ; if ( log . isLoggable ( Level . FINE ) ) { log . fine ( "Exited encodeBegin" ) ; } } | Invoke encodeBegin on the associated UIComponent . Subclasses can override this method to perform custom processing before or after the UIComponent method invocation . |
25,779 | private void popTag ( ) { Stack < UIComponentClassicTagBase > stack = getStack ( pageContext ) ; int size = stack . size ( ) ; stack . remove ( size - 1 ) ; if ( size <= 1 ) { pageContext . removeAttribute ( COMPONENT_STACK_ATTR , PageContext . REQUEST_SCOPE ) ; } } | The pageContext s request scope map is used to hold a stack of JSP tag objects seen so far so that a new tag can find the parent tag that encloses it . Access to the parent tag is used to find the parent UIComponent for the component associated with this tag plus some other uses . |
25,780 | @ SuppressWarnings ( "unchecked" ) private void removeFormerFacets ( UIComponent component ) { List < String > formerFacetNames = ( List < String > ) component . getAttributes ( ) . get ( FORMER_FACET_NAMES_SET_ATTR ) ; if ( formerFacetNames != null ) { for ( String facetName : formerFacetNames ) { if ( _facetsAdded == null || ! _facetsAdded . contains ( facetName ) ) { component . getFacets ( ) . remove ( facetName ) ; } } if ( _facetsAdded == null ) { component . getAttributes ( ) . remove ( FORMER_FACET_NAMES_SET_ATTR ) ; } else { component . getAttributes ( ) . put ( FORMER_FACET_NAMES_SET_ATTR , _facetsAdded ) ; } } else { if ( _facetsAdded != null ) { component . getAttributes ( ) . put ( FORMER_FACET_NAMES_SET_ATTR , _facetsAdded ) ; } } } | See removeFormerChildren . |
25,781 | private boolean checkFacetNameOnParentExists ( UIComponentClassicTagBase parentTag , String facetName ) { return parentTag . _facetsAdded != null && parentTag . _facetsAdded . contains ( facetName ) ; } | check if the facet is already added to the parent |
25,782 | private void addFacetNameToParentTag ( UIComponentClassicTagBase parentTag , String facetName ) { if ( parentTag . _facetsAdded == null ) { parentTag . _facetsAdded = new ArrayList < String > ( ) ; } parentTag . _facetsAdded . add ( facetName ) ; } | Notify the enclosing JSP tag of the id of this facet s id . The parent tag will later delete any existing view facets that were not seen during this rendering phase ; see doEndTag for details . |
25,783 | public static String listCustom ( ) throws UnsupportedConfigurationException { String output = null ; if ( cms != null && ! cms . isEmpty ( ) ) { if ( cms . size ( ) != 1 ) { String message = composeMultipleCustomErrorMessage ( cms ) ; throw new UnsupportedConfigurationException ( message ) ; } output = CustomUtils . toJSON ( cms ) ; } return output ; } | Returns the list of custom password encryption if exists . This method only works under the command line utility environment . |
25,784 | public static byte [ ] decipher ( byte [ ] encrypted_bytes , String crypto_algorithm ) throws InvalidPasswordCipherException , UnsupportedCryptoAlgorithmException { if ( crypto_algorithm == null ) { logger . logp ( Level . SEVERE , PasswordCipherUtil . class . getName ( ) , "decipher" , "PASSWORDUTIL_UNKNOWN_ALGORITHM" , new Object [ ] { "null" , formatSupportedCryptoAlgorithms ( ) } ) ; throw new UnsupportedCryptoAlgorithmException ( ) ; } byte [ ] decrypted_bytes = null ; if ( AES . equalsIgnoreCase ( crypto_algorithm ) ) { decrypted_bytes = aesDecipher ( encrypted_bytes , decrypted_bytes ) ; } else if ( XOR . equalsIgnoreCase ( crypto_algorithm ) ) { decrypted_bytes = xor ( encrypted_bytes ) ; } else if ( HASH . equalsIgnoreCase ( crypto_algorithm ) ) { throw new InvalidPasswordCipherException ( MessageUtils . getMessage ( "PASSWORDUTIL_ERROR_UNSUPPORTED_OPERATION" , crypto_algorithm ) ) ; } else if ( CUSTOM . equalsIgnoreCase ( crypto_algorithm ) || crypto_algorithm . startsWith ( CUSTOM_COLON ) ) { CustomPasswordEncryption cpe = getCustomImpl ( ) ; if ( cpe != null ) { int index = crypto_algorithm . indexOf ( ':' ) ; String keyAlias = null ; if ( index != - 1 ) { keyAlias = crypto_algorithm . substring ( index + 1 ) ; } try { decrypted_bytes = cpe . decrypt ( new EncryptedInfo ( encrypted_bytes , keyAlias ) ) ; if ( logger . isLoggable ( Level . FINE ) ) logger . fine ( "Successfully decrypted password using custom encryption plug point." ) ; } catch ( Exception e ) { logger . logp ( Level . SEVERE , PasswordCipherUtil . class . getName ( ) , "decipher" , "PASSWORDUTIL_CUSTOM_DECRYPTION_ERROR" , e ) ; throw ( InvalidPasswordCipherException ) new InvalidPasswordCipherException ( e . getMessage ( ) ) . initCause ( e ) ; } } else { logger . logp ( Level . SEVERE , PasswordCipherUtil . class . getName ( ) , "decipher" , "PASSWORDUTIL_CUSTOM_SERVICE_DOES_NOT_EXIST" ) ; throw new UnsupportedCryptoAlgorithmException ( ) ; } } else { logger . logp ( Level . SEVERE , PasswordCipherUtil . class . getName ( ) , "decipher" , "PASSWORDUTIL_UNKNOWN_ALGORITHM" , new Object [ ] { crypto_algorithm , formatSupportedCryptoAlgorithms ( ) } ) ; throw new UnsupportedCryptoAlgorithmException ( ) ; } if ( decrypted_bytes == null ) { throw new InvalidPasswordCipherException ( "The output is null." ) ; } return decrypted_bytes ; } | Decipher the input password using the provided algorithm . |
25,785 | public static byte [ ] encipher ( byte [ ] decrypted_bytes , String crypto_algorithm ) throws InvalidPasswordCipherException , UnsupportedCryptoAlgorithmException { EncryptedInfo info = encipher_internal ( decrypted_bytes , crypto_algorithm , ( String ) null ) ; return info . getEncryptedBytes ( ) ; } | Encipher the raw password using the provided algorithm . |
25,786 | public String getRequiredConfigAttributeWithDefaultValueAndConfigId ( Map < String , Object > props , String key , String defaultValue , String configId ) { String result = getAndTrimConfigAttribute ( props , key ) ; if ( key != null && result == null ) { if ( defaultValue != null ) { result = defaultValue ; } else { logMessageForMissingRequiredAttribute ( key , configId ) ; } } return result ; } | Returns the value for the configuration attribute matching the key provided . If the value does not exist or is empty the provided default value will be returned . If the default value is also null an error message will be logged . |
25,787 | public static String toRelSec ( long baseNS , long actualNS , int pad ) { return toAbsSec ( actualNS - baseNS , pad ) ; } | Display the difference between two nano - seconds values as a decimal seconds value . |
25,788 | public static String toAbsSec ( long nano , int padLeft ) { if ( nano < 0 ) { return "-" + toAbsSec ( - 1 * nano , padLeft ) ; } else if ( nano == 0 ) { return PAD . substring ( 0 , padLeft ) + "." + PAD . substring ( PAD_RIGHT ) ; } String nanoText = Long . toString ( nano ) ; int nanoDigits = nanoText . length ( ) ; if ( nanoDigits > NANO_IN_ONE_DIGITS ) { int secDigits = nanoDigits - NANO_IN_ONE_DIGITS ; if ( secDigits >= padLeft ) { return nanoText . substring ( 0 , secDigits ) + "." + nanoText . substring ( secDigits , secDigits + PAD_RIGHT ) ; } else { int padDigits = padLeft - secDigits ; if ( padDigits > PAD_LEN ) { padDigits = PAD_LEN ; } return PAD . substring ( 0 , padDigits ) + nanoText . substring ( 0 , secDigits ) + "." + nanoText . substring ( secDigits , secDigits + PAD_RIGHT ) ; } } else if ( nanoDigits > ( NANO_IN_ONE_DIGITS - PAD_RIGHT ) ) { if ( padLeft > PAD_LEN ) { padLeft = PAD_LEN ; } int missingDigits = NANO_IN_ONE_DIGITS - nanoDigits ; return PAD . substring ( 0 , padLeft ) + "." + PAD . substring ( 0 , missingDigits ) + nanoText . substring ( 0 , PAD_RIGHT - missingDigits ) ; } else { if ( padLeft > PAD_LEN ) { padLeft = PAD_LEN ; } return PAD . substring ( 0 , padLeft ) + "." + PAD . substring ( PAD_RIGHT - 1 ) + "*" ; } } | Display a nano - seconds value as a decimal seconds value . |
25,789 | public void dispose ( ) { storeCache ( ) ; autoFeatures = null ; knownFeatures = null ; knownBadFeatures = null ; for ( SubsystemFeatureDefinitionImpl def : cachedFeatures . values ( ) ) { def . setProvisioningDetails ( null ) ; } } | Release all resources associated with the provisioning operation |
25,790 | public void storeCache ( ) { if ( cacheOk && cacheRes != null && isDirty ) { OutputStream out = null ; try { out = cacheRes . putStream ( ) ; PrintWriter writer = new PrintWriter ( new OutputStreamWriter ( out , "UTF-8" ) ) ; for ( SubsystemFeatureDefinitionImpl entry : cachedFeatures . values ( ) ) { ImmutableAttributes imAttrs = entry . getImmutableAttributes ( ) ; ProvisioningDetails provDetails = entry . getProvisioningDetails ( ) ; if ( imAttrs != null && provDetails != null ) { FeatureDefinitionUtils . writeAttributes ( imAttrs , provDetails , writer ) ; } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Unable to write out " + entry . getFeatureName ( ) + " to cache because the provisioning " + "detail: " + provDetails + " or imAttrs: " + imAttrs + " is null" ) ; } } } writer . write ( "@=" ) ; writer . write ( toFeatureNameList ( installedFeatures ) ) ; writer . write ( FeatureDefinitionUtils . NL ) ; writer . write ( "-@" ) ; writer . write ( toFeatureNameList ( configuredFeatures ) ) ; writer . write ( FeatureDefinitionUtils . NL ) ; writer . write ( "-#" ) ; writer . write ( configurationError ? '1' : '0' ) ; writer . write ( FeatureDefinitionUtils . NL ) ; for ( Map . Entry < File , BadFeature > entry : knownBadFeatures . entrySet ( ) ) { writer . write ( "XX" ) ; writeBadManifestEntry ( writer , entry . getKey ( ) , entry . getValue ( ) ) ; writer . write ( FeatureDefinitionUtils . NL ) ; } writer . flush ( ) ; writer . close ( ) ; isDirty = false ; } catch ( IOException e ) { cacheWarning ( e ) ; } finally { FeatureDefinitionUtils . tryToClose ( out ) ; } } } | Write the feature cache file |
25,791 | private Set < String > readFeatureNameList ( String line ) { String [ ] parts = FeatureDefinitionUtils . installedFeatureSplitPattern . split ( line ) ; return parts . length > 0 ? Collections . unmodifiableSet ( new HashSet < String > ( Arrays . asList ( parts ) ) ) : Collections . < String > emptySet ( ) ; } | Read the list of feature names from the cache string |
25,792 | public void setInstalledFeatures ( Set < String > newInstalledFeatures , Set < String > newConfiguredFeatures , boolean configurationError ) { Set < String > current = installedFeatures ; if ( ! current . equals ( newInstalledFeatures ) ) { isDirty = true ; } if ( newInstalledFeatures . isEmpty ( ) ) installedFeatures = Collections . emptySet ( ) ; else installedFeatures = Collections . unmodifiableSet ( new HashSet < String > ( newInstalledFeatures ) ) ; current = configuredFeatures ; if ( ! current . equals ( newConfiguredFeatures ) ) { isDirty = true ; } if ( newConfiguredFeatures . isEmpty ( ) ) configuredFeatures = Collections . emptySet ( ) ; else configuredFeatures = Collections . unmodifiableSet ( new HashSet < String > ( newConfiguredFeatures ) ) ; this . configurationError = configurationError ; } | Change the active list of installed features |
25,793 | public static String lowerFeature ( String inFeature ) { if ( inFeature == null || inFeature . isEmpty ( ) ) return inFeature ; int colonIndex = inFeature . indexOf ( ":" ) ; if ( colonIndex > - 1 && inFeature . length ( ) > colonIndex ) { return inFeature . substring ( 0 , colonIndex ) . trim ( ) + ':' + inFeature . substring ( colonIndex + 1 ) . trim ( ) . toLowerCase ( Locale . ENGLISH ) ; } else { return inFeature . toLowerCase ( Locale . ENGLISH ) . trim ( ) ; } } | Get feature name with product extension unchanged and the feature name converted to lower case . |
25,794 | public void removeInstalledFeature ( String feature ) { this . configurationError = true ; HashSet < String > newInstalledFeatures = new HashSet < > ( installedFeatures ) ; if ( newInstalledFeatures . remove ( feature ) ) { installedFeatures = newInstalledFeatures . isEmpty ( ) ? Collections . < String > emptySet ( ) : Collections . unmodifiableSet ( newInstalledFeatures ) ; } } | Remove an installed feature from the list . This is intended to be used to remove features that failed during bundle resolution because of java version restrictions . |
25,795 | public WebTarget target ( UriBuilder builder ) { checkClosed ( ) ; WebTargetImpl wt = ( WebTargetImpl ) super . target ( builder ) ; JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean ( ) ; URI uri = builder . build ( ) ; bean . setAddress ( uri . toString ( ) ) ; WebClient targetClient = bean . createWebClient ( ) ; ClientConfiguration ccfg = WebClient . getConfig ( targetClient ) ; ccfg . getOutInterceptors ( ) . add ( new LibertyJaxRsClientConfigInterceptor ( Phase . PRE_LOGICAL ) ) ; ccfg . getOutInterceptors ( ) . add ( new LibertyJaxRsClientProxyInterceptor ( Phase . PRE_LOGICAL ) ) ; ccfg . getOutInterceptors ( ) . add ( new LibertyJaxRsClientLtpaInterceptor ( ) ) ; ccfg . getOutInterceptors ( ) . add ( new LibertyJaxRsClientOAuthInterceptor ( ) ) ; ccfg . getOutInterceptors ( ) . add ( new PropagationHandler ( ) ) ; if ( hasSSLConfigInfo == false ) { LibertyJaxRsClientSSLOutInterceptor sslOutInterceptor = new LibertyJaxRsClientSSLOutInterceptor ( Phase . PRE_LOGICAL ) ; sslOutInterceptor . setTLSConfiguration ( secConfig ) ; ccfg . getOutInterceptors ( ) . add ( sslOutInterceptor ) ; } LibertyApplicationBus bus ; String moduleName = getModuleName ( ) ; String id = moduleName + uri . getHost ( ) + "-" + uri . getPort ( ) ; synchronized ( busCache ) { bus = busCache . get ( id ) ; if ( bus == null ) { bus = LibertyJAXRSClientBusFactory . getInstance ( ) . getClientScopeBus ( id ) ; busCache . put ( id , bus ) ; } } ccfg . setBus ( bus ) ; synchronized ( baseClients ) { baseClients . add ( targetClient ) ; } return new WebTargetImpl ( wt . getUriBuilder ( ) , wt . getConfiguration ( ) , targetClient ) ; } | override this method then put our webclient into cxf client API |
25,796 | public void close ( ) { if ( closed . compareAndSet ( false , true ) ) { super . close ( ) ; synchronized ( baseClients ) { for ( WebClient wc : baseClients ) { wc . close ( ) ; } } String moduleName = getModuleName ( ) ; synchronized ( clientsPerModule ) { List < JAXRSClientImpl > clients = clientsPerModule . get ( moduleName ) ; if ( clients != null ) { clients . remove ( this ) ; if ( clients . isEmpty ( ) ) { for ( String id : busCache . keySet ( ) ) { if ( id . startsWith ( moduleName ) || id . startsWith ( "unknown:" ) ) { busCache . remove ( id ) . shutdown ( false ) ; } } clientsPerModule . remove ( moduleName ) ; } } } baseClients = null ; } } | make the cxf ClientImpl . close works and we should close all clients too |
25,797 | public SocketIOChannel createOutboundSocketIOChannel ( ) throws IOException { SocketChannel channel = SocketChannel . open ( ) ; Socket socket = channel . socket ( ) ; return NioSocketIOChannel . createIOChannel ( socket , this ) ; } | LIDB3618 - 2 add method |
25,798 | public static void displayChannels ( TraceComponent logger , ChannelFramework cfw , String message , String prefix ) { if ( logger . isDebugEnabled ( ) ) { chTrace . traceChannels ( logger , cfw , message , prefix ) ; } } | Print channel configuration - for debug . |
25,799 | protected void debugTrace ( Object logTool , String msg , Object ... parameters ) { Tr . debug ( ( TraceComponent ) logTool , msg , parameters ) ; } | Debug trace using either Tr or Logger |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.