idx
int64
0
165k
question
stringlengths
73
4.15k
target
stringlengths
5
918
len_question
int64
21
890
len_target
int64
3
255
159,500
HandleList getHandleList ( boolean create ) // d662032 { if ( connectionHandleList == null && create ) { connectionHandleList = new HandleList ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "getHandleList: created " + connectionHandleList ) ; } return connectionHandleList ; }
Gets the handle list associated with this bean optionally creating one if the bean does not have a handle list yet .
83
23
159,501
HandleListInterface reAssociateHandleList ( ) // d662032 throws CSIException { HandleListInterface hl ; if ( connectionHandleList == null ) { hl = HandleListProxy . INSTANCE ; } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "reAssociateHandleList: " + connectionHandleList ) ; hl = connectionHandleList ; try { hl . reAssociate ( ) ; } catch ( Exception ex ) { throw new CSIException ( "" , ex ) ; } } return hl ; }
Reassociates handles in the handle list associated with this bean and returns a handle list to be pushed onto the thread handle list stack .
130
28
159,502
void parkHandleList ( ) // d662032 { if ( connectionHandleList != null ) { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "parkHandleList: " + connectionHandleList ) ; try { connectionHandleList . parkHandle ( ) ; } catch ( Exception ex ) { if ( isTraceOn && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "parkHandleList: exception" , ex ) ; } } }
Parks handles in the handle list associated with this bean .
125
12
159,503
protected final void destroyHandleList ( ) // d662032 { if ( connectionHandleList != null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "destroyHandleList: destroying " + connectionHandleList ) ; connectionHandleList . componentDestroyed ( ) ; connectionHandleList = null ; } }
Destroy the handle list associated with this bean if necessary .
81
11
159,504
@ Override public Timer createCalendarTimer ( ScheduleExpression schedule , TimerConfig timerConfig ) { Serializable info = timerConfig == null ? null : timerConfig . getInfo ( ) ; boolean persistent = timerConfig == null || timerConfig . isPersistent ( ) ; boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "createCalendarTimer: " + persistent , this ) ; // Bean must implement TimedObject interface or have a timeout method to create a timer. if ( ! home . beanMetaData . isTimedObject ) { IllegalStateException ise = new IllegalStateException ( "Timer Service: Bean does not implement TimedObject: " + beanId ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "createCalendarTimer: " + ise ) ; throw ise ; } if ( home . beanMetaData . isEntityBean ( ) ) // d595255 { IllegalStateException ise = new IllegalStateException ( "Timer Service: Entity beans cannot use calendar-based timers: " + beanId ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "createCalendarTimer: " + ise ) ; throw ise ; } // Determine if this bean is in a state that allows timer service // method access - throws IllegalStateException if not allowed. checkTimerServiceAccess ( ) ; // Make sure the arguments are valid.... if ( schedule == null ) { IllegalArgumentException ise = new IllegalArgumentException ( "TimerService: schedule not a valid value: null" ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "createCalendarTimer: " + ise ) ; throw ise ; } Timer timer = container . getEJBRuntime ( ) . createTimer ( this , null , - 1 , schedule , info , persistent ) ; // F743-13022 if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "createCalendarTimer: " + timer ) ; return timer ; }
F7437591 . codRev
484
8
159,505
public SIMessageHandle restoreFromString ( String data ) throws IllegalArgumentException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "restoreFromString" ) ; if ( ( data == null ) || data . equals ( "" ) ) { String badValueType ; if ( data == null ) { badValueType = "NULL" ; } else { badValueType = "Empty string" ; } String exString = nls . getFormattedMessage ( "NULL_HANDLE_PASSED_FOR_RESTORE_CWSIF0032" , new Object [ ] { badValueType } , "restoreFromString called with invalid parameter of " + badValueType + "." ) ; IllegalArgumentException e = new IllegalArgumentException ( exString ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "restoreFromString called with invalid parameter of " + badValueType + "." , e ) ; throw e ; } byte [ ] bytes = HexString . hexToBin ( data , 0 ) ; // try to restore, if there is an IllegalArgumentException let it propagate up SIMessageHandle handle = restoreFromBytes ( bytes ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "restoreFromString" ) ; return handle ; }
Restore a JsMessageHandle from a String .
327
11
159,506
protected Converter createConverter ( FaceletContext ctx ) throws FacesException , ELException , FaceletException { return ctx . getFacesContext ( ) . getApplication ( ) . createConverter ( this . getConverterId ( ctx ) ) ; }
Uses the specified converterId to pull an instance from the Application
61
13
159,507
public static JmsBodyType getBodyType ( String format ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getBodyType" ) ; JmsBodyType result = null ; if ( format . equals ( SIApiConstants . JMS_FORMAT_BYTES ) ) result = BYTES ; else if ( format . equals ( SIApiConstants . JMS_FORMAT_TEXT ) ) result = TEXT ; else if ( format . equals ( SIApiConstants . JMS_FORMAT_OBJECT ) ) result = OBJECT ; else if ( format . equals ( SIApiConstants . JMS_FORMAT_STREAM ) ) result = STREAM ; else if ( format . equals ( SIApiConstants . JMS_FORMAT_MAP ) ) result = MAP ; else if ( format . equals ( SIApiConstants . JMS_FORMAT ) ) result = NULL ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getBodyType" ) ; return result ; }
Return the appropriate JMSBodyType for a specific format string
259
12
159,508
public final static JmsBodyType getJmsBodyType ( Byte aValue ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Value = " + aValue ) ; return set [ aValue . intValue ( ) ] ; }
Returns the corresponding JmsBodyType for a given Byte . This method should NOT be called by any code outside the TEXT component . It is only public so that it can be accessed by sub - packages .
69
41
159,509
final void delistRRSXAResource ( XAResource xaResource ) throws Exception { RRSXAResourceFactory xaFactory = ( RRSXAResourceFactory ) pm . connectorSvc . rrsXAResFactorySvcRef . getService ( ) ; // Make sure that the bundle is active. if ( xaFactory == null ) { throw new IllegalStateException ( "Native service for RRS transactional support is not active or available. Resource delistment is rejected." ) ; } UOWCurrent currentUOW = ( UOWCurrent ) pm . connectorSvc . transactionManager ; UOWCoordinator uowCoord = currentUOW . getUOWCoord ( ) ; // If delisting for cleanup, notify the factory that the resource has been // delisted for cleanup with the transaction manager. if ( ! uowCoord . isGlobal ( ) ) { LocalTransactionCoordinator ltCoord = ( LocalTransactionCoordinator ) uowCoord ; if ( ! ltCoord . isContainerResolved ( ) ) { ltCoord . delistFromCleanup ( ( OnePhaseXAResource ) xaResource ) ; xaFactory . delist ( uowCoord , xaResource ) ; } } }
Delists a RRS XA resource information with the transaction manager .
276
14
159,510
final XAResource enlistRRSXAResource ( int recoveryId , int branchCoupling ) throws Exception { RRSXAResourceFactory xaFactory = ( RRSXAResourceFactory ) pm . connectorSvc . rrsXAResFactorySvcRef . getService ( ) ; // Make sure that the bundle is active. if ( xaFactory == null ) { throw new IllegalStateException ( "Native service for RRS transactional support is not active or available. Resource enlistment is rejected." ) ; } XAResource xaResource = null ; UOWCurrent currentUOW = ( UOWCurrent ) pm . connectorSvc . transactionManager ; UOWCoordinator uowCoord = currentUOW . getUOWCoord ( ) ; // Enlist XA resource. if ( uowCoord . isGlobal ( ) ) { // Enlist a 2 phase XA resource in the global transaction. xaResource = xaFactory . getTwoPhaseXAResource ( uowCoord . getXid ( ) ) ; pm . connectorSvc . transactionManager . enlist ( uowCoord , xaResource , recoveryId , branchCoupling ) ; } else { // Enlist a one phase XA resource in the local transaction. If enlisting for // cleanup, notify the factory that the resource has been enlisted for cleanup // with the transaction manager. xaResource = xaFactory . getOnePhaseXAResource ( uowCoord ) ; LocalTransactionCoordinator ltCoord = ( LocalTransactionCoordinator ) uowCoord ; if ( ltCoord . isContainerResolved ( ) ) { ltCoord . enlist ( ( OnePhaseXAResource ) xaResource ) ; } else { ltCoord . enlistForCleanup ( ( OnePhaseXAResource ) xaResource ) ; } // Enlist with the native transaction manager (factory). xaFactory . enlist ( uowCoord , xaResource ) ; } return xaResource ; }
Enlists a RRS XA resource with the transaction manager .
441
13
159,511
public ConnectionManager getConnectionManager ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( this , tc , "Connection manager is " + cm + " for managed connection " + this ) ; if ( cm == null && pm != null ) { Tr . debug ( this , tc , "Connection pool is " + this . pm . toString ( ) ) ; } } if ( cm != null ) { return cm ; } else { IllegalStateException e = new IllegalStateException ( "ConnectionManager is null" ) ; Tr . error ( tc , "ILLEGAL_STATE_EXCEPTION_J2CA0079" , "getConnectionManager" , e ) ; throw e ; } }
Get the reference to the Current CM instance associated with this MCWrapper .
162
15
159,512
protected void transactionComplete ( ) { if ( state != STATE_TRAN_WRAPPER_INUSE ) { IllegalStateException e = new IllegalStateException ( "transactionComplete: illegal state exception. State = " + getStateString ( ) + " MCW = " + mcWrapperObject_hexString ) ; Object [ ] parms = new Object [ ] { "transactionComplete" , e } ; Tr . error ( tc , "ILLEGAL_STATE_EXCEPTION_J2CA0079" , parms ) ; throw e ; } state = STATE_ACTIVE_INUSE ; }
Called by the TranWrapper during afterCompletion .
131
13
159,513
protected boolean involvedInTransaction ( ) { final boolean isTracingEnabled = TraceComponent . isAnyTracingEnabled ( ) ; if ( state == STATE_TRAN_WRAPPER_INUSE ) { if ( isTracingEnabled && tc . isDebugEnabled ( ) ) { Tr . debug ( this , tc , "involvedInTransaction: true" ) ; } return true ; } else { if ( isTracingEnabled && tc . isDebugEnabled ( ) ) { Tr . debug ( this , tc , "involvedInTransaction: false" ) ; } return false ; } }
Called by the Connection manager during reassociate to check if an unshared connection is currently involved in a transaction .
122
23
159,514
@ Override public boolean hasFatalErrorNotificationOccurred ( int fatalErrorNotificationTime ) { final boolean isTracingEnabled = TraceComponent . isAnyTracingEnabled ( ) ; /* * I have changed this from using a long based on a currentTimeMillis * to an int value. * * By using an int we will perform better and synchronization is * not required. */ if ( fatalErrorValue > fatalErrorNotificationTime ) { return false ; } else { if ( isTracingEnabled && tc . isDebugEnabled ( ) ) { Tr . debug ( this , tc , "hasFatalErrorNotificationOccurred is true" ) ; } return true ; } }
Fatal Error Notification Occurred
144
6
159,515
@ Override public void setDestroyConnectionOnReturn ( ) { final boolean isTracingEnabled = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTracingEnabled && tc . isEntryEnabled ( ) ) { Tr . entry ( this , tc , "setDestroyConnectionOnReturn" ) ; } -- fatalErrorValue ; if ( isTracingEnabled && tc . isEntryEnabled ( ) ) { Tr . exit ( this , tc , "setDestroyConnectionOnReturn" , fatalErrorValue ) ; } }
This method is used for marking a connection to destroy . The connection state does not matter . The connection still can be useable . When the connection is returned to the free pool this connection will be cleaned up and destroyed .
109
44
159,516
public void resetCoordinator ( ) { final boolean isTracingEnabled = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTracingEnabled && tc . isDebugEnabled ( ) ) { Tr . debug ( this , tc , "Resetting uow coordinator to null" ) ; } uowCoord = null ; }
Reset the coordinator value to null
71
7
159,517
public void markTransactionError ( ) { final boolean isTracingEnabled = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTracingEnabled && tc . isDebugEnabled ( ) ) { Tr . debug ( this , tc , "TransactionError occurred on MCWrapper:" + toString ( ) ) ; } _transactionErrorOccurred = true ; }
Indicates that an error has occurred from the transaction service . At which point we know that the MCWrapper is no longer usable and will be destroyed when the MCWrapper is returned to the pool .
77
41
159,518
public void clearHandleList ( ) { final boolean isTracingEnabled = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTracingEnabled && tc . isDebugEnabled ( ) ) { Tr . debug ( this , tc , "Clear the McWrapper handlelist for the following MCWrapper: " + this ) ; } // since we know we are only in this method on a destroy or clean up // of a MCWrapper ,we can double check that all the handles that this MCWrapper // owns are removed from the handlelist on thread local storage before clearing the // handlelist in the MCWrapper class. I tried to be really careful to avoid NPEs // // Liberty doesn't have real HandleList so don't need to remove anything // mcwHandleList . clear ( ) ; }
clear the handle list
170
4
159,519
public boolean abortMC ( ) { boolean trace = TraceComponent . isAnyTracingEnabled ( ) ; if ( ! ( mc instanceof WSManagedConnection ) ) { if ( trace && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "abortMC" , "Skipping MC abort because MC is not an instance of WSManagedConnection" ) ; return false ; } if ( trace && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "abortMC" ) ; WSManagedConnection wsmc = ( WSManagedConnection ) mc ; try { do_not_reuse_mcw = true ; wsmc . abort ( pm . connectorSvc . execSvcRef . getServiceWithException ( ) ) ; aborted = true ; releaseToPoolManager ( ) ; // Get the connection out of the pool } catch ( SQLFeatureNotSupportedException e ) { if ( trace && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "JDBC feature or driver does not support aborting connections." ) ; } catch ( Exception e ) { com . ibm . ws . ffdc . FFDCFilter . processException ( e , "com.ibm.ejs.j2c.MCWrapper.abortMC" , "3765" , this ) ; if ( trace && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "Caught exception aborting connection or releasing aborted connection to the pool manager." ) ; } if ( trace && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "abortMC" , aborted ) ; return aborted ; }
Abort the manage connection associated with this MCWrapper .
354
12
159,520
private Bucket getOrCreateBucketForKey ( Object key ) { int index = getBucketIndexForKey ( key ) ; // Double-checked locking. Safe since buckets do not initialize any state // until they are synchronized by the caller. d739870 Bucket bucket = buckets [ index ] ; if ( bucket == null ) { synchronized ( bucketLock ) { bucket = buckets [ index ] ; if ( bucket == null ) { // If this is to be a cache of EJB Wrappers, then create Wrapper // specific buckets, that hold EJSWrapperCommon objects, // otherwise create generic BucketImpl. d195605 bucket = wrappers ? new WrapperBucket ( this ) : new BucketImpl ( ) ; buckets [ index ] = bucket ; } } } return bucket ; }
Returns the bucket which the specified key hashes to or creates it if it does not exist .
165
18
159,521
private String getProp ( Map < Object , Object > props , String key ) { String value = ( String ) props . get ( key ) ; if ( null == value ) { value = ( String ) props . get ( key . toLowerCase ( ) ) ; } return ( null != value ) ? value . trim ( ) : null ; }
Access the property that may or may not exist for the given key .
72
14
159,522
private void parsePersistence ( Map < Object , Object > props ) { parseKeepAliveEnabled ( props ) ; if ( isKeepAliveEnabled ( ) ) { parseMaxPersist ( props ) ; } }
Method to handle parsing all of the persistence related configuration values .
45
12
159,523
private void parseMaxPersist ( Map < Object , Object > props ) { // -1 means unlimited // 0..1 means 1 // X means X Object value = props . get ( HttpConfigConstants . PROPNAME_MAX_PERSIST ) ; if ( null != value ) { try { this . maxPersistRequest = minLimit ( convertInteger ( value ) , HttpConfigConstants . MIN_PERSIST_REQ ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: Max persistent requests is " + getMaximumPersistentRequests ( ) ) ; } } catch ( NumberFormatException nfe ) { FFDCFilter . processException ( nfe , getClass ( ) . getName ( ) + ".parseMaxPersist" , "1" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: Invalid max persistent requests; " + value ) ; } } } }
Check the input configuration for the maximum allowed requests per socket setting .
231
13
159,524
private void parseOutgoingVersion ( Map < Object , Object > props ) { String value = getProp ( props , HttpConfigConstants . PROPNAME_OUTGOING_VERSION ) ; if ( "1.0" . equals ( value ) ) { this . outgoingHttpVersion = VersionValues . V10 ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: Outgoing version is " + getOutgoingVersion ( ) . getName ( ) ) ; } } }
Check the input configuration for the default outgoing HTTP version setting .
120
12
159,525
private void parseBufferType ( Map < Object , Object > props ) { Object value = props . get ( HttpConfigConstants . PROPNAME_DIRECT_BUFF ) ; if ( null != value ) { this . bDirectBuffers = convertBoolean ( value ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: use direct buffers is " + isDirectBufferType ( ) ) ; } } }
Check the input configuration for the type of ByteBuffer to use direct or indirect .
108
16
159,526
private void parseOutgoingBufferSize ( Map < Object , Object > props ) { Object value = props . get ( HttpConfigConstants . PROPNAME_OUTGOING_HDR_BUFFSIZE ) ; if ( null != value ) { try { this . outgoingHdrBuffSize = rangeLimit ( convertInteger ( value ) , HttpConfigConstants . MIN_BUFFER_SIZE , HttpConfigConstants . MAX_BUFFER_SIZE ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: Outgoing hdr buffer size is " + getOutgoingHdrBufferSize ( ) ) ; } } catch ( NumberFormatException nfe ) { FFDCFilter . processException ( nfe , getClass ( ) . getName ( ) + ".parseOutgoingBufferSize" , "1" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: Invalid outgoing header buffer size; " + value ) ; } } } }
Check the input configuration for the maximum buffer size allowed for marshalling headers outbound .
240
17
159,527
private void parseIncomingHdrBufferSize ( Map < Object , Object > props ) { Object value = props . get ( HttpConfigConstants . PROPNAME_INCOMING_HDR_BUFFSIZE ) ; if ( null != value ) { try { this . incomingHdrBuffSize = rangeLimit ( convertInteger ( value ) , HttpConfigConstants . MIN_BUFFER_SIZE , HttpConfigConstants . MAX_BUFFER_SIZE ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: Incoming hdr buffer size is " + getIncomingHdrBufferSize ( ) ) ; } } catch ( NumberFormatException nfe ) { FFDCFilter . processException ( nfe , getClass ( ) . getName ( ) + ".parseIncomingHdrBufferSize" , "1" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: Invalid incoming hdr buffer size of " + value ) ; } } } }
Check the input configuration for the buffer size to use when parsing the incoming headers .
245
16
159,528
private void parseIncomingBodyBufferSize ( Map < Object , Object > props ) { Object value = props . get ( HttpConfigConstants . PROPNAME_INCOMING_BODY_BUFFSIZE ) ; if ( null != value ) { try { this . incomingBodyBuffSize = rangeLimit ( convertInteger ( value ) , HttpConfigConstants . MIN_BUFFER_SIZE , HttpConfigConstants . MAX_BUFFER_SIZE ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: Incoming body buffer size is " + getIncomingBodyBufferSize ( ) ) ; } } catch ( NumberFormatException nfe ) { FFDCFilter . processException ( nfe , getClass ( ) . getName ( ) + ".parseIncomingBodyBufferSize" , "1" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: Invalid incoming body buffer size; " + value ) ; } } } }
Check the input configuration for the buffer size to use when reading the incoming body .
239
16
159,529
private void parsePersistTimeout ( Map < Object , Object > props ) { Object value = props . get ( HttpConfigConstants . PROPNAME_PERSIST_TIMEOUT ) ; if ( null != value ) { try { this . persistTimeout = TIMEOUT_MODIFIER * minLimit ( convertInteger ( value ) , HttpConfigConstants . MIN_TIMEOUT ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: Persist timeout is " + getPersistTimeout ( ) ) ; } } catch ( NumberFormatException nfe ) { FFDCFilter . processException ( nfe , getClass ( ) . getName ( ) + ".parsePersistTimeout" , "1" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: Invalid persist timeout; " + value ) ; } } } }
Check the input configuration for the timeout to use in between persistent requests .
215
14
159,530
private void parseReadTimeout ( Map < Object , Object > props ) { Object value = props . get ( HttpConfigConstants . PROPNAME_READ_TIMEOUT ) ; if ( null != value ) { try { this . readTimeout = TIMEOUT_MODIFIER * minLimit ( convertInteger ( value ) , HttpConfigConstants . MIN_TIMEOUT ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: Read timeout is " + getReadTimeout ( ) ) ; } } catch ( NumberFormatException nfe ) { FFDCFilter . processException ( nfe , getClass ( ) . getName ( ) + ".parseReadTimeout" , "1" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: Invalid read timeout; " + value ) ; } } } }
Check the input configuration for the timeout to use when doing any read during a connection .
209
17
159,531
private void parseWriteTimeout ( Map < Object , Object > props ) { Object value = props . get ( HttpConfigConstants . PROPNAME_WRITE_TIMEOUT ) ; if ( null != value ) { try { this . writeTimeout = TIMEOUT_MODIFIER * minLimit ( convertInteger ( value ) , HttpConfigConstants . MIN_TIMEOUT ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: Write timeout is " + getWriteTimeout ( ) ) ; } } catch ( NumberFormatException nfe ) { FFDCFilter . processException ( nfe , getClass ( ) . getName ( ) + ".parseWriteTimeout" , "1" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: Invalid write timeout; " + value ) ; } } } }
Check the input configuration for the timeout to use when writing data during the connection .
210
16
159,532
private void parseByteCacheSize ( Map < Object , Object > props ) { Object value = props . get ( HttpConfigConstants . PROPNAME_BYTE_CACHE_SIZE ) ; if ( null != value ) { try { this . byteCacheSize = rangeLimit ( convertInteger ( value ) , HttpConfigConstants . MIN_BYTE_CACHE_SIZE , HttpConfigConstants . MAX_BYTE_CACHE_SIZE ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: byte cache size is " + getByteCacheSize ( ) ) ; } } catch ( NumberFormatException nfe ) { FFDCFilter . processException ( nfe , getClass ( ) . getName ( ) + ".parseByteCacheSize" , "1" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: Invalid bytecache setting of " + value ) ; } } } }
Check the input configuration for the size of the parse byte cache to use .
235
15
159,533
private void parseDelayedExtract ( Map < Object , Object > props ) { Object value = props . get ( HttpConfigConstants . PROPNAME_EXTRACT_VALUE ) ; if ( null != value ) { this . bExtractValue = convertBoolean ( value ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: header value extraction is " + shouldExtractValue ( ) ) ; } } }
Check the input configuration for the flag on whether to immediately extract header values during the parsing stage or not .
110
21
159,534
private void parseBinaryTransport ( Map < Object , Object > props ) { Object value = props . get ( HttpConfigConstants . PROPNAME_BINARY_TRANSPORT ) ; if ( null != value ) { this . bBinaryTransport = convertBoolean ( value ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: binary transport is " + isBinaryTransportEnabled ( ) ) ; } } }
Check the input configuration for whether the parsing and marshalling should use the binary transport mode or not .
115
20
159,535
private void parseLimitFieldSize ( Map < Object , Object > props ) { Object value = props . get ( HttpConfigConstants . PROPNAME_LIMIT_FIELDSIZE ) ; if ( null != value ) { try { this . limitFieldSize = rangeLimit ( convertInteger ( value ) , HttpConfigConstants . MIN_LIMIT_FIELDSIZE , HttpConfigConstants . MAX_LIMIT_FIELDSIZE ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: field size limit is " + getLimitOfFieldSize ( ) ) ; } } catch ( NumberFormatException nfe ) { FFDCFilter . processException ( nfe , getClass ( ) . getName ( ) + ".parseLimitFieldSize" , "1" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: Invaild max field size setting of " + value ) ; } } } }
Check the input configuration for a maximum size allowed for HTTP fields .
239
13
159,536
private void parseLimitNumberHeaders ( Map < Object , Object > props ) { Object value = props . get ( HttpConfigConstants . PROPNAME_LIMIT_NUMHEADERS ) ; if ( null != value ) { try { this . limitNumHeaders = rangeLimit ( convertInteger ( value ) , HttpConfigConstants . MIN_LIMIT_NUMHEADERS , HttpConfigConstants . MAX_LIMIT_NUMHEADERS ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: Num hdrs limit is " + getLimitOnNumberOfHeaders ( ) ) ; } } catch ( NumberFormatException nfe ) { FFDCFilter . processException ( nfe , getClass ( ) . getName ( ) + ".parseLimitNumberHeaders" , "1" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: Invalid number of headers limit; " + value ) ; } } } }
Check the input configuration for a maximum limit on the number of headers allowed per message .
241
17
159,537
private void parseLimitNumberResponses ( Map < Object , Object > props ) { Object value = props . get ( HttpConfigConstants . PROPNAME_LIMIT_NUMBER_RESPONSES ) ; if ( null != value ) { try { int size = convertInteger ( value ) ; if ( HttpConfigConstants . UNLIMITED == size ) { this . limitNumResponses = HttpConfigConstants . MAX_LIMIT_NUMRESPONSES ; } else { this . limitNumResponses = rangeLimit ( size , 1 , HttpConfigConstants . MAX_LIMIT_NUMRESPONSES ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: Num responses limit is " + getLimitOnNumberOfResponses ( ) ) ; } } catch ( NumberFormatException nfe ) { FFDCFilter . processException ( nfe , getClass ( ) . getName ( ) + ".parseLimitNumberResponses" , "1" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: Invalid max number of responses; " + value ) ; } } } }
Check the input configuration for a maximum limit on the number of temporary responses that will be read and skipped past .
286
22
159,538
private void parseLimitMessageSize ( Map < Object , Object > props ) { Object value = props . get ( HttpConfigConstants . PROPNAME_MSG_SIZE_LIMIT ) ; if ( null != value ) { try { this . limitMessageSize = convertLong ( value ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: Message size limit is " + getMessageSizeLimit ( ) ) ; } } catch ( NumberFormatException nfe ) { FFDCFilter . processException ( nfe , getClass ( ) . getName ( ) + ".parseLimitMessageSize" , "1" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: Invalid message size limit; " + value ) ; } } } }
Parse the possible configuration limit on the incoming message body . size .
197
14
159,539
private void parseAccessLog ( Map < Object , Object > props ) { String id = ( String ) props . get ( HttpConfigConstants . PROPNAME_ACCESSLOG_ID ) ; if ( id != null ) { AtomicReference < AccessLog > aLog = HttpEndpointImpl . getAccessLogger ( id ) ; if ( aLog != null ) { this . accessLogger = aLog ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Config: using logging service" , accessLogger ) ; } } }
Parse the NCSA access log information from the property map .
134
13
159,540
private void parseRemoteIp ( Map < Object , Object > props ) { Object value = props . get ( HttpConfigConstants . PROPNAME_REMOTE_IP ) ; if ( null != value ) { this . useForwardingHeaders = convertBoolean ( value ) ; if ( this . useForwardingHeaders && ( TraceComponent . isAnyTracingEnabled ( ) ) && ( tc . isEventEnabled ( ) ) ) { Tr . event ( tc , "HTTP Channel Config: remoteIp has been enabled" ) ; } } }
Check the configuration to see if the remoteIp element has been configured to consider forwarding header values in the NCSA Access Log
118
25
159,541
private void parseAllowRetries ( Map < Object , Object > props ) { Object value = props . get ( HttpConfigConstants . PROPNAME_ALLOW_RETRIES ) ; if ( null != value ) { this . bAllowRetries = convertBoolean ( value ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: allow retries is " + allowsRetries ( ) ) ; } } }
Parse the input configuration for the flag on whether to allow retries or not .
109
17
159,542
private void parseHeaderValidation ( Map < Object , Object > props ) { Object value = props . get ( HttpConfigConstants . PROPNAME_HEADER_VALIDATION ) ; if ( null != value ) { this . bHeaderValidation = convertBoolean ( value ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: header validation is " + isHeaderValidationEnabled ( ) ) ; } } }
Parse the configuration on whether to perform header validation or not .
110
13
159,543
private void parseJITOnlyReads ( Map < Object , Object > props ) { Object value = props . get ( HttpConfigConstants . PROPNAME_JIT_ONLY_READS ) ; if ( null != value ) { this . bJITOnlyReads = convertBoolean ( value ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: JIT only reads is " + isJITOnlyReads ( ) ) ; } } }
Parse the configuration on whether to perform JIT allocate only reads or leave it to the default behavior .
119
21
159,544
private void parseStrictURLFormat ( Map < Object , Object > props ) { Object value = props . get ( HttpConfigConstants . PROPNAME_STRICT_URL_FORMAT ) ; if ( null != value ) { this . bStrictURLFormat = convertBoolean ( value ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: Strict URL formatting is " + isStrictURLFormat ( ) ) ; } } }
Check the input configuration to decide whether to enforce a strict RFC compliance while parsing URLs .
115
17
159,545
private void parseServerHeader ( Map < Object , Object > props ) { // @PK15848 String value = getProp ( props , HttpConfigConstants . PROPNAME_SERVER_HEADER_VALUE ) ; if ( null == value || "" . equals ( value ) ) { // due to security change, do not default value in Server header. // PM87013 Start } else { if ( "DefaultServerVersion" . equalsIgnoreCase ( value ) ) { value = "WebSphere Application Server" ; } this . baServerHeaderValue = GenericUtils . getEnglishBytes ( value ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: server header value [" + value + "]" ) ; } } // PM87013 (PM75371) End Object ov = props . get ( HttpConfigConstants . PROPNAME_REMOVE_SERVER_HEADER ) ; if ( null != ov ) { this . bRemoveServerHeader = convertBoolean ( ov ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: remove server header is " + removeServerHeader ( ) ) ; } } }
Check the input configuration map for the parameters that control the Server header value .
278
15
159,546
private void parseDateHeaderRange ( Map < Object , Object > props ) { // @313642 Object value = props . get ( HttpConfigConstants . PROPNAME_DATE_HEADER_RANGE ) ; if ( null != value ) { try { this . lDateHeaderRange = minLimit ( convertLong ( value ) , 0L ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: date header range is " + value ) ; } } catch ( NumberFormatException nfe ) { FFDCFilter . processException ( nfe , getClass ( ) . getName ( ) + ".parseDateHeaderRange" , "1" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: Invalid date header range; " + value ) ; } } } }
Parse the date header range value from the input properties .
204
12
159,547
private void parseCookieUpdate ( Map < Object , Object > props ) { //This property needed to be documented using a new name because //the original property contains a banned word for metatype: 'config' //This change will verify if either (or both) original/documented properties //are set. The instance variable they reference will be set to false if //either property is set to false. Object value = props . get ( HttpConfigConstants . PROPNAME_NO_CACHE_COOKIES_CONTROL ) ; Object value2 = props . get ( HttpConfigConstants . PROPNAME_COOKIES_CONFIGURE_NOCACHE ) ; boolean documentedProperty = true ; boolean originalProperty = true ; if ( null != value ) { documentedProperty = convertBoolean ( value ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: set no-cache cookie control is " + documentedProperty ) ; } } if ( null != value2 ) { originalProperty = convertBoolean ( value2 ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: set-cookie configures no-cache is " + originalProperty ) ; } } this . bCookiesConfigureNoCache = originalProperty && documentedProperty ; }
Check the configuration map for the Set - Cookie updating no - cache value .
305
15
159,548
private void parseHeaderChangeLimit ( Map < Object , Object > props ) { Object value = props . get ( HttpConfigConstants . PROPNAME_HEADER_CHANGE_LIMIT ) ; if ( null != value ) { try { this . headerChangeLimit = convertInteger ( value ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: header change limit is " + getHeaderChangeLimit ( ) ) ; } } catch ( NumberFormatException nfe ) { FFDCFilter . processException ( nfe , getClass ( ) . getName ( ) + ".parseHeaderChangeLimit" , "1" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: Invalid header change count of " + value ) ; } } } }
Parse the header change limit property .
198
8
159,549
private void parseRequestSmugglingProtection ( Map < Object , Object > props ) { // PK53193 - allow this to be disabled Object value = props . get ( HttpConfigConstants . PROPNAME_ENABLE_SMUGGLING_PROTECTION ) ; if ( null != value ) { this . bEnableSmugglingProtection = convertBoolean ( value ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Config: request smuggling protection is " + this . bEnableSmugglingProtection ) ; } } }
Check whether or not the request smuggling protection has been changed .
134
12
159,550
private void parseAutoDecompression ( Map < Object , Object > props ) { // PK41619 - allow this to be turned off Object value = props . get ( HttpConfigConstants . PROPNAME_AUTODECOMPRESSION ) ; if ( null != value ) { this . bAutoDecompression = convertBoolean ( value ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: autodecompression is " + isAutoDecompressionEnabled ( ) ) ; } } }
Check the configuration map for the property turning on or off the body autodecompression code .
127
20
159,551
private void parsev0CookieDateRFC1123compat ( Map < ? , ? > props ) { Object value = props . get ( HttpConfigConstants . PROPNAME_V0_COOKIE_RFC1123_COMPAT ) ; if ( null != value ) { this . v0CookieDateRFC1123compat = convertBoolean ( value ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: v0CookieDateRFC1123compat is " + isv0CookieDateRFC1123compat ( ) + " this = " + this ) ; } }
Check the for the property v0CookieDateRFC1123compat
152
15
159,552
private void parseSkipCookiePathQuotes ( Map < ? , ? > props ) { //738893 - Skip adding the quotes to the cookie path attribute String value = ( String ) props . get ( HttpConfigConstants . PROPNAME_SKIP_PATH_QUOTE ) ; if ( null != value ) { this . skipCookiePathQuotes = convertBoolean ( value ) ; if ( ( TraceComponent . isAnyTracingEnabled ( ) ) && ( tc . isEventEnabled ( ) ) ) { Tr . event ( tc , "Config: SkipCookiePathQuotes is " + shouldSkipCookiePathQuotes ( ) ) ; } } }
Check the configuration map for if we should skip adding the quote to the cookie path attribute
139
17
159,553
private void parseDoNotAllowDuplicateSetCookies ( Map < ? , ? > props ) { //PI31734 - prevent multiple Set-Cookies with the same name String value = ( String ) props . get ( HttpConfigConstants . PROPNAME_DO_NOT_ALLOW_DUPLICATE_SET_COOKIES ) ; if ( null != value ) { this . doNotAllowDuplicateSetCookies = convertBoolean ( value ) ; if ( ( TraceComponent . isAnyTracingEnabled ( ) ) && ( tc . isEventEnabled ( ) ) ) { Tr . event ( tc , "Config: DoNotAllowDuplicateSetCookies is " + doNotAllowDuplicateSetCookies ( ) ) ; } } }
Check the configuration map for the property to tell us if we should prevent multiple set - cookies with the same name
165
22
159,554
private void parseWaitForEndOfMessage ( Map props ) { //PI11176 String value = ( String ) props . get ( HttpConfigConstants . PROPNAME_WAIT_FOR_END_OF_MESSAGE ) ; if ( null != value ) { this . waitForEndOfMessage = convertBoolean ( value ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: PI33453:WaitForEndOfMessage is " + shouldWaitForEndOfMessage ( ) ) ; } } }
Check the configuration map for using WaitForEndOfMessage
130
11
159,555
private void parseRemoveCLHeaderInTempStatusRespRFC7230compat ( Map props ) { //PI35277 String value = ( String ) props . get ( HttpConfigConstants . REMOVE_CLHEADER_IN_TEMP_STATUS_RFC7230_COMPAT ) ; if ( null != value ) { this . removeCLHeaderInTempStatusRespRFC7230compat = convertBoolean ( value ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Config: RemoveCLHeaderInTempStatusRespRFC7230compat " + shouldRemoveCLHeaderInTempStatusRespRFC7230compat ( ) ) ; } } }
Check the configuration map for to see if we should send or not content - length on 1xx and 204 responses
159
22
159,556
private void parsePreventResponseSplit ( Map < ? , ? > props ) { //PI45266 String value = ( String ) props . get ( HttpConfigConstants . PROPNAME_PREVENT_RESPONSE_SPLIT ) ; if ( null != value ) { this . preventResponseSplit = convertBoolean ( value ) ; if ( ( TraceComponent . isAnyTracingEnabled ( ) ) && ( tc . isEventEnabled ( ) ) ) { Tr . event ( tc , "Config: PreventResponseSplit is " + shouldPreventResponseSplit ( ) ) ; } } }
Check the configuration map for if we should prevent response splitting
128
11
159,557
private void parseAttemptPurgeData ( Map props ) { //PI11176 String value = ( String ) props . get ( HttpConfigConstants . PROPNAME_PURGE_DATA_DURING_CLOSE ) ; if ( null != value ) { this . attemptPurgeData = convertBoolean ( value ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: PI11176:PurgeDataDuringClose is " + shouldAttemptPurgeData ( ) ) ; } } }
Check the configuration map for using purge behavior at the close of the connection
125
14
159,558
private void parseThrowIOEForInboundConnections ( Map < ? , ? > props ) { //PI57542 Object value = props . get ( HttpConfigConstants . PROPNAME_THROW_IOE_FOR_INBOUND_CONNECTIONS ) ; if ( null != value ) { this . throwIOEForInboundConnections = convertBoolean ( value ) ; if ( ( TraceComponent . isAnyTracingEnabled ( ) ) && ( tc . isEventEnabled ( ) ) ) { Tr . event ( tc , "Config: ThrowIOEForInboundConnections is " + throwIOEForInboundConnections ( ) ) ; } } }
Check the configuration map for if we should swallow inbound connections IOEs
146
14
159,559
private void parsePurgeRemainingResponseBody ( Map < ? , ? > props ) { String purgeRemainingResponseProperty = AccessController . doPrivileged ( new java . security . PrivilegedAction < String > ( ) { @ Override public String run ( ) { return ( System . getProperty ( HttpConfigConstants . PROPNAME_PURGE_REMAINING_RESPONSE ) ) ; } } ) ; if ( purgeRemainingResponseProperty != null ) { this . purgeRemainingResponseBody = convertBoolean ( purgeRemainingResponseProperty ) ; if ( ( TraceComponent . isAnyTracingEnabled ( ) ) && ( tc . isEventEnabled ( ) ) ) { Tr . event ( tc , "Config: PurgeRemainingResponseBody is " + shouldPurgeRemainingResponseBody ( ) ) ; } } }
Check the configuration if we should purge the remaining response data This is a JVM custom property as it s intended for outbound scenarios
181
26
159,560
private void parseProtocolVersion ( Map < ? , ? > props ) { Object protocolVersionProperty = props . get ( HttpConfigConstants . PROPNAME_PROTOCOL_VERSION ) ; if ( null != protocolVersionProperty ) { String protocolVersion = ( ( String ) protocolVersionProperty ) . toLowerCase ( ) ; if ( HttpConfigConstants . PROTOCOL_VERSION_11 . equals ( protocolVersion ) ) { this . useH2ProtocolAttribute = Boolean . FALSE ; } else if ( HttpConfigConstants . PROTOCOL_VERSION_2 . equals ( protocolVersion ) ) { this . useH2ProtocolAttribute = Boolean . TRUE ; } if ( ( TraceComponent . isAnyTracingEnabled ( ) ) && ( tc . isEventEnabled ( ) ) && this . useH2ProtocolAttribute != null ) { Tr . event ( tc , "HTTP Channel Config: versionProtocol has been set to " + protocolVersion ) ; } } }
Check the configuration to see if there is a desired http protocol version that has been provided for this HTTP Channel
210
21
159,561
private boolean convertBoolean ( Object o ) { if ( o instanceof Boolean ) return ( Boolean ) o ; return "true" . equalsIgnoreCase ( o . toString ( ) . trim ( ) ) ; }
Convert a String to a boolean value . If the string does not match true then it defaults to false .
46
22
159,562
private int rangeLimit ( int size , int min , int max ) { if ( size < min ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Config: " + size + " too small" ) ; } return min ; } else if ( size > max ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Config: " + size + " too large" ) ; } return max ; } return size ; }
Take the user input size variable and make sure it is inside the given range of min and max . If it is outside the range then set the value to the closest limit .
126
35
159,563
private int minLimit ( int input , int min ) { if ( input < min ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Config: " + input + " too small." ) ; } return min ; } return input ; }
Return the larger value of either the input int or the minimum limit .
69
14
159,564
public boolean throwIOEForInboundConnections ( ) { //If the httpOption throwIOEForInboundConnections is defined, return that value if ( this . throwIOEForInboundConnections != null ) return this . throwIOEForInboundConnections ; //PI57542 //Otherwise, verify if a declarative service has been set to dictate the behavior //for this property. If not, return false. Boolean IOEForInboundConnectionsBehavior = HttpDispatcher . useIOEForInboundConnectionsBehavior ( ) ; return ( ( IOEForInboundConnectionsBehavior != null ) ? IOEForInboundConnectionsBehavior : Boolean . FALSE ) ; }
Query whether or not the HTTP Channel should swallow inbound connections IOE
153
14
159,565
public void activate ( ComponentContext cc ) { executorServiceRef . activate ( cc ) ; contextServiceRef . activate ( cc ) ; ReactiveStreamsFactoryResolver . setInstance ( new ReactiveStreamsFactoryImpl ( ) ) ; ReactiveStreamsEngineResolver . setInstance ( this ) ; singleton = this ; }
The OSGi component active call
70
6
159,566
public void deactivate ( ComponentContext cc ) { singleton = null ; ReactiveStreamsEngineResolver . setInstance ( null ) ; ReactiveStreamsFactoryResolver . setInstance ( null ) ; executorServiceRef . deactivate ( cc ) ; contextServiceRef . deactivate ( cc ) ; }
The OSGi component deactive call
65
7
159,567
public synchronized List getList ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getList" ) ; // Remove a List from the pool List list = ( List ) listPool . remove ( ) ; // If the list is null then there was none available in the pool // So create a new one if ( list == null ) { if ( tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "No list available from pool - creating a new one" ) ; // We could change the list implementation here if we wanted list = new ArrayList ( 5 ) ; } if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getList" ) ; return list ; }
Gets a list from the pool .
160
8
159,568
public synchronized void returnList ( List list ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "returnList" ) ; list . clear ( ) ; listPool . add ( list ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "returnList" ) ; }
Returns a list back to the pool so that it can be re - used
73
15
159,569
void setParent ( JMFMessageData parent ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) JmfTr . entry ( this , tc , "setParent" , new Object [ ] { parent } ) ; synchronized ( getMessageLockArtefact ( ) ) { // If the parent is a JSMessageData then this is straight forward if ( parent instanceof JSMessageData ) { parentMessage = ( JSMessageData ) parent ; master = ( ( JSMessageData ) parent ) . master ; containingMessage = ( ( JSMessageData ) parent ) . compatibilityWrapperOrSelf ; } // ... if not, it must be a JSCompatibleMessageImpl, and its encoding must // be a JSMessageData, because if it was a JMFEncapsulation it couldn't be our parent else { JSMessageData msg = ( JSMessageData ) ( ( JSCompatibleMessageImpl ) parent ) . getEncodingMessage ( ) ; parentMessage = msg ; master = msg . master ; containingMessage = parent ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) JmfTr . exit ( this , tc , "setParent" ) ; }
method is not private & we re somewhat paranoid .
274
10
159,570
private Object ownership ( Object val , boolean forceShared ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) JmfTr . entry ( this , tc , "ownership" , new Object [ ] { val , Boolean . valueOf ( forceShared ) } ) ; if ( val instanceof JSMessageData ) { ( ( JSMessageData ) val ) . setParent ( compatibilityWrapperOrSelf ) ; if ( forceShared ) { ( ( JSMessageData ) val ) . sharedContents = true ; } } else if ( val instanceof JMFEncapsulation ) { ( ( JMFEncapsulation ) val ) . setContainingMessageData ( compatibilityWrapperOrSelf ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) JmfTr . exit ( this , tc , "ownership" , val ) ; return val ; }
this new instance and it logically belongs in the locking scope of this . master .
206
16
159,571
private void checkPrimitiveType ( int accessor , int typeCode ) throws JMFUninitializedAccessException , JMFSchemaViolationException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) JmfTr . entry ( this , tc , "checkPrimitiveType" , new Object [ ] { Integer . valueOf ( accessor ) , Integer . valueOf ( typeCode ) } ) ; JSField field = getFieldDef ( accessor , true ) ; if ( field == null ) { JMFUninitializedAccessException e = new JMFUninitializedAccessException ( "Value at accessor " + accessor + " should not be present" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) JmfTr . exit ( this , tc , "checkPrimitiveType" , e ) ; throw e ; } if ( field instanceof JSPrimitive ) { if ( ( ( JSPrimitive ) field ) . getTypeCode ( ) != typeCode ) { JMFSchemaViolationException e = new JMFSchemaViolationException ( "Value at accessor " + accessor + " is incorrect type" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) JmfTr . exit ( this , tc , "checkPrimitiveType" , e ) ; throw e ; } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) JmfTr . exit ( this , tc , "checkPrimitiveType" ) ; return ; } } else if ( field instanceof JSEnum && ( typeCode == JMFPrimitiveType . INT ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) JmfTr . exit ( this , tc , "checkPrimitiveType" ) ; return ; } else { JMFSchemaViolationException e = new JMFSchemaViolationException ( "Value at accessor " + accessor + " is incorrect" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) JmfTr . exit ( this , tc , "checkPrimitiveType" , e ) ; throw e ; } }
already hold the lock .
506
6
159,572
void lazyCopy ( JSMessageData original ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) JmfTr . entry ( this , tc , "lazyCopy" , new Object [ ] { original } ) ; synchronized ( getMessageLockArtefact ( ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) JmfTr . debug ( this , tc , "lazyCopy locked dest " , new Object [ ] { getMessageLockArtefact ( ) } ) ; // This is the only occasion that we reach out and lock another message instance // but we work on the assumption that lazy copying is happening as part of // instantiation of a new message instance, so the potential for deadlocking // is nil, since no other thread knows about this instance and can not therefore // be concurrently supplying 'this' as the 'original' argument in another thread. synchronized ( original . getMessageLockArtefact ( ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) JmfTr . debug ( this , tc , "lazyCopy locked source " , new Object [ ] { original . getMessageLockArtefact ( ) } ) ; // Copy common fields indirect = original . indirect ; // If the message is assembled (i.e. we have a contents buffer) we share both the // buffer and the cache between original and copy. // If the message is unassembled (no contents buffer) we just share the cache. // In either case if a change later needs to be made to the shared portion we // will need to copy it before changing, so the shared flags is set to // indicate sharing exists between unrelated parts. if ( original . contents == null ) { contents = null ; original . sharedCache = true ; sharedCache = true ; cache = original . cache ; } else { original . sharedContents = true ; sharedContents = true ; contents = original . contents ; original . sharedCache = true ; sharedCache = true ; cache = original . cache ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) JmfTr . debug ( this , tc , "lazyCopy unlocking source " , new Object [ ] { original . getMessageLockArtefact ( ) } ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) JmfTr . debug ( this , tc , "lazyCopy unlocking dest " , new Object [ ] { getMessageLockArtefact ( ) } ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) JmfTr . exit ( this , tc , "lazyCopy" ) ; }
setting up the sharing state .
603
6
159,573
public Set < String > getKeySet ( ) { HashSet < String > result = new HashSet <> ( ) ; for ( PollingDynamicConfig config : children ) { Iterator < String > iter = config . getKeys ( ) ; while ( iter . hasNext ( ) ) { String key = iter . next ( ) ; result . add ( key ) ; } } return result ; }
Return a set of all unique keys tracked by any child of this composite . This can be an expensive operations as it requires iterating through all of the children .
83
32
159,574
public final boolean isAutoCommit ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( this , tc , "isAutoCommit" ) ; SibTr . exit ( this , tc , "isAutoCommit" , "return=false" ) ; } return false ; }
We don t need to delegate this method as we know the answer!
79
14
159,575
public void incrementCurrentSize ( ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "incrementCurrentSize" ) ; if ( _currentTran != null ) { _currentTran . incrementCurrentSize ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "incrementCurrentSize" ) ; }
Feature 199334 . 1
115
5
159,576
public boolean isAlive ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "isAlive" ) ; boolean retval = false ; if ( _currentTran != null ) { retval = _currentTran . isAlive ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "isAlive" , "return=" + retval ) ; return retval ; }
Defect 186657 . 4
127
7
159,577
public void end ( Xid xid , int flags ) throws XAException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "end" , new Object [ ] { "XID=" + xid , _manager . xaFlagsToString ( flags ) } ) ; try { _manager . end ( new PersistentTranId ( xid ) , flags ) ; // Reset our instance variables. _currentTran = null ; _currentPtid = null ; } catch ( XidUnknownException xue ) { com . ibm . ws . ffdc . FFDCFilter . processException ( xue , "com.ibm.ws.sib.msgstore.transactions.MSDelegatingXAResource.end" , "1:375:1.51.1.7" , this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) SibTr . event ( this , tc , "Cannot dis-associate from this Xid. It is unknown!" , xue ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "end" ) ; XAException xaException = new XAException ( XAException . XAER_NOTA ) ; xaException . initCause ( xue ) ; throw xaException ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "end" ) ; }
Ends the association that this resource has with the passed transaction branch . Either temporarily via a TMSUSPEND or permanently via TMSUCCESS or TMFAIL .
366
36
159,578
public Xid [ ] recover ( int recoveryId ) throws XAException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "recover" , "Recovery ID=" + recoveryId ) ; Xid [ ] list = _manager . recover ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "recover" , "return=" + Arrays . toString ( list ) ) ; return list ; }
Used at transaction recovery time to retrieve the list on indoubt XIDs known to the MessageStore instance associated with this MSDelegatingXAResource .
129
32
159,579
public static String dumpAsString ( Object obj ) { if ( obj instanceof DERObject ) { return _dumpAsString ( "" , ( DERObject ) obj ) ; } else if ( obj instanceof DEREncodable ) { return _dumpAsString ( "" , ( ( DEREncodable ) obj ) . getDERObject ( ) ) ; } return "unknown object type " + obj . toString ( ) ; }
dump out a DER object as a formatted string
93
10
159,580
public void deployMicroProfileLoginConfigFormLoginInWebXmlBasicInApp ( LibertyServer server ) throws Exception { List < String > classList = createAppClassListBuildAppNames ( "CommonMicroProfileMarker_FormLoginInWeb_BasicInApp" , "MicroProfileLoginConfigFormLoginInWebXmlBasicInApp" ) ; ShrinkHelper . exportAppToServer ( server , genericCreateArchiveWithJsps ( MpJwtFatConstants . LOGINCONFIG_FORM_LOGIN_IN_WEB_XML_SERVLET_BASIC_IN_APP_ROOT_CONTEXT , classList ) ) ; server . addInstalledAppForValidation ( MpJwtFatConstants . LOGINCONFIG_FORM_LOGIN_IN_WEB_XML_SERVLET_BASIC_IN_APP_ROOT_CONTEXT ) ; }
create app with loginConfig set to Form Login in WEB . xml and Basic in the App
198
19
159,581
protected WebArchive genericCreateArchiveWithPems ( String sourceWarName , String baseWarName , List < String > classList ) throws Exception { try { String warName = baseWarName + ".war" ; WebArchive newWar = ShrinkWrap . create ( WebArchive . class , warName ) ; addDefaultFileAssetsForAppsToWar ( sourceWarName , newWar ) ; addPemFilesForAppsToWar ( warName , newWar ) ; for ( String theClass : classList ) { newWar . addClass ( theClass ) ; } return newWar ; } catch ( Exception e ) { Log . error ( thisClass , "genericCreateArchive" , e ) ; throw e ; } }
Create a test war using files from the source war and the classList . Add a default list of pem files
158
23
159,582
protected WebArchive genericCreateArchiveWithPemsAndMPConfig ( String sourceWarName , String baseWarName , List < String > classList , String mpConfig , String fileContent ) throws Exception { try { WebArchive newWar = genericCreateArchiveWithPems ( sourceWarName , baseWarName , classList ) ; newWar . add ( new StringAsset ( fileContent ) , mpConfig ) ; return newWar ; } catch ( Exception e ) { Log . error ( thisClass , "genericCreateArchive" , e ) ; throw e ; } }
Create a test war using files from the source war and the classList . Add a default list of pem files . Also add a microprofile - config . properties file with the content passed to this method
121
41
159,583
public List < String > createAppClassListBuildAppNames ( String app1 , String app2 , String app3 ) throws Exception { List < String > classList = createAppClassListBuildAppNames ( app1 , app2 ) ; classList . add ( "com.ibm.ws.jaxrs.fat.microProfileApp." + app2 + ".MicroProfileApp" + app3 ) ; return classList ; }
All of the test apps following the same naming convention . We can build the class names
92
17
159,584
public String getOutputBufferAsString ( ) throws IOException { byte [ ] buffer = getOutputBuffer ( ) ; if ( buffer != null ) return new String ( buffer , this . getCharacterEncoding ( ) ) ; else return null ; }
Get the output from the response outputstream as a String . This method should only be used to retrieve content that is known to be text based . Using this method to retrieve binary data will corrupt the response data .
51
42
159,585
public void transferResponse ( HttpServletResponse target ) throws IOException // never // called // for // ARD. // would // be // in // trouble // with // a // bunch // of // include // warnings { _finish ( ) ; if ( containsError ( ) ) { // transfer error String message = getErrorMessage ( ) ; int sc = getErrorStatusCode ( ) ; if ( message == null ) { target . sendError ( sc ) ; } else { target . sendError ( sc , message ) ; } } else if ( isRedirected ( ) ) { // transfer cookies Cookie [ ] cookies = getCookies ( ) ; for ( int i = 0 ; i < cookies . length ; i ++ ) { target . addCookie ( cookies [ i ] ) ; } // transfer redirect target . sendRedirect ( getRedirectURI ( ) ) ; } else { // transfer status code if ( getStatusMessage ( ) == null ) { target . setStatus ( getStatusCode ( ) ) ; } else { target . setStatus ( getStatusCode ( ) , getStatusMessage ( ) ) ; } // transfer headers _header . transferHeader ( target ) ; // transfer cookies Cookie [ ] cookies = getCookies ( ) ; for ( int i = 0 ; i < cookies . length ; i ++ ) { target . addCookie ( cookies [ i ] ) ; } if ( this . getOutputBuffer ( ) != null ) { // PM17019 // transfer data ServletOutputStream out ; try { out = target . getOutputStream ( ) ; } catch ( IllegalStateException i ) { while ( ! ( target instanceof StoredResponse ) ) { while ( target instanceof HttpServletResponseWrapper ) { target = ( ( HttpServletResponse ) ( ( HttpServletResponseWrapper ) target ) . getResponse ( ) ) ; } while ( target instanceof HttpServletResponseProxy ) { target = ( ( HttpServletResponse ) ( ( HttpServletResponseProxy ) target ) . getProxiedHttpServletResponse ( ) ) ; } while ( target instanceof IncludedResponse ) { target = ( ( IncludedResponse ) target ) . getProxiedHttpServletResponse ( ) ; } // PQ88880 begin if ( target instanceof SRTServletResponse ) { target . getWriter ( ) . write ( this . getOutputBufferAsString ( ) . toCharArray ( ) ) ; return ; } // PQ88880 end } StoredResponse s = ( StoredResponse ) target ; out = s . _outInternal ; } out . write ( this . getOutputBuffer ( ) ) ; } } }
Copy the contents of this response to another HttpServletResponse . This method is optimized to quickly transfer the contents of this response into another response . This method is useful when this response is cached to generate the same response later .
566
46
159,586
public final static Reliability getReliabilityByName ( String name ) throws NullPointerException , IllegalArgumentException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . info ( tc , "Name = " + name ) ; if ( name == null ) { throw new NullPointerException ( ) ; } /* Look for the name in the nameSet, and return the corresponding */ /* Reliability from the indexSet. */ for ( int i = 0 ; i <= MAX_INDEX + 1 ; i ++ ) { if ( name . equals ( nameSet [ i ] ) ) { return indexSet [ i ] ; } } /* If the name didn't match, throw IllegalArgumentException */ throw new IllegalArgumentException ( ) ; }
Returns the corresponding Reliability for a given name . This method should NOT be called by any code outside the SIBus . It is only public so that it can be accessed by other SIBus components .
170
42
159,587
public final static Reliability getReliabilityByIndex ( int mpIndex ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . info ( tc , "Index = " + mpIndex ) ; return indexSet [ mpIndex + 1 ] ; }
Returns the corresponding Reliability for a given index . This method should NOT be called by any code outside the SIBus . It is only public so that it can be accessed by other SIBus components .
65
42
159,588
public final static Reliability getReliability ( Byte aValue ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . info ( tc , "Value = " + aValue ) ; return set [ aValue . intValue ( ) ] ; }
Returns the corresponding Reliability for a given Byte . This method should NOT be called by any code outside the MFP component . It is only public so that it can be accessed by sub - packages .
65
40
159,589
@ Override public String [ ] getHeader ( ) { ArrayList < String > result = new ArrayList < String > ( ) ; if ( customHeader . length > 0 ) { for ( CustomHeaderLine line : customHeader ) { String formattedLine = line . formatLine ( headerProps ) ; if ( formattedLine != null ) { result . add ( formattedLine ) ; } } } else { for ( String prop : headerProps . stringPropertyNames ( ) ) { result . add ( prop + " = " + headerProps . getProperty ( prop ) ) ; } } return result . toArray ( new String [ result . size ( ) ] ) ; }
Gets the file header information . Implementations of the HpelPlainFormatter class will have a non - XML - based header .
141
28
159,590
protected void createEventTimeStamp ( RepositoryLogRecord record , StringBuilder buffer ) { if ( null == record ) { throw new IllegalArgumentException ( "Record cannot be null" ) ; } if ( null == buffer ) { throw new IllegalArgumentException ( "Buffer cannot be null" ) ; } // Create the time stamp buffer . append ( ' ' ) ; Date eventDate = new Date ( record . getMillis ( ) ) ; // set the dateFormat object to the desired timeZone. Allows log output // to be presented in different time zones. dateFormat . setTimeZone ( timeZone ) ; // set the format to // the desired // time zone. buffer . append ( dateFormat . format ( eventDate ) ) ; buffer . append ( "] " ) ; }
Generates the time stamp for the RepositoryLogRecord event . The resulting time stamp is formatted based on the formatter s locale and time zone .
165
30
159,591
protected static String mapLevelToType ( RepositoryLogRecord logRecord ) { if ( null == logRecord ) { return " Z " ; } Level l = logRecord . getLevel ( ) ; if ( null == l ) { return " Z " ; } // In HPEL SystemOut and SystemErr are recorded in custom level but since we want // them to be handled specially do it now before checking for custom levels String s = logRecord . getLoggerName ( ) ; if ( s != null ) { if ( s . equals ( "SystemOut" ) ) { return " O " ; } else if ( s . equals ( "SystemErr" ) ) { return " R " ; } } String id = customLevels . get ( l ) ; if ( id != null ) { return ( " " + id + " " ) ; } // Since we have used the static Level object throughout the logging framework // object reference comparisons should work. if ( l == Level . SEVERE ) { return " E " ; } if ( l == Level . WARNING ) { return " W " ; } if ( l == Level . INFO ) { return " I " ; } if ( l == Level . CONFIG ) { return " C " ; } if ( l == Level . FINE ) { return " 1 " ; } if ( l == Level . FINER ) { // D198403 Start // added check for Entry and Exit messages to return < or > String message = logRecord . getRawMessage ( ) ; if ( message != null ) { if ( message . indexOf ( "Entry" ) != - 1 || message . indexOf ( "ENTRY" ) != - 1 ) { return " > " ; } if ( message . indexOf ( "Exit" ) != - 1 || message . indexOf ( "RETURN" ) != - 1 ) { return " < " ; } } return " 2 " ; // D198403 End } if ( l == Level . FINEST ) { return " 3 " ; } return " Z " ; }
Generates the short type string based off the RepositoryLogRecord s Level .
430
16
159,592
protected void setCookies ( HttpServletRequest request , HttpServletResponse response , String requestToken , String stateValue ) { ReferrerURLCookieHandler referrerURLCookieHandler = WebAppSecurityCollaboratorImpl . getGlobalWebAppSecurityConfig ( ) . createReferrerURLCookieHandler ( ) ; // Create cookie for request token Cookie requestTokenCookie = referrerURLCookieHandler . createCookie ( TwitterConstants . COOKIE_NAME_REQUEST_TOKEN , requestToken , request ) ; response . addCookie ( requestTokenCookie ) ; // Set original request URL in cookie String cookieName = ClientConstants . COOKIE_NAME_REQ_URL_PREFIX + stateValue . hashCode ( ) ; Cookie c = referrerURLCookieHandler . createCookie ( cookieName , webUtils . getRequestUrlWithEncodedQueryString ( request ) , request ) ; response . addCookie ( c ) ; }
Sets cookies for the provided request token and the original request URL . These values can then be verified and used in subsequent requests .
210
26
159,593
private void setUnauthenticatedSubjectIfNeeded ( ) { if ( LocationUtils . isServer ( ) ) { com . ibm . ws . security . context . SubjectManager sm = new com . ibm . ws . security . context . SubjectManager ( ) ; Subject invokedSubject = sm . getInvocationSubject ( ) ; if ( invokedSubject == null ) { Subject callerSubject = sm . getCallerSubject ( ) ; if ( callerSubject == null ) { // create the unauthenticated subject and set as the invocation subject UnauthenticatedSubjectService unAuthenticationService = SecurityServices . getUnauthenticatedSubjectService ( ) ; if ( unAuthenticationService != null ) { sm . setInvocationSubject ( unAuthenticationService . getUnauthenticatedSubject ( ) ) ; } } } } }
Create un - authenticate subject if both caller and invoke subjects are null for client . We do not want to do this for client container .
172
28
159,594
private void updateClientPolicy ( Message m ) { if ( ! clientSidePolicyCalced ) { PolicyDataEngine policyEngine = bus . getExtension ( PolicyDataEngine . class ) ; if ( policyEngine != null && endpointInfo . getService ( ) != null ) { clientSidePolicy = policyEngine . getClientEndpointPolicy ( m , endpointInfo , this , new ClientPolicyCalculator ( ) ) ; if ( clientSidePolicy != null ) { clientSidePolicy . removePropertyChangeListener ( this ) ; //make sure we aren't added twice clientSidePolicy . addPropertyChangeListener ( this ) ; } } } clientSidePolicyCalced = true ; }
updates the HTTPClientPolicy that is compatible with the assertions included in the service endpoint operation and message policy subjects if a PolicyDataEngine is installed
140
29
159,595
public void finalizeConfig ( ) { // See if not set by configuration, if there are defaults // in order from the Endpoint, Service, or Bus. configureConduitFromEndpointInfo ( this , endpointInfo ) ; logConfig ( ) ; if ( getClient ( ) . getDecoupledEndpoint ( ) != null ) { this . endpointInfo . setProperty ( "org.apache.cxf.ws.addressing.replyto" , getClient ( ) . getDecoupledEndpoint ( ) ) ; } }
This call gets called by the HTTPTransportFactory after it causes an injection of the Spring configuration properties of this Conduit .
113
25
159,596
public AuthorizationPolicy getEffectiveAuthPolicy ( Message message ) { AuthorizationPolicy authPolicy = getAuthorization ( ) ; AuthorizationPolicy newPolicy = message . get ( AuthorizationPolicy . class ) ; AuthorizationPolicy effectivePolicy = newPolicy ; if ( effectivePolicy == null ) { effectivePolicy = authPolicy ; } if ( effectivePolicy == null ) { effectivePolicy = new AuthorizationPolicy ( ) ; } return effectivePolicy ; }
Determines effective auth policy from message conduit and empty default with priority from first to last
84
18
159,597
public void setClient ( HTTPClientPolicy client ) { if ( this . clientSidePolicy != null ) { this . clientSidePolicy . removePropertyChangeListener ( this ) ; } this . clientSidePolicyCalced = true ; this . clientSidePolicy = client ; clientSidePolicy . removePropertyChangeListener ( this ) ; //make sure we aren't added twice clientSidePolicy . addPropertyChangeListener ( this ) ; endpointInfo . setProperty ( "org.apache.cxf.ws.addressing.replyto" , client . getDecoupledEndpoint ( ) ) ; }
This method sets the Client Side Policy for this HTTPConduit . Using this method will override any HTTPClientPolicy set in configuration .
123
28
159,598
public void setTlsClientParameters ( TLSClientParameters params ) { this . tlsClientParameters = params ; if ( this . tlsClientParameters != null ) { if ( LOG . isLoggable ( Level . FINE ) ) { LOG . log ( Level . FINE , "Conduit '" + getConduitName ( ) + "' has been (re) configured for TLS " + "keyManagers " + Arrays . toString ( tlsClientParameters . getKeyManagers ( ) ) + "trustManagers " + Arrays . toString ( tlsClientParameters . getTrustManagers ( ) ) + "secureRandom " + tlsClientParameters . getSecureRandom ( ) ) ; } CertificateConstraintsType constraints = params . getCertConstraints ( ) ; if ( constraints != null ) { certConstraints = CertConstraintsJaxBUtils . createCertConstraints ( constraints ) ; } } else { if ( LOG . isLoggable ( Level . FINE ) ) { LOG . log ( Level . FINE , "Conduit '" + getConduitName ( ) + "' has been (re)configured for plain http." ) ; } } }
This method sets the TLS Client Parameters for this HTTPConduit . Using this method overrides any TLS Client Parameters that is configured for this HTTPConduit .
259
35
159,599
protected String extractLocation ( Map < String , List < String > > headers ) throws MalformedURLException { for ( Map . Entry < String , List < String > > head : headers . entrySet ( ) ) { if ( "Location" . equalsIgnoreCase ( head . getKey ( ) ) ) { List < String > locs = head . getValue ( ) ; if ( locs != null && locs . size ( ) > 0 ) { String location = locs . get ( 0 ) ; if ( location != null ) { return location ; } else { return null ; } } } } return null ; }
This method extracts the value of the Location Http Response header .
133
13