idx
int64
0
165k
question
stringlengths
73
5.81k
target
stringlengths
5
918
162,500
protected int getAllowCachedTimerData ( J2EEName j2eeName ) { Integer allowCachedTimerData = null ; Map < String , Integer > localAllowCachedTimerDataMap = allowCachedTimerDataMap ; if ( localAllowCachedTimerDataMap != null ) { allowCachedTimerData = localAllowCachedTimerDataMap . get ( j2eeName . toString ( ) ) ; if (...
Return the allowed cached timer data setting for the specified bean .
162,501
public void batchUpdate ( HashMap invalidateIdEvents , HashMap invalidateTemplateEvents , ArrayList pushEntryEvents , ArrayList aliasEntryEvents , CacheUnit cacheUnit ) { }
This applies a set of invalidations and new entries to this CacheUnit including the local internal cache and external caches registered with this CacheUnit .
162,502
public static JCATranWrapper getTxWrapper ( Xid xid , boolean addAssociation ) throws XAException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getTxWrapper" , new Object [ ] { xid , addAssociation } ) ; final ByteArray key = new ByteArray ( xid . getGlobalTransactionId ( ) ) ; final JCATranWrapper txWrapper ; sy...
Given an Xid returns the corresponding JCATranWrapper from the table of imported transactions or null if no entry exists .
162,503
protected JCATranWrapper findTxWrapper ( int timeout , Xid xid , String providerId ) throws WorkCompletedException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "findTxWrapper" , new Object [ ] { timeout , xid , providerId } ) ; final JCATranWrapper txWrapper ; final ByteArray key = new ByteArray ( xid . getGlobal...
Retrieve a JCATranWrapper from the table . Insert it first if it wasn t already there . Returns null if association already existed or if transaction has been prepared .
162,504
protected JCATranWrapper createWrapper ( int timeout , Xid xid , JCARecoveryData jcard ) throws WorkCompletedException { return new JCATranWrapperImpl ( timeout , xid , jcard ) ; }
Overridden in WAS
162,505
public static void addTxn ( TransactionImpl txn ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "addTxn" , txn ) ; final ByteArray key = new ByteArray ( txn . getXid ( ) . getGlobalTransactionId ( ) ) ; synchronized ( txnTable ) { if ( ! txnTable . containsKey ( key ) ) { txnTable . put ( key , new JCATranWrapperI...
To be called by recovery manager
162,506
@ SuppressWarnings ( "unchecked" ) public K getKey ( int index ) { if ( ( index < 0 ) || ( index >= size ( ) ) ) { throw new IndexOutOfBoundsException ( ) ; } return ( K ) _array [ index * 2 ] ; }
Returns the key at a specific index in the map .
162,507
@ SuppressWarnings ( "unchecked" ) public V getValue ( int index ) { if ( ( index < 0 ) || ( index >= size ( ) ) ) { throw new IndexOutOfBoundsException ( ) ; } return ( V ) _array [ index * 2 + 1 ] ; }
Returns the value at a specific index in the map .
162,508
static public Object get ( Object [ ] array , Object key ) { Object o = getByIdentity ( array , key ) ; if ( o != null ) { return o ; } return getByEquality ( array , key ) ; }
Gets the object stored with the given key . Scans first by object identity then by object equality .
162,509
static public Object getByIdentity ( Object [ ] array , Object key ) { if ( array != null ) { int length = array . length ; for ( int i = 0 ; i < length ; i += 2 ) { if ( array [ i ] == key ) { return array [ i + 1 ] ; } } } return null ; }
Gets the object stored with the given key using only object identity .
162,510
static public Object getByEquality ( Object [ ] array , Object key ) { if ( array != null ) { int length = array . length ; for ( int i = 0 ; i < length ; i += 2 ) { Object targetKey = array [ i ] ; if ( targetKey == null ) { return null ; } else if ( targetKey . equals ( key ) ) { return array [ i + 1 ] ; } } } return...
Gets the object stored with the given key using only object equality .
162,511
@ SuppressWarnings ( "unchecked" ) public Iterator < K > keys ( ) { int size = _size ; if ( size == 0 ) { return null ; } ArrayList < K > keyList = new ArrayList < K > ( ) ; int i = ( size - 1 ) * 2 ; while ( i >= 0 ) { keyList . add ( ( K ) _array [ i ] ) ; i = i - 2 ; } return keyList . iterator ( ) ; }
Returns an enumeration of the keys in this map . the Iterator methods on the returned object to fetch the elements sequentially .
162,512
public static Iterator < Object > getKeys ( Object [ ] array ) { if ( array == null ) { return null ; } ArrayList < Object > keyList = new ArrayList < Object > ( ) ; int i = array . length - 2 ; while ( i >= 0 ) { keyList . add ( array [ i ] ) ; i = i - 2 ; } return keyList . iterator ( ) ; }
Returns an Iterator of keys in the array .
162,513
public static Iterator < Object > getValues ( Object [ ] array ) { if ( array == null ) { return null ; } ArrayList < Object > valueList = new ArrayList < Object > ( ) ; int i = array . length - 1 ; while ( i >= 0 ) { valueList . add ( array [ i ] ) ; i = i - 2 ; } return valueList . iterator ( ) ; }
Returns an Iterator of values in the array .
162,514
public void clear ( ) { int size = _size ; if ( size > 0 ) { size = size * 2 ; for ( int i = 0 ; i < size ; i ++ ) { _array [ i ] = null ; } _size = 0 ; } }
Removes all elements from the ArrayMap .
162,515
private void sendErrorJSON ( HttpServletResponse response , int statusCode , String errorCode , String errorDescription ) { final String error = "error" ; final String error_description = "error_description" ; try { if ( errorCode != null ) { response . setStatus ( statusCode ) ; response . setHeader ( ClientConstants ...
refactored from Oauth SendErrorJson . Only usable for sending an http400 .
162,516
public boolean first ( ) throws SQLException { try { if ( dsConfig . get ( ) . beginTranForResultSetScrollingAPIs ) getConnectionWrapper ( ) . beginTransactionIfNecessary ( ) ; return rsetImpl . first ( ) ; } catch ( SQLException ex ) { FFDCFilter . processException ( ex , "com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.fir...
Moves the cursor to the first row in the result set .
162,517
public Array getArray ( int arg0 ) throws SQLException { try { Array ra = rsetImpl . getArray ( arg0 ) ; if ( ra != null && freeResourcesOnClose ) arrays . add ( ra ) ; return ra ; } catch ( SQLException ex ) { FFDCFilter . processException ( ex , "com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.getArray" , "438" , this ) ; ...
Gets an SQL ARRAY value from the current row of this ResultSet object .
162,518
public Blob getBlob ( int arg0 ) throws SQLException { try { Blob blob = rsetImpl . getBlob ( arg0 ) ; if ( blob != null && freeResourcesOnClose ) blobs . add ( blob ) ; return blob ; } catch ( SQLException ex ) { FFDCFilter . processException ( ex , "com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.getBlob" , "754" , this ) ...
Gets a BLOB value in the current row of this ResultSet object .
162,519
public Reader getCharacterStream ( int arg0 ) throws SQLException { try { Reader reader = rsetImpl . getCharacterStream ( arg0 ) ; if ( reader != null && freeResourcesOnClose ) resources . add ( reader ) ; return reader ; } catch ( SQLException ex ) { FFDCFilter . processException ( ex , "com.ibm.ws.rsadapter.jdbc.WSJd...
Gets the value of a column in the current row as a java . io . Reader .
162,520
public Clob getClob ( int arg0 ) throws SQLException { try { Clob clob = rsetImpl . getClob ( arg0 ) ; if ( clob != null && freeResourcesOnClose ) clobs . add ( clob ) ; return clob ; } catch ( SQLException ex ) { FFDCFilter . processException ( ex , "com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.getClob" , "1037" , this )...
Gets a CLOB value in the current row of this ResultSet object .
162,521
public String getCursorName ( ) throws SQLException { try { return rsetImpl . getCursorName ( ) ; } catch ( SQLException ex ) { FFDCFilter . processException ( ex , "com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.getCursorName" , "1129" , this ) ; throw WSJdbcUtil . mapException ( this , ex ) ; } catch ( NullPointerExceptio...
Gets the name of the SQL cursor used by this ResultSet .
162,522
public int getFetchDirection ( ) throws SQLException { try { return rsetImpl . getFetchDirection ( ) ; } catch ( SQLException ex ) { FFDCFilter . processException ( ex , "com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.getFetchDirection" , "1336" , this ) ; throw WSJdbcUtil . mapException ( this , ex ) ; } catch ( NullPointe...
Returns the fetch direction for this result set .
162,523
public ResultSetMetaData getMetaData ( ) throws SQLException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "getMetaData" ) ; ResultSetMetaData rsetMData = null ; try { rsetMData = rsetImpl . getMetaData ( ) ; } catch ( SQLException ex ) { FFDCFilter . processException ( ex , "com.ibm.ws.rsadapter.jdbc.WSJdb...
Retrieves the number types and properties of a ResultSet s columns .
162,524
public Object getObject ( String arg0 ) throws SQLException { try { Object result = rsetImpl . getObject ( arg0 ) ; addFreedResources ( result ) ; return result ; } catch ( SQLException ex ) { FFDCFilter . processException ( ex , "com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.getObject" , "1684" , this ) ; throw WSJdbcUtil...
Gets the value of a column in the current row as a Java object .
162,525
public Statement getStatement ( ) throws SQLException { if ( state == State . CLOSED || parentWrapper == null ) throw createClosedException ( "ResultSet" ) ; if ( parentWrapper instanceof WSJdbcDatabaseMetaData ) return null ; return ( Statement ) parentWrapper ; }
Returns the Statement that produced this ResultSet object . If the result set was generated some other way such as by a DatabaseMetaData method this method returns null .
162,526
public SQLWarning getWarnings ( ) throws SQLException { try { return rsetImpl . getWarnings ( ) ; } catch ( SQLException ex ) { FFDCFilter . processException ( ex , "com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.getWarnings" , "2345" , this ) ; throw WSJdbcUtil . mapException ( this , ex ) ; } catch ( NullPointerException ...
The first warning reported by calls on this ResultSet is returned . Subsequent ResultSet warnings will be chained to this SQLWarning .
162,527
public void setFetchDirection ( int direction ) throws SQLException { if ( tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "setFetchDirection" , AdapterUtil . getFetchDirectionString ( direction ) ) ; try { rsetImpl . setFetchDirection ( direction ) ; } catch ( SQLException ex ) { FFDCFilter . processException ( ex ...
Gives a hint as to the direction in which the rows in this result set will be processed . The initial value is determined by the statement that produced the result set . The fetch direction may be changed at any time .
162,528
public void setFetchSize ( int rows ) throws SQLException { if ( tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "setFetchSize" , rows ) ; try { rsetImpl . setFetchSize ( rows ) ; } catch ( SQLException ex ) { FFDCFilter . processException ( ex , "com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.setFetchSize" , "2891" , th...
Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed for this result set . If the fetch size specified is zero the JDBC driver ignores the value and is free to make its own best guess as to what the fetch size should be . The default value is set by th...
162,529
public void updateBinaryStream ( String arg0 , InputStream arg1 , int arg2 ) throws SQLException { try { rsetImpl . updateBinaryStream ( arg0 , arg1 , arg2 ) ; } catch ( SQLException ex ) { FFDCFilter . processException ( ex , "com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.updateBinaryStream" , "3075" , this ) ; throw WSJd...
Updates a column with a binary stream value . The updateXXX methods are used to update column values in the current row or the insert row . The updateXXX methods do not update the underlying database ; instead the updateRow or insertRow methods are called to update the database .
162,530
public void updateCharacterStream ( String arg0 , Reader arg1 , int arg2 ) throws SQLException { try { rsetImpl . updateCharacterStream ( arg0 , arg1 , arg2 ) ; } catch ( SQLException ex ) { FFDCFilter . processException ( ex , "com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.updateCharacterStream" , "3317" , this ) ; throw ...
Updates a column with a character stream value . The updateXXX methods are used to update column values in the current row or the insert row . The updateXXX methods do not update the underlying database ; instead the updateRow or insertRow methods are called to update the database .
162,531
public void updateObject ( int arg0 , Object arg1 , int arg2 ) throws SQLException { try { rsetImpl . updateObject ( arg0 , arg1 , arg2 ) ; } catch ( SQLException ex ) { FFDCFilter . processException ( ex , "com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.updateObject" , "3737" , this ) ; throw WSJdbcUtil . mapException ( th...
Updates a column with an Object value . The updateXXX methods are used to update column values in the current row or the insert row . The updateXXX methods do not update the underlying database ; instead the updateRow or insertRow methods are called to update the database .
162,532
public void afterCompletion ( int status ) { logger . log ( Level . FINE , "The status of the transaction commit is: " + status ) ; if ( status == Status . STATUS_COMMITTED ) { runtimeStepExecution . setCommittedMetrics ( ) ; } else { runtimeStepExecution . rollBackMetrics ( ) ; } }
Upon successful transaction commit status store the value of the committed metrics . Upon any other status value roll back the metrics to the last committed value .
162,533
public final Object invokeInterceptor ( Object bean , InvocationContext inv , Object [ ] interceptors ) throws Exception { Object interceptorInstance = ( ivBeanInterceptor ) ? bean : interceptors [ ivInterceptorIndex ] ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "inv...
Invoke the interceptor method associated with the interceptor index that was passed as the interceptorIndex parameter of the constructor method of this class .
162,534
public Object invoke ( Object proxy , Method method , Object [ ] args ) throws Throwable { String methodName = method . getName ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , methodName , args ) ; Object r = null ; try { if ( args == null || args . length == 0 ...
Invokes our implementation for methods of org . hibernate . engine . transaction . jta . platform . spi . JtaPlatform
162,535
protected String getMFMainClass ( Container appEntryContainer , String entryPath , boolean required ) { String mfMainClass = null ; try { String entry = "/META-INF/MANIFEST.MF" ; Entry manifestEntry = appEntryContainer . getEntry ( entry ) ; if ( manifestEntry != null ) { InputStream is = null ; try { is = manifestEntr...
Return the Main - Class from the MANIFEST . MF .
162,536
protected int insert ( SpdData elt ) { if ( members . isEmpty ( ) ) { members . add ( elt ) ; return 0 ; } int first = 0 ; SpdData firstElt = ( SpdData ) members . get ( first ) ; int last = members . size ( ) - 1 ; SpdData lastElt = ( SpdData ) members . get ( last ) ; if ( elt . compareTo ( firstElt ) < 0 ) { members...
Insert the element into the members vector in sorted lexicographical order
162,537
public synchronized boolean addSorted ( SpdData data ) { if ( data == null ) { return false ; } else if ( members . contains ( data ) ) { return false ; } else { return ( insert ( data ) != - 1 ) ; } }
add a data in a sorted order
162,538
public synchronized boolean add ( SpdData data ) { if ( data == null ) { return false ; } else if ( members . contains ( data ) ) { return false ; } else { return members . add ( data ) ; } }
append a data to the members list - not sorted
162,539
private void collectFeatureInfos ( Map < String , ProductInfo > productInfos , Map < String , FeatureInfo > featuresBySymbolicName ) { ManifestFileProcessor manifestFileProcessor = new ManifestFileProcessor ( ) ; for ( Map . Entry < String , Map < String , ProvisioningFeatureDefinition > > productEntry : manifestFilePr...
Collect information about all installed products and their features .
162,540
private FeatureInfo getFeatureInfo ( String name , Map < String , ProductInfo > productInfos , Map < String , FeatureInfo > featuresBySymbolicName ) { String productName , featureName ; int index = name . indexOf ( ':' ) ; if ( index == - 1 ) { FeatureInfo featureInfo = featuresBySymbolicName . get ( name ) ; if ( feat...
Gets a feature by its name using the server . xml featureManager algorithm .
162,541
private void collectAPIJars ( FeatureInfo featureInfo , Map < String , FeatureInfo > allowedFeatures , Set < File > apiJars ) { for ( SubsystemContentType contentType : JAR_CONTENT_TYPES ) { for ( FeatureResource resource : featureInfo . feature . getConstituents ( contentType ) ) { if ( APIType . getAPIType ( resource...
Collect API JARs from a feature and its recursive dependencies .
162,542
private void createClasspathJar ( File outputFile , String classpath ) throws IOException { FileOutputStream out = new FileOutputStream ( outputFile ) ; try { Manifest manifest = new Manifest ( ) ; Attributes attrs = manifest . getMainAttributes ( ) ; attrs . put ( Attributes . Name . MANIFEST_VERSION , "1.0" ) ; attrs...
Writes a JAR with a MANIFEST . MF containing the Class - Path string .
162,543
public void setupDiscProcess ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "setupDiscProcess" ) ; } ChannelData list [ ] = chainData . getChannelList ( ) ; Class < ? > discriminatoryType = null ; DiscriminationProcessImpl dp = null ; if ( TraceComponent . isAnyTrac...
This method is called from the channel framework right before the start method is called . In between it starts up the channels in the chain .
162,544
public void startDiscProcessBetweenChannels ( InboundChannel appChannel , InboundChannel devChannel , int discWeight ) throws ChainException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "startDiscProcessBetweenChannels" ) ; } Discriminator d = null ; Exception discExc...
This method is called from ChannelFrameworkImpl during chain startup to start up the discrimination process between each set of adjacent channels in the chain .
162,545
public void disableChannel ( Channel inputChannel ) throws InvalidChannelNameException , DiscriminationProcessException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "disableChannel: " + inputChannel . getName ( ) ) ; } synchronized ( state ) { if ( RuntimeState . STAR...
Disable the input channel .
162,546
public void writeSilence ( MessageItem m ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "writeSilence" , new Object [ ] { m } ) ; JsMessage jsMsg = m . getMessage ( ) ; long stamp = jsMsg . getGuaranteedValueValueTick ( ) ; long ends = jsMsg . getGuaranteedVal...
This method uses a Value message to write Silence into the stream because a message has been filtered out
162,547
private void handleNewGap ( long startstamp , long endstamp ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "handleNewGap" , new Object [ ] { Long . valueOf ( startstamp ) , Long . valueOf ( endstamp ) } ) ; TickRange tr = new TickRange ( TickRange . Requested , start...
all methods calling this are already synchronized
162,548
protected static void addAlarm ( Object key , Object alarmObject ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "addAlarm" , new Object [ ] { key , alarmObject } ) ; synchronized ( pendingAlarms ) { Set alarms = null ; if ( pendingAlarms . containsKey ( key ) ) alarm...
Utility method for adding an alarm which needs to be expired if a flush occurs .
162,549
protected static void removeAlarm ( Object key , Object alarmObject ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "removeAlarm" , new Object [ ] { key , alarmObject } ) ; synchronized ( pendingAlarms ) { if ( pendingAlarms . containsKey ( key ) ) ( ( Set ) pendingAl...
Utility method for removing an alarm from the alarm set . Has no effect if either no alarms are associated with the given key or the given alarm object does not exist .
162,550
protected static Iterator getAlarms ( Object key ) { synchronized ( pendingAlarms ) { if ( pendingAlarms . containsKey ( key ) ) return ( ( Set ) pendingAlarms . get ( key ) ) . iterator ( ) ; return new GTSIterator ( ) ; } }
Utility method for getting the list of all alarms associated with a particular key . Returns an empty Iterator if the given key has no alarms .
162,551
private boolean isStreamBlocked ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( this , tc , "isStreamBlocked" ) ; SibTr . exit ( tc , "isStreamBlocked" , new Object [ ] { Boolean . valueOf ( isStreamBlocked ) , Long . valueOf ( linkBlockingTick ) } ) ; } return this . ...
Is the stream marked as blocked .
162,552
private boolean isStreamBlockedUnexpectedly ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( this , tc , "isStreamBlockedUnexpectedly" ) ; SibTr . exit ( tc , "isStreamBlockedUnexpectedly" , Boolean . valueOf ( unexpectedBlock ) ) ; } return unexpectedBlock ; }
Is the stream marked as blocked unexpectedly
162,553
private boolean streamCanAcceptNewMessage ( MessageItem msgItem , long valueTick ) throws SIException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "streamCanAcceptNewMessage" , new Object [ ] { msgItem , Long . valueOf ( valueTick ) } ) ; boolean allowSend = f...
Check to see if the stream is able to accept a new message . If it cannot then the message is only allowed through if it has the possibility of filling in a gap . See defects 244425 and 464463 .
162,554
public static UOWManager getUOWManager ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getUOWManager" ) ; final UOWManager uowm = com . ibm . ws . uow . embeddable . UOWManagerFactory . getUOWManager ( ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "getUOWManager" , uowm ) ; return uowm ; }
Returns a stateless thread - safe UOWManager instance .
162,555
String getProcErrorOutput ( Process proc ) throws IOException { StringBuffer output = new StringBuffer ( ) ; InputStream procIn = proc . getInputStream ( ) ; int read ; do { byte [ ] buffer = new byte [ BUFFER_SIZE ] ; read = procIn . read ( buffer ) ; String s = new String ( buffer ) ; output . append ( s ) ; } while ...
Grabs the error message generated by executing the process .
162,556
public void init ( boolean useDirect , int outSize , int inSize , int cacheSize ) { super . init ( useDirect , outSize , inSize , cacheSize ) ; }
Initialize this trailer header storage object with certain configuration information .
162,557
public void setDeferredTrailer ( HeaderKeys hdr , HttpTrailerGenerator htg ) { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "setDeferredTrailer(HeaderKeys): " + hdr ) ; } if ( null == hdr ) { throw new IllegalArgumentException ( "Null header name" ) ; } if ( null == htg ) { throw new IllegalArgumentException ( "N...
Set a trailer based upon a not - yet established value .
162,558
public void computeRemainingTrailers ( ) { if ( tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "computeRemainingTrailers" ) ; } Iterator < HeaderKeys > knowns = this . knownTGs . keySet ( ) . iterator ( ) ; while ( knowns . hasNext ( ) ) { HeaderKeys key = knowns . next ( ) ; setHeader ( key , this . knownTGs . get ( ke...
Compute all deferred headers .
162,559
public void destroy ( ) { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Destroy trailers: " + this ) ; } super . destroy ( ) ; if ( null != this . myFactory ) { this . myFactory . releaseTrailers ( this ) ; this . myFactory = null ; } }
Destroy this object .
162,560
public HttpTrailersImpl duplicate ( ) { if ( null == this . myFactory ) { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Null factory, unable to duplicate: " + this ) ; } return null ; } if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Duplicating the trailer headers: " + this ) ; } computeRemainingTrailers ( )...
Create a duplicate version of these trailer headers .
162,561
public static boolean isPathContained ( List < String > allowedPaths , String targetPath ) { if ( allowedPaths == null || allowedPaths . isEmpty ( ) || targetPath == null ) { return false ; } if ( ! targetPath . isEmpty ( ) && targetPath . charAt ( targetPath . length ( ) - 1 ) == '/' && targetPath . length ( ) > 1 && ...
Returns true if the targetPath is contained within one of the allowedPaths .
162,562
public StatisticImpl getStatistic ( ) { if ( enabled ) { long curTime = stat . updateIntegral ( ) ; stat . setLastSampleTime ( curTime ) ; return stat ; } else { return stat ; } }
to time .
162,563
public void combine ( SpdLoad other ) { if ( other == null ) return ; if ( stat . isEnabled ( ) && other . isEnabled ( ) ) stat . combine ( other . getStatistic ( ) ) ; }
Combine this data and other SpdLoad data
162,564
private String getProperty ( String variable , EvaluationContext context , boolean ignoreWarnings , boolean useEnvironment ) throws ConfigEvaluatorException { return stringUtils . convertToString ( getPropertyObject ( variable , context , ignoreWarnings , useEnvironment ) ) ; }
Returns the value of the variable as a string or null if the property does not exist .
162,565
Object processVariableLists ( Object rawValue , ExtendedAttributeDefinition attributeDef , EvaluationContext context , boolean ignoreWarnings ) throws ConfigEvaluatorException { if ( attributeDef != null && ! attributeDef . resolveVariables ( ) ) return rawValue ; if ( rawValue instanceof List ) { List < Object > retur...
Replaces list variable expressions in raw string values
162,566
ContentMatcher nextMatcher ( Conjunction selector , ContentMatcher oldMatcher ) { return Factory . createMatcher ( ordinalPosition , selector , oldMatcher ) ; }
Determine the next matcher to which a put operation should be delegated . Except when cacheing is active this method delegates to Factory . createMatcher . It is overridden in EqualityMatcher to wrap newly created Matchers in a CacheingMatcher when appropriate
162,567
private void syncToOSThread ( WebSecurityContext webSecurityContext ) throws SecurityViolationException { try { Object token = ThreadIdentityManager . setAppThreadIdentity ( subjectManager . getInvocationSubject ( ) ) ; webSecurityContext . setSyncToOSThreadToken ( token ) ; } catch ( ThreadIdentityException tie ) { Se...
Sync the invocation Subject s identity to the thread if request by the application .
162,568
private void resetSyncToOSThread ( WebSecurityContext webSecurityContext ) throws ThreadIdentityException { Object token = webSecurityContext . getSyncToOSThreadToken ( ) ; if ( token != null ) { ThreadIdentityManager . resetChecked ( token ) ; } }
Remove the invocation Subject s identity from the thread if it was previously sync ed .
162,569
public AuthenticationResult authenticateRequest ( WebRequest webRequest ) { WebAuthenticator authenticator = getWebAuthenticatorProxy ( ) ; return authenticator . authenticate ( webRequest ) ; }
The main method called by the preInvoke . The return value of this method tells us if access to the requested resource is allowed or not . Delegates to the authenticator proxy to handle the authentication .
162,570
public boolean authorize ( AuthenticationResult authResult , String appName , String uriName , Subject previousCaller , List < String > requiredRoles ) { subjectManager . setCallerSubject ( authResult . getSubject ( ) ) ; boolean isAuthorized = authorize ( authResult , appName , uriName , requiredRoles ) ; if ( isAutho...
Call the authorization service to determine if the subject is authorized to the given roles
162,571
public WebReply performInitialChecks ( WebRequest webRequest , String uriName ) { WebReply webReply = null ; HttpServletRequest req = webRequest . getHttpServletRequest ( ) ; String methodName = req . getMethod ( ) ; if ( uriName == null || uriName . length ( ) == 0 ) { return new DenyReply ( "Invalid URI passed to Sec...
Perform the preliminary checks to see if we should proceed to authentication and authorization .
162,572
private WebReply unprotectedSpecialURI ( WebRequest webRequest , String uriName , String methodName ) { LoginConfiguration loginConfig = webRequest . getLoginConfig ( ) ; if ( loginConfig == null ) return null ; String authenticationMethod = loginConfig . getAuthenticationMethod ( ) ; FormLoginConfiguration formLoginCo...
Determines if the URI requested is special and should always be treated as unprotected such as the form login page .
162,573
private boolean isServletSpec31 ( ) { if ( com . ibm . ws . webcontainer . osgi . WebContainer . getServletContainerSpecLevel ( ) >= 31 ) return true ; return false ; }
Check to see if running under servlet spec 3 . 1
162,574
private void notifyWebAppSecurityConfigChangeListeners ( List < String > delta ) { WebAppSecurityConfigChangeEvent event = new WebAppSecurityConfigChangeEventImpl ( delta ) ; for ( WebAppSecurityConfigChangeListener listener : webAppSecurityConfigchangeListenerRef . services ( ) ) { listener . notifyWebAppSecurityConfi...
Notify the registered listeners of the change to the UserRegistry configuration .
162,575
private String toStringFormChangedPropertiesMap ( Map < String , String > delta ) { if ( delta == null || delta . isEmpty ( ) ) { return "" ; } StringBuffer sb = new StringBuffer ( ) ; for ( Map . Entry < String , String > entry : delta . entrySet ( ) ) { if ( sb . length ( ) > 0 ) { sb . append ( "," ) ; } sb . append...
Format the map of config change attributes for the audit function . The output format would be the same as original WebAppSecurityConfig . getChangedProperties method .
162,576
private void logAuditEntriesBeforeAuthn ( WebReply webReply , Subject receivedSubject , String uriName , WebRequest webRequest ) { AuthenticationResult authResult ; if ( webReply instanceof PermitReply ) { authResult = new AuthenticationResult ( AuthResult . SUCCESS , receivedSubject , null , null , AuditEvent . OUTCOM...
no null check for webReply object so make sure it is not null upon calling this method .
162,577
private void postRoutedNotificationListenerRegistrationEvent ( String operation , NotificationTargetInformation nti ) { Map < String , Object > props = createListenerRegistrationEvent ( operation , nti ) ; safePostEvent ( new Event ( REGISTER_JMX_NOTIFICATION_LISTENER_TOPIC , props ) ) ; }
Post an event to EventAdmin instructing the Target - Client Manager to register or unregister a listener for a given target .
162,578
private void postRoutedServerNotificationListenerRegistrationEvent ( String operation , NotificationTargetInformation nti , ObjectName listener , NotificationFilter filter , Object handback ) { Map < String , Object > props = createServerListenerRegistrationEvent ( operation , nti , listener , filter , handback ) ; saf...
Post an event to EventAdmin instructing the Target - Client Manager to register or unregister a listener MBean on a given target .
162,579
private void safePostEvent ( Event event ) { EventAdmin ea = eventAdminRef . getService ( ) ; if ( ea != null ) { ea . postEvent ( event ) ; } else if ( tc . isEventEnabled ( ) ) { Tr . event ( tc , "The EventAdmin service is unavailable. Unable to post the Event: " + event ) ; } }
Null - safe event posting to eventAdminRef .
162,580
public void enableDestinationCreation ( SICoreConnectionFactory siccf ) { if ( tcInt . isEntryEnabled ( ) ) SibTr . entry ( tcInt , "enableDestinationCreation" ) ; try { if ( admin == null ) { if ( tcInt . isDebugEnabled ( ) ) SibTr . debug ( tcInt , "Setting up destination definition objects." ) ; admin = ( ( SIMPAdmi...
This method sets up the destination definitions . It is called
162,581
private void createDestination ( String name , com . ibm . wsspi . sib . core . DestinationType destType , Reliability defaultReliability ) throws JMSException { if ( tcInt . isEntryEnabled ( ) ) SibTr . entry ( tcInt , "createDestination(String, DestinationType)" ) ; if ( tcInt . isDebugEnabled ( ) ) { SibTr . debug (...
Internal method to do the creation given a name a ddf .
162,582
private DirContext bind ( String bindDn , ProtectedString bindPw ) throws NamingException { Hashtable < Object , Object > env = new Hashtable < Object , Object > ( ) ; String url = this . idStoreDefinition . getUrl ( ) ; if ( url == null || url . isEmpty ( ) ) { throw new IllegalArgumentException ( "No URL was provided...
Bind to the LDAP server .
162,583
private Set < String > getGroups ( DirContext context , String callerDn ) { Set < String > groups = null ; String groupSearchBase = idStoreDefinition . getGroupSearchBase ( ) ; String groupSearchFilter = idStoreDefinition . getGroupSearchFilter ( ) ; if ( groupSearchBase . isEmpty ( ) || groupSearchFilter . isEmpty ( )...
Get the groups for the caller
162,584
private Set < String > getGroupsByMember ( DirContext context , String callerDn , String groupSearchBase , String groupSearchFilter ) { String groupNameAttribute = idStoreDefinition . getGroupNameAttribute ( ) ; String [ ] attrIds = { groupNameAttribute } ; long limit = Long . valueOf ( idStoreDefinition . getMaxResult...
Get the groups for the caller by using a member - style attribute found on group LDAP entities .
162,585
private String getFormattedFilter ( String searchFilter , String caller , String attribute ) { String filter = searchFilter . replaceAll ( "%v" , "%s" ) ; if ( ! ( filter . startsWith ( "(" ) && filter . endsWith ( ")" ) ) && ! filter . isEmpty ( ) ) { filter = "(" + filter + ")" ; } if ( filter . contains ( "%s" ) ) {...
Format the callerSearchFilter or groupSearchFilter . We need to check for String substitution . If a substitution is needed use the result as is . Otherwise construct the remainder of the filter using the name attribute of the group or caller .
162,586
private Set < String > getGroupsByMembership ( DirContext context , String callerDn ) { String memberOfAttribute = idStoreDefinition . getGroupMemberOfAttribute ( ) ; String groupNameAttribute = idStoreDefinition . getGroupNameAttribute ( ) ; Attributes attrs ; Set < String > groupDns = new HashSet < String > ( ) ; if ...
Get the groups for the caller by using the memberOf - style attribute found on user LDAP entities .
162,587
public static ValidatorFactory getValidatorFactory ( ) { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getValidatorFactory" ) ; ValidatorFactory validatorFactory = AbstractBeanValidation . getValidatorFactory ( ) ; if ( isTraceOn && t...
This method will return null if no BeanValidationService is available in the process
162,588
public void message ( MessageType type , String me , TraceComponent tc , String msgKey , Object objs , Object [ ] formattedMessage ) { switch ( type ) { case AUDIT : if ( TraceComponent . isAnyTracingEnabled ( ) && myTc . isAuditEnabled ( ) ) Tr . audit ( myTc , SIB_MESSAGE , formattedMessage ) ; break ; case ERROR : T...
The method called to indicate that a message is being generated by SibMessage
162,589
public final static void fireProbe ( long probeId , Object instance , Object target , Object args ) { Object proxyTarget = fireProbeTarget ; Method method = fireProbeMethod ; if ( proxyTarget == null || method == null ) { return ; } try { method . invoke ( proxyTarget , probeId , instance , target , args ) ; } catch ( ...
Fire a probe event to the registered target .
162,590
public synchronized void releaseId ( short id ) throws IdAllocatorException { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "releaseId" , "" + id ) ; deallocate ( id ) ; if ( id == ( nextId - 1 ) ) { nextId = id ; if ( nextId == lastFreeId ) { lastFreeId = NULL_ID ; } } else { lastFreeId = id ; } if ( tc . isEntr...
Releases an ID making it available to be allocated once more .
162,591
private String firstConstantOfEnum ( ) { Object [ ] enumConstants = targetClass . getEnumConstants ( ) ; if ( enumConstants . length != 0 ) { return enumConstants [ 0 ] . toString ( ) ; } return "" ; }
find the first constant value of the targetClass and return as a String
162,592
void checkTopicPublishPermission ( String topic ) { SecurityManager sm = System . getSecurityManager ( ) ; if ( sm == null ) return ; sm . checkPermission ( new TopicPermission ( topic , PUBLISH ) ) ; }
Check if the caller has permission to publish events to the specified topic .
162,593
protected void activate ( ComponentContext componentContext , Map < String , Object > props ) { this . componentContext = componentContext ; bundleContext = componentContext . getBundleContext ( ) ; frameworkEventAdapter = new FrameworkEventAdapter ( this ) ; bundleContext . addFrameworkListener ( frameworkEventAdapter...
Activate the EventEngine implementation . This method will be called by OSGi Declarative Services implementation when the component is initially activated and when changes to our configuration have occurred .
162,594
protected void deactivate ( ComponentContext componentContext ) { bundleContext . removeFrameworkListener ( frameworkEventAdapter ) ; frameworkEventAdapter = null ; bundleContext . removeBundleListener ( bundleEventAdapter ) ; bundleEventAdapter = null ; bundleContext . removeServiceListener ( serviceEventAdapter ) ; s...
Deactivate the EventAdmin service . This method will be called by the OSGi Declarative Services implementation when the component is deactivated . Deactivation will occur when the service configuration needs to be refreshed when the bundle is stopped or when the DS implementation is stopped .
162,595
public void addTopic ( String topic ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "addTopic" , topic ) ; SelectionCriteria criteria = _messageProcessor . getSelectionCriteriaFactory ( ) . createSelectionCriteria ( topic , null , SelectorDomain . SIMESSAGE ) ; if ( _...
Adds a topic to the subscription state for this OutputHandler .
162,596
public void removeTopic ( String topic ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "removeTopic" , topic ) ; if ( _subscriptionState == null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "removeTopic" , "Topic ...
Removes a topic from the set of topics with this OutputHandler
162,597
public String [ ] getTopics ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getTopics" ) ; String [ ] topics = null ; if ( _subscriptionState != null ) topics = _subscriptionState . getTopics ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnable...
Get the set of topics associated with this OutputHandler
162,598
public SIBUuid12 getTopicSpaceUuid ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getTopicSpaceUuid" ) ; SIBUuid12 retval = _destinationHandler . getUuid ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getTopic...
Get the topic space name associated with this OutputHandler
162,599
void processAckExpected ( long ackExpStamp , int priority , Reliability reliability , SIBUuid12 stream ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "processAckExpected" , new Long ( ackExpStamp ) ) ; _internalOutputStreamManager . process...
needs to be forwarded downstream .