idx
int64
0
41.2k
question
stringlengths
73
5.81k
target
stringlengths
5
918
25,300
private AppMessageHelper getAppMessageHelper ( String type , String fileName ) { if ( type == null && fileName != null ) { String [ ] parts = fileName . split ( "[\\\\/]" ) ; if ( parts . length > 0 ) { String last = parts [ parts . length - 1 ] ; int dot = last . indexOf ( '.' ) ; type = dot >= 0 ? last . substring ( ...
Returns the message helper for the specified application handler type .
25,301
private void startApplication ( File currentFile , String type ) { if ( _tc . isEventEnabled ( ) ) { Tr . event ( _tc , "Starting dropin application '" + currentFile . getName ( ) + "'" ) ; } String filePath = getAppLocation ( currentFile ) ; try { Configuration config = _configs . get ( filePath ) ; if ( config == nul...
Takes a file and an optional file type and updates the file . If no type is given it will use the extension of the file given .
25,302
private static void populateInterceptorMethodMap ( Class < ? > c , LinkedList < Class < ? > > lifoClasses , InterceptorMethodKind kind , Class < ? > [ ] parmTypes , List < ? extends InterceptorCallback > methodMetaDataList , Map < InterceptorMethodKind , List < Method > > methodMap , boolean ejbClass , J2EEName name ) ...
Populate the interceptor map for an EJB or interceptor class . Each mapping value is a List of Methods ordered by class hierarchy with methods from java . lang . Object appearing first which is the order required by the EJB specification .
25,303
public static LinkedList < Method > getLIFOMethodList ( List < Method > methodList , LinkedList < Class < ? > > lifoSuperClassesList ) { LinkedList < Method > sortedList = new LinkedList < Method > ( ) ; for ( Class < ? > c : lifoSuperClassesList ) { if ( methodList . isEmpty ( ) ) { break ; } Iterator < Method > it = ...
Sorts a specified Method object list into a LIFO list where the first out is the Method object of the most generic super class of an interceptor class and the last out is a method of the interceptor class itself .
25,304
public static Method findMethod ( final Class < ? > c , String methodName , final Class < ? > [ ] parmTypes ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "findMethod" , new Object [ ] { c , methodName , Arrays . toString ( parmTypes ) } ) ; } Class < ? > classObject ...
Returns a Method object that reflects the specified method of a specified EJB or interceptor class . The methodName parameter is a String that specifies the simple name of the desired method and the parameterTypes parameter is an array of Class objects that identify the method s formal parameter types in the declared o...
25,305
public static LinkedList < Class < ? > > getLIFOSuperClassesList ( Class < ? > interceptorClass ) { LinkedList < Class < ? > > supers = new LinkedList < Class < ? > > ( ) ; supers . addFirst ( interceptorClass ) ; Class < ? > interceptorSuperClass = interceptorClass . getSuperclass ( ) ; while ( interceptorSuperClass !...
Create a LIFO LinkedList of Class objects starting with a specified interceptor class object itself and then each of its the super classes . A LIFO is used so that the interceptor methods in the most general superclass are invoked first as required by the EJB specification .
25,306
public static void validateAroundSignature ( InterceptorMethodKind kind , Method m , J2EEName name ) throws EJBConfigurationException { int mod = m . getModifiers ( ) ; if ( Modifier . isFinal ( mod ) || Modifier . isStatic ( mod ) ) { String method = m . toGenericString ( ) ; Tr . error ( tc , "INVALID_INTERCEPTOR_MET...
Verify a specified AroundInvoke interceptor method has correct method modifiers and signature .
25,307
static void validateLifeCycleSignatureExceptParameters ( InterceptorMethodKind kind , String lifeCycle , Method m , boolean ejbClass , J2EEName name , boolean isInterceptor1_2 ) throws EJBConfigurationException { if ( kind == InterceptorMethodKind . AROUND_CONSTRUCT && ejbClass ) { String method = m . toGenericString (...
Method for unittesting only
25,308
public static boolean isMethodOverridden ( Method m , LinkedList < Class < ? > > supers ) { int methodModifier = m . getModifiers ( ) ; if ( ! Modifier . isPrivate ( methodModifier ) ) { int startIndex = supers . indexOf ( m . getDeclaringClass ( ) ) + 1 ; if ( startIndex < supers . size ( ) ) { String name = m . getNa...
d469514 - added entire method .
25,309
protected static ReturnCode createExtractor ( ) { if ( ! extractorCreated ) { createExtractor_rc = SelfExtractor . buildInstance ( ) ; extractor = SelfExtractor . getInstance ( ) ; extractorCreated = true ; } return createExtractor_rc ; }
ok to call this before doMain from subclass main
25,310
private void expectedByte ( int position , int count ) throws UTFDataFormatException { String msg = JspCoreException . getMsg ( "jsp.error.xml.expectedByte" , new Object [ ] { Integer . toString ( position ) , Integer . toString ( count ) } ) ; throw new UTFDataFormatException ( msg ) ; }
Throws an exception for expected byte .
25,311
private void invalidByte ( int position , int count , int c ) throws UTFDataFormatException { String msg = JspCoreException . getMsg ( "jsp.error.xml.invalidByte" , new Object [ ] { Integer . toString ( position ) , Integer . toString ( count ) } ) ; throw new UTFDataFormatException ( msg ) ; }
Throws an exception for invalid byte .
25,312
private void invalidSurrogate ( int uuuuu ) throws UTFDataFormatException { String msg = JspCoreException . getMsg ( "jsp.error.xml.invalidHighSurrogate" , new Object [ ] { Integer . toHexString ( uuuuu ) } ) ; throw new UTFDataFormatException ( msg ) ; }
Throws an exception for invalid surrogate bits .
25,313
public void alarm ( Object context ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "alarm" , context ) ; btmLockManager . lock ( ) ; boolean btmLocked = true ; timeoutLockManager . lockExclusive ( ) ; boolean timeoutLocked = true ; try { if ( ! timedout . isEmp...
The group alarm call . The context on this call will be null .
25,314
private void restartEntries ( List timedout ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "restartEntries" , new Object [ ] { timedout } ) ; Iterator itr = timedout . iterator ( ) ; while ( itr . hasNext ( ) ) { BatchedTimeoutEntry bte = ( BatchedTimeoutEntry ) itr ...
Restart alarms for a a list of BTEs
25,315
public void startTimer ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "startTimer" ) ; btmLockManager . lockExclusive ( ) ; try { if ( isStopped ) { isStopped = false ; LinkedListEntry entry = ( LinkedListEntry ) activeEntries . getFirst ( ) ; while ( entry != null...
Start the BatchedTimeoutManager
25,316
private void startNewAlarm ( LinkedListEntry entry ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "startNewAlarm" , new Object [ ] { entry } ) ; entry . alarm = am . create ( delta , percentLate , this , entry ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc ....
Start a new alarm for a given entry in the active list .
25,317
public void stopTimer ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "stopTimer" ) ; btmLockManager . lockExclusive ( ) ; try { if ( ! isStopped ) { isStopped = true ; LinkedListEntry entry = ( LinkedListEntry ) activeEntries . getFirst ( ) ; while ( entry != null ...
Stop the BatchedTimeoutManager
25,318
public void close ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "close" ) ; btmLockManager . lockExclusive ( ) ; try { stopTimer ( ) ; activeEntries = null ; } finally { btmLockManager . unlockExclusive ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc ....
Method to close this timer forever
25,319
public synchronized void setCache ( RemoteListCache cache ) { if ( cache != null && ( this . cache == null || ! this . cache . isComplete ( ) ) ) { this . cache = cache ; } }
sets cache for the query result on this instance
25,320
public Object decode ( byte [ ] frame , int offset , int indirect , JMFMessageData msg ) throws JMFMessageCorruptionException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) JmfTr . entry ( this , tc , "decode" , new Object [ ] { frame , offset , indirect , msg } ) ; Object result = null ; ...
Implement JSCoder . decode
25,321
public static void sanityCheck ( int length , byte [ ] frame , int offset ) throws JMFMessageCorruptionException { if ( length < 0 || offset + 4 + length > frame . length ) { JMFMessageCorruptionException jmce = new JMFMessageCorruptionException ( "Bad length: " + HexUtil . toString ( new int [ ] { length } ) + " at of...
A method to sanity check a 32 bit length value read from the message prior to allocating storage based on the value . The length is not allowed to be negative or to exceed the length of the remaining portion of the message s frame assuming that the length field is immediately followed by the data whose length it is .
25,322
public static FilterPredicate areEqual ( FilterableAttribute attribute , Object value ) { FilterPredicate pred = new FilterPredicate ( ) ; pred . attribute = attribute ; Class < ? > requiredType = attribute . getType ( ) ; if ( ! requiredType . isInstance ( value ) ) { throw new IllegalArgumentException ( "The value mu...
Create a predicate specifying that the value of the specified attribute must exactly match the supplied value . The value must also be the type specified by the FilterableAttribute
25,323
private static String getString ( Object value ) { if ( ! ( value instanceof Enum ) ) { return value . toString ( ) ; } Method method = null ; try { method = value . getClass ( ) . getMethod ( "getValue" ) ; } catch ( NoSuchMethodException e ) { } catch ( SecurityException e ) { } if ( method != null && method . getRet...
From the value object find the field name that will be filtered on which is a effectively a key into a JSON object . This will generally be the result of calling toString on the object but for enums there maybe a getValue method which be used instead .
25,324
void rollbackResources ( ) { final boolean traceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( traceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "rollbackResources" , this ) ; distributeEnd ( XAResource . TMFAIL ) ; _outcome = false ; _retryRequired = distributeOutcome ( ) ; if ( traceOn && tc . isEntryEnabl...
Rollback all resources but do not drive state changes . Used when transaction HAS TIMED OUT . This will not start a retry thread
25,325
public void init ( UpgradeInputByteBufferUtil input ) { this . _inBuffer = input ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "init upgrade input" ) ; } }
this . in defined in SRTInputStream
25,326
public void addDiscoveredBda ( ArchiveType moduleType , WebSphereBeanDeploymentArchive bda ) throws CDIException { webSphereCDIDeployment . addBeanDeploymentArchive ( bda ) ; Set < WebSphereBeanDeploymentArchive > bdaSet = bdasByType . get ( moduleType ) ; if ( bdaSet != null ) { bdaSet . add ( bda ) ; } else { if ( tc...
Registers a newly discovered BDA and adds it to the deployment
25,327
public void makeCrossBoundaryWiring ( ) throws CDIException { Collection < WebSphereBeanDeploymentArchive > sharedLibs = bdasByType . get ( ArchiveType . SHARED_LIB ) ; Collection < WebSphereBeanDeploymentArchive > earLibs = bdasByType . get ( ArchiveType . EAR_LIB ) ; Collection < WebSphereBeanDeploymentArchive > rarM...
The method should be called last to wire all libraries and modules
25,328
private void wireBdas ( Collection < WebSphereBeanDeploymentArchive > wireFromBdas , Collection < WebSphereBeanDeploymentArchive > wireToBdas ) { for ( WebSphereBeanDeploymentArchive wireFromBda : wireFromBdas ) { Collection < BeanDeploymentArchive > accessibleBdas = wireFromBda . getBeanDeploymentArchives ( ) ; for ( ...
Make a wire from the group of bdas to a set of destination bdas
25,329
public static String dumpString ( byte [ ] frame , int offset , int length ) { return dumpString ( frame , offset , length , false ) ; }
Create a formatted dump of a sequence of bytes
25,330
public static String dumpString ( byte [ ] frame , int offset , int length , boolean ascii ) { if ( ( frame == null ) || ( length == 0 ) ) return null ; StringBuffer buf = new StringBuffer ( ) ; StringBuffer asciibuf = new StringBuffer ( ) ; buf . append ( "Length=" ) . append ( length ) ; for ( int i = 0 ; i < length ...
Create a formatted dump of a sequence of bytes with ascii translation if specified . Performs simple ascii translation . No DBCS translations .
25,331
public static void main ( String [ ] args ) { System . err . println ( toString ( new int [ ] { Integer . parseInt ( args [ 0 ] ) } ) ) ; }
A trivial int - to - hex converter
25,332
protected void traceJobStart ( String jobXMLName , Properties jobParameters ) { if ( logger . isLoggable ( Level . FINE ) ) { StringWriter jobParameterWriter = new StringWriter ( ) ; if ( jobParameters != null ) { try { jobParameters . store ( jobParameterWriter , "Job parameters on start: " ) ; } catch ( IOException e...
Trace job submission ..
25,333
protected void traceJobXML ( String jobXML ) { if ( logger . isLoggable ( Level . FINE ) ) { int concatLen = jobXML . length ( ) > 200 ? 200 : jobXML . length ( ) ; logger . fine ( "Starting job: " + jobXML . substring ( 0 , concatLen ) + "... truncated ..." ) ; } }
Trace job xml file ..
25,334
private String getMIMEType ( String path ) { String extension = getFileExtension ( path ) ; if ( extension == null ) { return FILE_TRANSFER_BINARY_MIME ; } if ( "zip" . equals ( extension ) || "ear" . equals ( extension ) || "war" . equals ( extension ) || "jar" . equals ( extension ) || "eba" . equals ( extension ) ) ...
Get the MIME type for the given path
25,335
private static String getFileExtension ( String path ) { int index = path . lastIndexOf ( '.' ) ; if ( index == - 1 ) { return null ; } return path . substring ( index + 1 ) . toLowerCase ( Locale . ENGLISH ) ; }
returns lower cased extension
25,336
private synchronized FileServiceMXBean getFileService ( ) { if ( fileService == null ) { try { fileService = JMX . newMXBeanProxy ( ManagementFactory . getPlatformMBeanServer ( ) , new ObjectName ( FileServiceMXBean . OBJECT_NAME ) , FileServiceMXBean . class ) ; } catch ( MalformedObjectNameException e ) { throw Error...
File Service MXBean
25,337
public String getWritableLocation ( ) { String writableLocation = getWsLocationAdmin ( ) . resolveString ( "${server.output.dir}/workarea/" + UUID . randomUUID ( ) + "/" ) ; if ( writableLocation == null ) { IOException ioe = new IOException ( TraceNLS . getFormattedMessage ( this . getClass ( ) , APIConstants . TRACE_...
Return a unique directory within the workarea directory
25,338
public static String getFilename ( String path ) { final int index = path != null ? path . lastIndexOf ( "/" ) : - 1 ; if ( index == - 1 ) { IOException ioe = new IOException ( TraceNLS . getFormattedMessage ( FileTransferHelper . class , APIConstants . TRACE_BUNDLE_FILE_TRANSFER , "PATH_NOT_VALID" , new String [ ] { p...
Get the filename from a given path
25,339
public void internalConsumeMessages ( final LockedMessageEnumeration lockedMessages , final AsynchDispatchScheduler asynchDispatchScheduler ) { final String methodName = "internalConsumeMessages" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName ...
The consumeMessages method is invoked by the message processor with an enumeration containing one or more messages locked to this consumer . The consumeMessages method will either call the internalConsumeMessage method directly or if XD wishes to suspend the processing this method will be called then XD decides to resu...
25,340
protected void processCachedMessage ( SIBusMessage message , LockedMessageEnumeration lockedMessages ) throws SISessionDroppedException , SIConnectionDroppedException , SISessionUnavailableException , SIConnectionUnavailableException , SIConnectionLostException , SILimitExceededException , SIMessageNotLockedException ,...
Perform any processing on a message that is required whilst creating the cached locked message enumeration .
25,341
int getMaxActiveMessages ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { final String methodName = "getMaxActiveMessages" ; SibTr . entry ( this , TRACE , methodName ) ; } int maxActiveMsgs = _strictMessageOrdering ? 1 : 0 ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . ...
Returns the maximum number of active messages that should be associated with this listener at any one time .
25,342
long getMessageLockExpiry ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { final String methodName = "getMessageLockExpiry" ; SibTr . entry ( this , TRACE , methodName ) ; SibTr . exit ( this , TRACE , methodName , "0" ) ; } return 0 ; }
Returns the expiry time for message locks .
25,343
protected static LogRecord getUserLogRecord ( java . io . DataInputStream dataInputStream , ObjectManagerState objectManagerState ) throws ObjectManagerException { final String methodName = "getUserLogRecord" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( cclass , methodName , ...
Recover a user defined Log Record from a DataInputStream
25,344
protected boolean atStart ( ) { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "atStart" ) ; boolean atStartOfLogRecord = ( bufferCursor == 0 ) && ( bufferByteCursor == 0 ) ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( thi...
Indicates whether the buffer cursors are positioned at the start of the LogRecord buffers indicating that no logBuffers have been filled yet .
25,345
protected ObjectManagerByteArrayOutputStream [ ] getBuffers ( ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "getBuffers" ) ; ObjectManagerByteArrayOutputStream serializedLogRecord = serialize ( this ) ; ObjectManagerByteArrayOutp...
Gives back the serialized LogRecord as arrays of bytes . Unless overriden this simply serializes the Log Record .
25,346
protected ObjectManagerByteArrayOutputStream serialize ( java . io . Serializable serializableObject ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "serialize" , new Object [ ] { serializableObject } ) ; ObjectManagerByteArrayOutp...
Serialize s an Object by turning it into an array of bytes .
25,347
protected static Object deserialize ( byte [ ] objectBytes , ObjectManagerState objectManagerState ) throws ObjectManagerException { final String methodName = "deserialize" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( cclass , methodName , new Object [ ] { objectBytes , objec...
Turns a serialized Object from an array of bytes back into an object .
25,348
public final int getTransactionTimeout ( ) throws XAException { if ( ivManagedConnection . _mcStale ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "MC is stale throwing XAER_RMFAIL" , ivManagedConnection ) ; Tr . error ( tc , "INVALID_CONNECTION" ) ; throw new XA...
Obtain the current transaction timeout value set for this XAResource instance . If XAResource . setTransactionTimeout was not use prior to invoking this method the return value is the default timeout set for the resource manager ; otherwise the value used in the previous setTransactionTimeout call is returned .
25,349
public < T > ConfigBuilder withConverter ( Class < T > type , int priority , Converter < T > converter ) { synchronized ( this ) { UserConverter < ? > userConverter = UserConverter . newInstance ( type , priority , converter ) ; addUserConverter ( userConverter ) ; } return this ; }
new api method for 1 . 2
25,350
public static final JmsSharedUtils getSharedUtils ( ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tcInt . isEntryEnabled ( ) ) SibTr . entry ( tcInt , "getSharedUtils" ) ; if ( jsuInstance == null ) { try { Class cls = Class . forName ( "com.ibm.ws.sib.api.jms.impl.JmsSharedUtilsImpl" ) ; jsu...
Used to obtain the singleton instance of the JmsSharedUtils interface .
25,351
final void close ( ) { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "close : " + ivArchivePuId , this ) ; if ( ivEMFMap != null ) { synchronized ( ivEMFMap ) { ivCreateEMFAllowed = false ; } } synchronized ( ivEMPoolMap ) { if ( isTra...
Close the entity manager factory if it exists and is in open state per JPA Spec section 5 . 8 . 1 .
25,352
private final boolean classNeedsTransform ( String className ) { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "classNeedsTransform : PUID = " + ivArchivePuId + ", class name = " + className ) ; } boolean rtnVal = true ; for ( Patter...
Determine if the input class needs persistence provider class transformation using a pre - defined regular expression filter .
25,353
public void copyMessageToExceptionDestination ( LocalTransaction tran ) throws SINotPossibleInCurrentConfigurationException , SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "copyMessageToExceptionDestination" , tran ) ; SIMPMessage msg = getSIMPMess...
Copy the message to the exception destination
25,354
public static final boolean isSafe ( Method meth ) { String fullyQualifiedName = new StringBuilder ( ) . append ( meth . getDeclaringClass ( ) . getName ( ) ) . append ( '.' ) . append ( meth . getName ( ) ) . toString ( ) ; return ! unsafeMethods . contains ( meth . getName ( ) ) && ! unsafeMethods . contains ( fullyQ...
Determines whether it is safe based on the method name to invoke the method on behalf of a dynamic proxy for a JDBC wrapper .
25,355
static boolean isSafeReturnType ( Class < ? > type ) { return ! ConnectionPoolDataSource . class . isAssignableFrom ( type ) && ! CommonDataSource . class . isAssignableFrom ( type ) && ! XADataSource . class . isAssignableFrom ( type ) && ! DataSource . class . isAssignableFrom ( type ) && ! PooledConnection . class ....
Determine whether it is safe to return the result of an operation performed by the underlying implementation from a dynamic JDBC wrapper .
25,356
public synchronized void reset ( ) { final String methodName = "reset()" ; this . currentDataGB = 1 ; if ( this . currentDependencyIdGB > 0 ) { this . currentDependencyIdGB = 1 ; } if ( this . currentTemplateGB > 0 ) { this . currentTemplateGB = 1 ; } if ( this . diskCacheSizeInGBLimit > 0 ) { this . diskCacheSizeInByt...
Call this method to reset the disk cache size info after disk clear
25,357
public void setChainStartRetryInterval ( Object value ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Setting chain start retry interval [" + value + "]" ) ; } try { long num = MetatypeUtils . parseLong ( PROPERTY_CONFIG_ALIAS , PROPERTY_CHAIN_START_RETRY_INTERVAL , v...
Setter method for the interval of time between chain restart attempts .
25,358
public void setChainStartRetryAttempts ( Object value ) throws NumberFormatException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Setting chain start retry attempts [" + value + "]" ) ; } try { int num = MetatypeUtils . parseInteger ( PROPERTY_CONFIG_ALIAS , PROPERTY...
Setter method for the number of chain restart attempts .
25,359
public void setDefaultChainQuiesceTimeout ( Object value ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Setting default chain quiesce timeout [" + value + "]" ) ; } try { long num = MetatypeUtils . parseLong ( PROPERTY_CONFIG_ALIAS , PROPERTY_CHAIN_QUIESCETIMEOUT , v...
Set the default chain quiesce timeout property from config .
25,360
public void setMissingConfigWarning ( Object value ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Setting missing config warning delay to [" + value + "]" ) ; } try { long num = MetatypeUtils . parseLong ( PROPERTY_CONFIG_ALIAS , PROPERTY_MISSING_CONFIG_WARNING , val...
Set the custom property for the delay before warning about missing configuration values .
25,361
public static String stringForMap ( Map < Object , Object > map ) { StringBuilder sbOutput = new StringBuilder ( ) ; if ( map == null ) { sbOutput . append ( "\tNULL" ) ; } else { for ( Entry < Object , Object > entry : map . entrySet ( ) ) { sbOutput . append ( '\t' ) . append ( entry ) . append ( '\n' ) ; } } return ...
Utility method to extract a string representing the contents of a map . This is currently used by various methods as part of debug tracing .
25,362
public synchronized ChannelFactoryDataImpl findOrCreateChannelFactoryData ( Class < ? > type ) throws ChannelFactoryException { ChannelFactoryDataImpl cfd = channelFactories . get ( type ) ; if ( cfd == null ) { ChannelFactory cf = getChannelFactoryInternal ( type , false ) ; Class < ? > [ ] deviceInf = null ; Class < ...
is needed outside of this package .
25,363
public synchronized ChannelFactory getChannelFactoryInternal ( Class < ? > type , boolean isPersistent ) throws ChannelFactoryException { if ( type == null ) { throw new InvalidChannelFactoryException ( "ChannelFactory type is null" ) ; } ChannelFactory factory = null ; ChannelFactoryDataImpl cfd = null ; try { cfd = c...
This method will do the real work of accessing a channel factory . Note multiple methods in this class call into this method some of which are synchronized . According to the input parameters the factory that is returned may or may not be persisted in the framework . In some cases like simple channel adds there is no n...
25,364
private ChannelData addChannelInternal ( String channelName , Class < ? > factoryType , Map < Object , Object > inputPropertyBag , int weight ) throws ChannelException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "addChannelInternal: channelName=" + channelName + ", f...
This method does the work of adding a channel data object to the framework . It is called internally by both the addInbound and addOutbound channel methods .
25,365
private void updateRunningChannels ( ChannelDataImpl channelData ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "updateRunningChannels" ) ; } Channel channel = null ; ChannelContainer channelContainer = null ; Iterator < ChildChannelDataImpl > children = channelData ....
Update all running channels using the input channel data .
25,366
private boolean initChannelInChain ( Channel channel , Chain chain ) throws ChannelException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "initChannelInChain" ) ; } String channelName = channel . getName ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDe...
This method won t actually call the init method of the channel implemenation unless the channel is uninitialized . If the channel doesn t exist in the runtime yet it will be put in here . The channel in the runtime will then be updated with a reference to the input chain . This method is invoked from the chain implemen...
25,367
private boolean startChannelInChain ( Channel targetChannel , Chain chain ) throws ChannelException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "startChannelInChain" ) ; } String channelName = targetChannel . getName ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ...
Start the input channel . While it isn t needed yet the chain from which the start is coming from is in the parameter list . This method will only be called from the chain implementation . Regardless of what chains are referenced by the channel if the state is initialized or quiesced then the channel will be started .
25,368
private boolean disableChannelInChain ( Channel targetChannel , Chain chain ) throws ChannelException , ChainException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "disableChannelInChain" ) ; } String channelName = targetChannel . getName ( ) ; if ( TraceComponent . i...
This method is done in preparation for stopping a channel . It pull s its discriminator from the device side channel s discrimination process in the chain .
25,369
private synchronized void removeChainInternal ( ChainData chaindata ) { String chainName = chaindata . getName ( ) ; ChainData [ ] chains = null ; for ( String groupName : chainGroups . keySet ( ) ) { chains = chainGroups . get ( groupName ) . getChains ( ) ; int j = 0 ; for ( ; j < chains . length ; j ++ ) { if ( chai...
Remove the chain from the framework and disconnect it from any groups that contain it .
25,370
private void cleanChildRefsInParent ( ChannelData channelDataArray [ ] , boolean childrenNew [ ] ) { ChildChannelDataImpl child = null ; for ( int i = 0 ; i < channelDataArray . length ; i ++ ) { if ( childrenNew [ i ] == true ) { child = ( ChildChannelDataImpl ) channelDataArray [ i ] ; child . getParent ( ) . removeC...
This is a helper function . The same logic needs to be done in multiple places so this method was written to break it out . It will be called in times when an exception occurred during the construction of a chain . It cleans up some of the objects that were lined up ahead of time .
25,371
public synchronized void destroyChainInternal ( Chain chain ) throws ChannelException , ChainException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "destroyChainInternal: " + chain . getName ( ) ) ; } if ( RuntimeState . INITIALIZED . equals ( chain . getState ( ) ) )...
This method destroys both inbound and outbound chains ..
25,372
protected void retryChainStart ( ChainData chainData , Exception e ) { FFDCFilter . processException ( e , getClass ( ) . getName ( ) + ".retryChainStart" , "3470" , this , new Object [ ] { chainData } ) ; Tr . error ( tc , "chain.retrystart.error" , new Object [ ] { chainData . getName ( ) , Integer . valueOf ( 1 ) } ...
This method is called when an initial attempt to start a chain has failed due to a particular type of exception RetryableChannelException indicating that a retry may enable the chain to be started . This could result from something like a device side channel having bind problems since a socket from a previous chain sto...
25,373
public synchronized Chain getRunningChain ( String chainName ) { Chain chain = null ; if ( null != chainName ) { chain = this . chainRunningMap . get ( chainName ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "getRunningChain: " + chainName + " found=" + ( null != c...
Fetch the input chain from the runtime .
25,374
public synchronized Channel getRunningChannel ( String inputChannelName , Chain chain ) { if ( inputChannelName == null || chain == null ) { return null ; } Channel channel = null ; if ( null != this . chainRunningMap . get ( chain . getName ( ) ) ) { ChannelData [ ] channels = chain . getChannelsData ( ) ; for ( int i...
Fetch the input channel from the runtime .
25,375
public synchronized RuntimeState getChannelState ( String channelName , Chain chain ) { RuntimeState state = null ; Channel channel = getRunningChannel ( channelName , chain ) ; if ( channel != null ) { ChannelContainer channelContainer = this . channelRunningMap . get ( channel . getName ( ) ) ; if ( null != channelCo...
Return the state of the input runtime channel .
25,376
private synchronized void setChannelState ( String channelName , RuntimeState state ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "setChannelState channelName=" + channelName + ", state=" + state . ordinal ) ; } if ( null != channelName ) { ChannelContainer channelCo...
Set the channel state of a given channel .
25,377
public synchronized boolean doesChannelReferenceChain ( String channelName , String chainName ) { boolean foundRef = false ; Chain chain = this . chainRunningMap . get ( chainName ) ; if ( chain != null ) { ChannelData channelsData [ ] = chain . getChannelsData ( ) ; ChildChannelDataImpl childChannelData = null ; for (...
Determine if a channel references a chain in the runtime config .
25,378
public synchronized int getNumStartedChainsUsingChannel ( String channelName ) { int numStartedChains = 0 ; ChannelContainer channelContainer = this . channelRunningMap . get ( channelName ) ; if ( null != channelContainer ) { for ( Chain chain : channelContainer . getChainMap ( ) . values ( ) ) { if ( chain . getState...
Get the number of chains that are currently using this channel in the runtime which are in the STARTED state .
25,379
protected ChannelData createChannelData ( String name , Class < ? > factoryClass , Map < Object , Object > properties , int weight ) { return new ChannelDataImpl ( name , factoryClass , properties , weight , this ) ; }
Create a new ChannelData Object .
25,380
protected ChainData createChainData ( String name , FlowType type , ChannelData [ ] channels , Map < Object , Object > properties ) throws IncoherentChainException { return new ChainDataImpl ( name , type , channels , properties ) ; }
Create a new ChainData object .
25,381
public void registerFactories ( ChannelFactoryProvider provider ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Register factory provider; " + provider . getClass ( ) . getName ( ) ) ; } synchronized ( this . factories ) { for ( Entry < String , Class < ? extends Chan...
Set a factory provider .
25,382
public void deregisterFactories ( ChannelFactoryProvider provider ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Removing factory provider; " + provider . getClass ( ) . getName ( ) ) ; } for ( Entry < String , Class < ? extends ChannelFactory > > entry : provider . ...
Remove a factory provider .
25,383
public List < String > getVhost ( String address , String port ) { if ( null == address || null == port ) { return null ; } int portnum = Integer . parseInt ( port ) ; List < EndPointInfo > eps = EndPointMgrImpl . getRef ( ) . getEndPoints ( address , portnum ) ; List < String > rc = new ArrayList < String > ( eps . si...
Find the appropriate virtual host list for the provided address and port target .
25,384
public ChainData createOutboundChain ( CFEndPoint endpoint ) throws ChannelFrameworkException { List < OutboundChannelDefinition > defs = endpoint . getOutboundChannelDefs ( ) ; String namelist [ ] = new String [ defs . size ( ) ] ; int i = 0 ; for ( OutboundChannelDefinition def : defs ) { namelist [ i ] = "channel_" ...
Create a new outbound chain based on the provided endpoint definition .
25,385
private boolean propertiesIncluded ( Map < Object , Object > inputMap , Map < Object , Object > existingMap ) { if ( inputMap == null ) { return true ; } else if ( existingMap == null || inputMap . size ( ) > existingMap . size ( ) ) { return false ; } Object existingValue ; for ( Entry < Object , Object > entry : inpu...
This method returns whether all the properties in the first Map are in the second Map .
25,386
public void prepareEndPoint ( CFEndPointImpl endpoint ) throws ChannelFrameworkException { if ( null == endpoint . getOutboundChainData ( ) ) { VirtualConnectionFactory vcf = getOutboundVCFactory ( endpoint . getOutboundChannelDefs ( ) ) ; endpoint . setOutboundVCFactory ( vcf ) ; endpoint . setOutboundChainData ( getC...
Prepare the factory and the chain for the provided endpoint .
25,387
public int updateExpirationTime ( Object id , long oldExpirationTime , int size , long newExpirationTime , long newValidatorExpirationTime ) { final String methodName = "updateExpirationTime()" ; int returnCode = NO_EXCEPTION ; Exception diskException = null ; if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , methodName...
Since the real expiration time does not change the GC will be updated .
25,388
public boolean isCacheIdInAuxDepIdTable ( Object id ) { if ( delayOffload ) { if ( ! this . disableDependencyId ) { return this . auxDataDependencyTable . containsCacheId ( id ) ; } else { return false ; } } else { return false ; } }
Return a boolean to indicate whether the specified cache id exists in the aux dependency table
25,389
public Throwable getOriginalException ( ) throws ExceptionInstantiationException { Throwable prevEx = null ; if ( previousExceptionInfo != null ) { prevEx = previousExceptionInfo . getOriginalException ( ) ; if ( prevEx == null ) { prevEx = getPreviousException ( ) ; } } return prevEx ; }
Get the original exception in a possible chain of exceptions . If no previous exceptions have been chained null will be returned .
25,390
public Throwable getPreviousException ( ) throws ExceptionInstantiationException { Throwable ex = null ; if ( previousExceptionObject != null ) return previousExceptionObject ; if ( previousException != null ) { try { final ByteArrayInputStream bais = new ByteArrayInputStream ( previousException ) ; ObjectInputStream o...
Retrieves the previous exception
25,391
private void setExceptionInfo ( DistributedExceptionEnabled e ) { if ( e != null ) { setClassName ( e . getClass ( ) . getName ( ) ) ; } currentException = e ; }
Set the exceptionInfo attribute
25,392
public void setLocalizationInfo ( String resourceBundleName , String resourceKey , Object [ ] formatArguments ) { this . resourceBundleName = resourceBundleName ; this . resourceKey = resourceKey ; this . formatArguments = formatArguments ; }
FOR WEBSPHERE INTERNAL USE ONLY Set the localization information .
25,393
private void serializePreviousException ( ) { try { final ByteArrayOutputStream bas = new ByteArrayOutputStream ( ) ; ObjectOutputStream oos = ( ObjectOutputStream ) AccessController . doPrivileged ( new PrivilegedExceptionAction ( ) { public Object run ( ) throws IOException { return new ObjectOutputStream ( bas ) ; }...
Set the previous exception attribute . The exception will be converted to a byte array so that an unmarshall exception will not be thrown if the exception doesn t exist on the client or on an intermediate server .
25,394
private void setPreviousExceptionInfo ( Throwable previousException ) { if ( previousException instanceof com . ibm . websphere . exception . DistributedExceptionEnabled ) { previousExceptionInfo = ( ( DistributedExceptionEnabled ) previousException ) . getExceptionInfo ( ) ; } else { previousExceptionInfo = new Distri...
Set the previous exception info object .
25,395
private void setStackTrace ( Throwable e ) { StringWriter sw = new StringWriter ( ) ; PrintWriter pw = new PrintWriter ( sw ) ; e . printStackTrace ( pw ) ; stackTrace = sw . toString ( ) ; setLineSeparator ( getLineSeparatorProperty ( ) ) ; }
Set the stack trace
25,396
private void processOCDAttributes ( String currDefId , AttributeDefinition [ ] attrDefs , Map < String , AttributeDefinition > requiredAttributes , Map < String , AttributeDefinition > optionalAttributes , Map < String , ExtendedAttributeDefinition > attributeMap , boolean required ) { Map < String , AttributeDefinitio...
This method takes a set of Attribute Definitions and processes them against an existing Map of attributes .
25,397
public static List < String > generatePropertyNameList ( String propertyName , List < String > suffixValues ) { List < String > propertyNames = new ArrayList < > ( ) ; int suffixes = suffixValues . size ( ) ; if ( suffixes > 0 ) { int counter = ( ( int ) Math . pow ( 2 , suffixes ) ) - 1 ; while ( counter > 0 ) { Strin...
This method uses a binary count down to append suffixes to a base propertyName .
25,398
protected synchronized void unsetKeyStore ( KeystoreConfig config ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Removing keystore: " + config . getId ( ) ) ; } keystoreIdMap . remove ( config . getId ( ) ) ; keystorePidMap . remove ( config . getPid ( ) ) ; KeyStore...
Method will be called for each KeyStoreConfigService that is unregistered in the OSGi service registry . We must remove this instance from our internal map .
25,399
protected synchronized void unsetRepertoire ( RepertoireConfigService config ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Removing repertoire: " + config . getAlias ( ) ) ; } repertoireMap . remove ( config . getAlias ( ) ) ; repertoirePIDMap . remove ( config . ge...
Method will be called for each RepertoireConfigService that is unregistered in the OSGi service registry . We must remove this instance from our internal map .