idx
int64
0
41.2k
question
stringlengths
83
4.15k
target
stringlengths
5
715
40,300
public void encodeBegin ( FacesContext context ) throws IOException { _initialDescendantComponentState = null ; if ( _isValidChilds && ! hasErrorMessages ( context ) ) { _dataModelMap . clear ( ) ; if ( ! isRowStatePreserved ( ) ) { _rowStates . clear ( ) ; } } super . encodeBegin ( context ) ; }
Perform necessary actions when rendering of this component starts before delegating to the inherited implementation which calls the associated renderer s encodeBegin method .
40,301
private void processColumnFacets ( FacesContext context , int processAction ) { for ( int i = 0 , childCount = getChildCount ( ) ; i < childCount ; i ++ ) { UIComponent child = getChildren ( ) . get ( i ) ; if ( child instanceof UIColumn ) { if ( ! _ComponentUtils . isRendered ( context , child ) ) { continue ; } if ( child . getFacetCount ( ) > 0 ) { for ( UIComponent facet : child . getFacets ( ) . values ( ) ) { process ( context , facet , processAction ) ; } } } } }
Invoke the specified phase on all facets of all UIColumn children of this component . Note that no methods are called on the UIColumn child objects themselves .
40,302
private void processColumnChildren ( FacesContext context , int processAction ) { int first = getFirst ( ) ; int rows = getRows ( ) ; int last ; if ( rows == 0 ) { last = getRowCount ( ) ; } else { last = first + rows ; } for ( int rowIndex = first ; last == - 1 || rowIndex < last ; rowIndex ++ ) { setRowIndex ( rowIndex ) ; if ( ! isRowAvailable ( ) ) { break ; } for ( int i = 0 , childCount = getChildCount ( ) ; i < childCount ; i ++ ) { UIComponent child = getChildren ( ) . get ( i ) ; if ( child instanceof UIColumn ) { if ( ! _ComponentUtils . isRendered ( context , child ) ) { continue ; } for ( int j = 0 , columnChildCount = child . getChildCount ( ) ; j < columnChildCount ; j ++ ) { UIComponent columnChild = child . getChildren ( ) . get ( j ) ; process ( context , columnChild , processAction ) ; } } } } }
Invoke the specified phase on all non - facet children of all UIColumn children of this component . Note that no methods are called on the UIColumn child objects themselves .
40,303
public void setRows ( int rows ) { if ( rows < 0 ) { throw new IllegalArgumentException ( "rows: " + rows ) ; } getStateHelper ( ) . put ( PropertyKeys . rows , rows ) ; }
Set the maximum number of rows displayed in the table .
40,304
@ JSFProperty ( literalOnly = true , faceletsOnly = true ) public boolean isRowStatePreserved ( ) { Boolean b = ( Boolean ) getStateHelper ( ) . get ( PropertyKeys . rowStatePreserved ) ; return b == null ? false : b . booleanValue ( ) ; }
Indicates whether the state for a component in each row should not be discarded before the datatable is rendered again .
40,305
public List < String > getManagedObjects ( ) { ArrayList < String > managedObjects = new ArrayList < String > ( ) ; if ( this . application != null ) { managedObjects . addAll ( application . getManagedObjects ( ) ) ; } if ( this . factory != null ) { managedObjects . addAll ( factory . getManagedObjects ( ) ) ; } if ( this . lifecycle != null ) { managedObjects . addAll ( lifecycle . getManagedObjects ( ) ) ; } return managedObjects ; }
This method is only called from jsf 2 . 2
40,306
public long getLastModified ( ) { if ( matchedEntry != null ) { return matchedEntry . getLastModified ( ) ; } else if ( matchedZipFile != null ) { return matchedZipFile . getLastModified ( ) ; } else if ( matchedFile != null ) { return matchedFile . lastModified ( ) ; } else { return 0 ; } }
Get the last modified date of the appropriate matched item
40,307
public void expiryAlarm ( AORequestedTick requestedTick ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "expiryAlarm" , requestedTick ) ; boolean transitionOccured = false ; ArrayList < AORequestedTick > satisfiedTicks = null ; try { this . lock ( ) ; try { if ( closed ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "expiryAlarm" ) ; return ; } transitionOccured = cancelRequestInternal ( requestedTick , true ) ; if ( transitionOccured && ! listOfRequests . isEmpty ( ) ) satisfiedTicks = processQueuedMsgs ( null ) ; } finally { this . unlock ( ) ; } } catch ( SINotPossibleInCurrentConfigurationException e ) { notifyException ( e ) ; } if ( transitionOccured ) { parent . expiredRequest ( requestedTick . tick ) ; } if ( satisfiedTicks != null ) { int length = satisfiedTicks . size ( ) ; for ( int i = 0 ; i < length ; i ++ ) { AORequestedTick aotick = ( AORequestedTick ) satisfiedTicks . get ( i ) ; long tick = aotick . tick ; SIMPMessage m = aotick . getMessage ( ) ; parent . satisfiedRequest ( tick , m ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "expiryAlarm" ) ; }
Callback from the AORequestedTick when the expiry alarm occurs .
40,308
public void alarm ( Object thandle ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "alarm" , thandle ) ; boolean doClose = false ; synchronized ( parent ) { this . lock ( ) ; try { if ( idleHandler != null ) { if ( ! listOfRequests . isEmpty ( ) ) { SIErrorException e = new SIErrorException ( nls . getFormattedMessage ( "INTERNAL_MESSAGING_ERROR_CWSIP0001" , new Object [ ] { "com.ibm.ws.sib.processor.impl.JSRemoteConsumerPoint" , "1:1121:1.43.2.26" } , null ) ) ; FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.impl.JSRemoteConsumerPoint.alarm" , "1:1126:1.43.2.26" , this ) ; SibTr . exception ( tc , e ) ; SibTr . error ( tc , "INTERNAL_MESSAGING_ERROR_CWSIP0001" , new Object [ ] { "com.ibm.ws.sib.processor.impl.JSRemoteConsumerPoint" , "1:1132:1.43.2.26" } ) ; } else { parent . removeConsumerKey ( selectionCriteriasAsString , this ) ; doClose = true ; } } } finally { this . unlock ( ) ; } } if ( doClose ) { close ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "alarm" ) ; }
The idle timeout has expired
40,309
public void cleanup ( ) { cleanupLock . lock ( ) ; try { if ( null != writeInterface ) { this . writeInterface . close ( ) ; this . writeInterface = null ; } if ( null != readInterface ) { this . readInterface . close ( ) ; this . readInterface = null ; } if ( null != getSSLEngine ( ) ) { if ( this . sslChannel . getstop0Called ( ) == true ) { this . connected = false ; } SSLUtils . shutDownSSLEngine ( this , isInbound , this . connected ) ; this . sslEngine = null ; } this . connected = false ; } finally { cleanupLock . unlock ( ) ; } }
This method is called from both close and destroy to clean up local resources . Avoid object synchronization but ensure only one thread does cleanup at a time .
40,310
public void ready ( VirtualConnection inVC ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "ready, vc=" + getVCHash ( ) ) ; } if ( ! closed && FrameworkState . isValid ( ) ) { try { if ( isInbound ) { Map < Object , Object > stateMap = inVC . getStateMap ( ) ; discState = ( SSLDiscriminatorState ) stateMap . remove ( SSLChannel . SSL_DISCRIMINATOR_STATE ) ; if ( discState != null ) { sslEngine = discState . getEngine ( ) ; sslContext = discState . getSSLContext ( ) ; setLinkConfig ( ( SSLLinkConfig ) stateMap . get ( SSLConnectionLink . LINKCONFIG ) ) ; } else if ( sslContext == null || getSSLEngine ( ) == null ) { sslContext = getChannel ( ) . getSSLContextForInboundLink ( this , inVC ) ; sslEngine = SSLUtils . getSSLEngine ( sslContext , sslChannel . getConfig ( ) . getFlowType ( ) , getLinkConfig ( ) , this ) ; } } else { if ( sslContext == null || getSSLEngine ( ) == null ) { sslContext = getChannel ( ) . getSSLContextForOutboundLink ( this , inVC , targetAddress ) ; sslEngine = SSLUtils . getOutboundSSLEngine ( sslContext , getLinkConfig ( ) , targetAddress . getRemoteAddress ( ) . getHostName ( ) , targetAddress . getRemoteAddress ( ) . getPort ( ) , this ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "SSL engine hc=" + getSSLEngine ( ) . hashCode ( ) + " associated with vc=" + getVCHash ( ) ) ; } connected = true ; if ( isInbound ) { readyInbound ( inVC ) ; } else { readyOutbound ( inVC , true ) ; } } catch ( Exception e ) { if ( FrameworkState . isStopping ( ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Ignoring exception during server shutdown: " + e ) ; } } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Caught exception during ready, " + e , e ) ; } FFDCFilter . processException ( e , getClass ( ) . getName ( ) , "238" , this ) ; } close ( inVC , e ) ; } } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "ready called after close so do nothing" ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "ready" ) ; } }
This method will be called at one of two times . If this connection link is part of an inbound chain then this will be called when the device side channel has accepted a new connection and determined that this is the next channel in the chain . Note that the Discriminator may have already been run . The second case where this method may be called is if this connection link is part of an outbound chain . In that case this method will be called when the initial outbound connect reports back success .
40,311
protected void readyInboundPostHandshake ( WsByteBuffer netBuffer , WsByteBuffer decryptedNetBuffer , WsByteBuffer encryptedAppBuffer , HandshakeStatus hsStatus ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "readyInboundPostHandshake, vc=" + getVCHash ( ) ) ; } encryptedAppBuffer . release ( ) ; if ( hsStatus == HandshakeStatus . FINISHED ) { AlpnSupportUtils . getAlpnResult ( getSSLEngine ( ) , this ) ; getChannel ( ) . onHandshakeFinish ( getSSLEngine ( ) ) ; if ( netBuffer . remaining ( ) == 0 || netBuffer . position ( ) == 0 ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Releasing netBuffer: " + netBuffer . hashCode ( ) ) ; } netBuffer . release ( ) ; getDeviceReadInterface ( ) . setBuffers ( null ) ; } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "App data exists in netBuffer after handshake: " + netBuffer . remaining ( ) ) ; } } readInterface . setBuffer ( decryptedNetBuffer ) ; MyReadCompletedCallback readCallback = new MyReadCompletedCallback ( decryptedNetBuffer ) ; if ( null != readInterface . read ( 1 , readCallback , false , TCPRequestContext . USE_CHANNEL_TIMEOUT ) ) { determineNextChannel ( ) ; } } else { netBuffer . release ( ) ; getDeviceReadInterface ( ) . setBuffers ( null ) ; decryptedNetBuffer . release ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Unhandled result from SSL engine: " + hsStatus ) ; } SSLException ssle = new SSLException ( "Unhandled result from SSL engine: " + hsStatus ) ; FFDCFilter . processException ( ssle , getClass ( ) . getName ( ) , "401" , this ) ; close ( getVirtualConnection ( ) , ssle ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "readyInboundPostHandshake" ) ; } }
This method is called after the SSL handshake has taken place .
40,312
private void readyOutbound ( VirtualConnection inVC , boolean async ) throws IOException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "readyOutbound, vc=" + getVCHash ( ) ) ; } final SSLChannelData config = this . sslChannel . getConfig ( ) ; WsByteBuffer netBuffer = SSLUtils . allocateByteBuffer ( getPacketBufferSize ( ) , config . getEncryptBuffersDirect ( ) ) ; WsByteBuffer decryptedNetBuffer = SSLUtils . allocateByteBuffer ( getAppBufferSize ( ) , config . getDecryptBuffersDirect ( ) ) ; WsByteBuffer encryptedAppBuffer = SSLUtils . allocateByteBuffer ( getPacketBufferSize ( ) , true ) ; SSLEngineResult sslResult = null ; MyHandshakeCompletedCallback callback = null ; IOException exception = null ; if ( async ) { callback = new MyHandshakeCompletedCallback ( this , netBuffer , decryptedNetBuffer , encryptedAppBuffer , FlowType . OUTBOUND ) ; } try { sslResult = SSLUtils . handleHandshake ( this , netBuffer , decryptedNetBuffer , encryptedAppBuffer , sslResult , callback , false ) ; if ( sslResult != null ) { readyOutboundPostHandshake ( netBuffer , decryptedNetBuffer , encryptedAppBuffer , sslResult . getHandshakeStatus ( ) , async ) ; } } catch ( IOException e ) { exception = e ; } catch ( ReadOnlyBufferException e ) { exception = new IOException ( "Caught exception: " + e ) ; } if ( exception != null ) { FFDCFilter . processException ( exception , getClass ( ) . getName ( ) , "540" , this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Caught exception during handshake after connect, " + exception ) ; } if ( netBuffer != null ) { netBuffer . release ( ) ; netBuffer = null ; getDeviceReadInterface ( ) . setBuffers ( null ) ; } if ( decryptedNetBuffer != null ) { decryptedNetBuffer . release ( ) ; decryptedNetBuffer = null ; } if ( encryptedAppBuffer != null ) { encryptedAppBuffer . release ( ) ; encryptedAppBuffer = null ; } if ( async ) { close ( inVC , exception ) ; } else { this . syncConnectFailure = true ; close ( inVC , exception ) ; throw exception ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "readyOutbound" ) ; } return ; }
Handle work required by the ready method for outbound connections . When called the outbound socket has been established . Establish the SSL connection before reporting to the next channel . Note this method is called in both sync and async flows .
40,313
protected void readyOutboundPostHandshake ( WsByteBuffer netBuffer , WsByteBuffer decryptedNetBuffer , WsByteBuffer encryptedAppBuffer , HandshakeStatus hsStatus , boolean async ) throws IOException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "readyOutboundPostHandshake, vc=" + getVCHash ( ) ) ; } IOException exception = null ; if ( hsStatus != HandshakeStatus . FINISHED ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Unexpected results of handshake after connect, " + hsStatus ) ; } exception = new IOException ( "Unexpected results of handshake after connect, " + hsStatus ) ; } getChannel ( ) . onHandshakeFinish ( getSSLEngine ( ) ) ; getDeviceReadInterface ( ) . setBuffers ( null ) ; if ( netBuffer . remaining ( ) == 0 || netBuffer . position ( ) == 0 ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Releasing netBuffer: " + netBuffer . hashCode ( ) ) ; } netBuffer . release ( ) ; } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "App data exists in netBuffer after handshake: " + netBuffer . remaining ( ) ) ; } this . readInterface . setNetBuffer ( netBuffer ) ; } decryptedNetBuffer . release ( ) ; encryptedAppBuffer . release ( ) ; if ( async ) { if ( exception != null ) { close ( getVirtualConnection ( ) , exception ) ; } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Calling ready method." ) ; } super . ready ( getVirtualConnection ( ) ) ; } } else { if ( exception != null ) { throw exception ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "readyOutboundPostHandshake" ) ; } }
This method is called to handle the results of an SSL handshake . This may be called by a callback or in the same thread as the connect request .
40,314
private void handleRedundantConnect ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "handleRedundantConnect, vc=" + getVCHash ( ) ) ; } cleanup ( ) ; sslEngine = SSLUtils . getOutboundSSLEngine ( sslContext , getLinkConfig ( ) , targetAddress . getRemoteAddress ( ) . getHostName ( ) , targetAddress . getRemoteAddress ( ) . getPort ( ) , this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "New SSL engine=" + getSSLEngine ( ) . hashCode ( ) + " for vc=" + getVCHash ( ) ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "handleRedundantConnect" ) ; } }
This method is called if connect or connectAsync are called redundantly after the connection is already established . It cleans up the SSL engine . The connect methods will then pass the connect on down the chain where eventually a new socket will be established with this virtual connection .
40,315
public void setAlpnProtocol ( String protocol ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "setAlpnProtocol: " + protocol + " " + this ) ; } this . alpnProtocol = protocol ; this . sslConnectionContext . setAlpnProtocol ( protocol ) ; }
Set the ALPN protocol negotiated for this link
40,316
private void destroyConnLinks ( ) { synchronized ( inUse ) { int numlinks = inUse . size ( ) ; for ( int i = 0 ; i < numlinks ; i ++ ) { inUse . removeFirst ( ) . destroy ( null ) ; } } }
call the destroy on all the UDPConnLink objects related to this UDPChannel which are currently in use .
40,317
public boolean verifySender ( InetAddress remoteAddr ) { boolean returnValue = true ; if ( alists != null ) { returnValue = ! alists . accessDenied ( remoteAddr ) ; } return returnValue ; }
Verify whether the remote address is allowed to communicated with the channel .
40,318
public boolean aboveRange ( InetAddress ip ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "aboveRange, ip is " + ip ) ; Tr . debug ( tc , "aboveRange, ip is " + ip ) ; } return greaterThan ( ip , ipHigher ) ; }
Is the given ip address numericaly above the address range? Is it above ipHigher?
40,319
public boolean belowRange ( InetAddress ip ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "belowRange, ip is " + ip ) ; Tr . debug ( tc , "belowRange, ipLower is " + ipLower ) ; } return lessThan ( ip , ipLower ) ; }
Is the given ip address numerically below the address range? Is it below ipLower?
40,320
private String metadataValueOf ( String value ) { if ( value == null || value . trim ( ) . isEmpty ( ) ) return null ; return value ; }
Since annotations have the default value of convert it to null .
40,321
public final Object get ( ) { Object o = buffer . pop ( ) ; if ( beanPerf != null ) { beanPerf . objectRetrieve ( buffer . size ( ) , ( o != null ) ) ; } return o ; }
Retrieve an object from this pool .
40,322
public final void put ( Object o ) { boolean discarded = false ; if ( inactive ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "setting active: " + this ) ; inactive = false ; synchronized ( this ) { if ( ! ivManaged ) { poolMgr . add ( this ) ; ivManaged = true ; } } } discarded = ! buffer . pushWithLimit ( o , poolSize . maxSize ) ; if ( discarded ) { if ( discardStrategy != null ) { discardStrategy . discard ( o ) ; } } if ( beanPerf != null ) { beanPerf . objectReturn ( buffer . size ( ) , discarded ) ; } }
Return an object instance to this pool .
40,323
final void periodicDrain ( ) { SizeData size = poolSize ; int numDiscarded = drainToSize ( size . minSize , size . maxDrainAmount ) ; if ( numDiscarded == 0 ) { ++ ivInactiveNoDrainCount ; if ( ivInactiveNoDrainCount > 4 ) { synchronized ( this ) { poolMgr . remove ( this ) ; ivManaged = false ; } ivInactiveNoDrainCount = 0 ; } } else ivInactiveNoDrainCount = 0 ; }
Remove a percentage of the elements from this pool down to its minimum value . If the pool becomes active while draining discontinue .
40,324
public void init ( HttpInboundConnection conn , RequestMessage req ) { this . request = req ; this . response = conn . getResponse ( ) ; this . connection = conn ; this . outStream = new ResponseBody ( this . response . getBody ( ) ) ; this . locale = Locale . getDefault ( ) ; }
Initialize this response message with the input connection .
40,325
public void clear ( ) { this . contentType = null ; this . encoding = null ; this . locale = null ; this . outStream = null ; this . outWriter = null ; this . streamActive = false ; }
Clear all the temporary variables of this response .
40,326
private String convertURItoURL ( String uri ) { int indexScheme = uri . indexOf ( "://" ) ; if ( - 1 != indexScheme ) { int indexQuery = uri . indexOf ( '?' ) ; if ( - 1 == indexQuery || indexScheme < indexQuery ) { return uri ; } } StringBuilder sb = new StringBuilder ( ) ; String scheme = this . request . getScheme ( ) ; sb . append ( scheme ) . append ( "://" ) ; sb . append ( this . request . getServerName ( ) ) ; int port = this . request . getServerPort ( ) ; if ( "http" . equalsIgnoreCase ( scheme ) && 80 != port ) { sb . append ( ':' ) . append ( port ) ; } else if ( "https" . equalsIgnoreCase ( scheme ) && 443 != port ) { sb . append ( ':' ) . append ( port ) ; } String data = this . request . getContextPath ( ) ; if ( ! "" . equals ( data ) ) { sb . append ( data ) ; } if ( 0 == uri . length ( ) ) { sb . append ( '/' ) ; } else if ( uri . charAt ( 0 ) == '/' ) { sb . append ( uri ) ; } else { data = this . request . getServletPath ( ) ; if ( ! "" . equals ( data ) ) { sb . append ( data ) ; } data = this . request . getPathInfo ( ) ; if ( null != data ) { sb . append ( data ) ; } sb . append ( '/' ) ; sb . append ( uri ) ; } return sb . toString ( ) ; }
Convert a possible URI to a full URL .
40,327
public void commit ( ) { if ( isCommitted ( ) ) { return ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Committing: " + this ) ; } if ( null == this . response . getHeader ( "Content-Language" ) ) { this . response . setHeader ( "Content-Language" , getLocale ( ) . toString ( ) . replace ( '_' , '-' ) ) ; } if ( null != this . response . getHeader ( "Content-Encoding" ) ) { this . response . removeHeader ( "Content-Length" ) ; } SessionInfo info = this . request . getSessionInfo ( ) ; if ( null != info ) { SessionConfig config = info . getSessionConfig ( ) ; if ( config . usingCookies ( ) && null != info . getSession ( ) ) { boolean add = true ; HttpCookie existing = this . response . getCookie ( config . getIDName ( ) ) ; if ( null != existing ) { if ( ! info . getSession ( ) . getId ( ) . equals ( existing . getValue ( ) ) ) { this . response . removeCookie ( existing ) ; } else { add = false ; } } if ( add ) { this . response . addCookie ( convertCookie ( SessionInfo . encodeCookie ( info ) ) ) ; } } } }
When headers are being marshalled out this message moves to committed state which will disallow most further changes .
40,328
public void setApi ( String api ) { api = api . trim ( ) ; if ( "liberty" . equalsIgnoreCase ( api ) ) { this . api = "liberty" ; } else if ( "websphere" . equalsIgnoreCase ( api ) ) { this . api = "tr" ; } else if ( "tr" . equalsIgnoreCase ( api ) ) { this . api = "tr" ; } else if ( "jsr47" . equalsIgnoreCase ( api ) ) { this . api = "java-logging" ; } else if ( "java" . equalsIgnoreCase ( api ) ) { this . api = "java-logging" ; } else if ( "java.logging" . equalsIgnoreCase ( api ) ) { this . api = "java-logging" ; } else if ( "java-logging" . equalsIgnoreCase ( api ) ) { this . api = "java-logging" ; } else { log ( "Invalid trace type " + api , Project . MSG_ERR ) ; } }
Set the type of trace API to use .
40,329
private Map < String , String > getServletNameClassPairsInWebXML ( Container containerToAdapt ) throws UnableToAdaptException { Map < String , String > nameClassPairs = new HashMap < String , String > ( ) ; WebAppConfig webAppConfig = containerToAdapt . adapt ( WebAppConfig . class ) ; Iterator < IServletConfig > cfgIter = webAppConfig . getServletInfos ( ) ; while ( cfgIter . hasNext ( ) ) { IServletConfig servletCfg = cfgIter . next ( ) ; if ( servletCfg . getClassName ( ) == null ) { continue ; } nameClassPairs . put ( servletCfg . getServletName ( ) , servletCfg . getClassName ( ) ) ; } return nameClassPairs ; }
Get all the Servlet name and className pairs from web . xml
40,330
private void processClassesInWebXML ( EndpointInfoBuilder endpointInfoBuilder , EndpointInfoBuilderContext ctx , WebAppConfig webAppConfig , JaxWsModuleInfo jaxWsModuleInfo , Set < String > presentedServices ) throws UnableToAdaptException { Iterator < IServletConfig > cfgIter = webAppConfig . getServletInfos ( ) ; while ( cfgIter . hasNext ( ) ) { IServletConfig servletCfg = cfgIter . next ( ) ; String servletClassName = servletCfg . getClassName ( ) ; if ( servletClassName == null || presentedServices . contains ( servletClassName ) || ! JaxWsUtils . isWebService ( ctx . getInfoStore ( ) . getDelayableClassInfo ( servletClassName ) ) ) { continue ; } String servletName = servletCfg . getServletName ( ) ; ctx . addContextEnv ( JaxWsConstants . ENV_ATTRIBUTE_ENDPOINT_SERVLET_NAME , servletName ) ; jaxWsModuleInfo . addEndpointInfo ( servletName , endpointInfoBuilder . build ( ctx , servletClassName , EndpointType . SERVLET ) ) ; } }
Process the serviceImplBean classes in web . xml file .
40,331
public static TrmMessageFactory getInstance ( ) { if ( _instance == null ) { synchronized ( TrmMessageFactory . class ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createFactoryInstance" ) ; try { Class cls = Class . forName ( TRM_MESSAGE_FACTORY_CLASS ) ; _instance = ( TrmMessageFactory ) cls . newInstance ( ) ; } catch ( Exception e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.mfp.TrmMessageFactory.createFactoryInstance" , "112" ) ; SibTr . error ( tc , "UNABLE_TO_CREATE_TRMFACTORY_CWSIF0021" , e ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "createFactoryInstance" , _instance ) ; } } return _instance ; }
Get the singleton TrmMessageFactory which is to be used for creating TRM Message instances .
40,332
public void addNamedEvent ( String shortName , Class < ? extends ComponentSystemEvent > cls ) { String key = shortName ; Collection < Class < ? extends ComponentSystemEvent > > eventList ; if ( shortName == null ) { key = getFixedName ( cls ) ; } eventList = events . get ( key ) ; if ( eventList == null ) { eventList = new LinkedList < Class < ? extends ComponentSystemEvent > > ( ) ; events . put ( key , eventList ) ; } eventList . add ( cls ) ; }
Registers a named event .
40,333
private String getFixedName ( Class < ? extends ComponentSystemEvent > cls ) { StringBuilder result = new StringBuilder ( ) ; String className ; className = cls . getSimpleName ( ) ; if ( className . toLowerCase ( ) . endsWith ( "event" ) ) { className = className . substring ( 0 , result . length ( ) - 5 ) ; } if ( cls . getPackage ( ) != null ) { result . append ( cls . getPackage ( ) . getName ( ) ) ; result . append ( '.' ) ; } result . append ( className ) ; return result . toString ( ) ; }
Retrieves the short name for an event class according to spec rules .
40,334
public static String jsonifyEvent ( Object event , String eventType , String serverName , String wlpUserDir , String serverHostName , String [ ] tags , int maxFieldLength ) { if ( eventType . equals ( CollectorConstants . GC_EVENT_TYPE ) ) { if ( event instanceof GCData ) { return jsonifyGCEvent ( wlpUserDir , serverName , serverHostName , event , tags ) ; } else { return jsonifyGCEvent ( - 1 , wlpUserDir , serverName , serverHostName , CollectorConstants . GC_EVENT_TYPE , event , tags ) ; } } else if ( eventType . equals ( CollectorConstants . MESSAGES_LOG_EVENT_TYPE ) ) { return jsonifyTraceAndMessage ( maxFieldLength , wlpUserDir , serverName , serverHostName , CollectorConstants . MESSAGES_LOG_EVENT_TYPE , event , tags ) ; } else if ( eventType . equals ( CollectorConstants . TRACE_LOG_EVENT_TYPE ) ) { return jsonifyTraceAndMessage ( maxFieldLength , wlpUserDir , serverName , serverHostName , CollectorConstants . TRACE_LOG_EVENT_TYPE , event , tags ) ; } else if ( eventType . equals ( CollectorConstants . FFDC_EVENT_TYPE ) ) { return jsonifyFFDC ( maxFieldLength , wlpUserDir , serverName , serverHostName , event , tags ) ; } else if ( eventType . equals ( CollectorConstants . ACCESS_LOG_EVENT_TYPE ) ) { return jsonifyAccess ( wlpUserDir , serverName , serverHostName , event , tags ) ; } else if ( eventType . equals ( CollectorConstants . AUDIT_LOG_EVENT_TYPE ) ) { return jsonifyAudit ( wlpUserDir , serverName , serverHostName , event , tags ) ; } return "" ; }
Method to return log event data in json format . This method is for collector version greater than 1 . 0
40,335
public void valueHasChanged ( DCache cache , Object id , long expirationTime , int inactivity ) { if ( expirationTime <= 0 && inactivity <= 0 ) { throw new IllegalArgumentException ( "expirationTime or inactivity must be positive" ) ; } if ( UNIT_TEST_INACTIVITY ) { System . out . println ( " valueHasChanged() - entry" ) ; System . out . println ( " expirationTime=" + expirationTime ) ; System . out . println ( " inactivity=" + inactivity ) ; } boolean isInactivityTimeOut = false ; if ( inactivity > 0 ) { long adjustedExpirationTime = System . currentTimeMillis ( ) + ( inactivity * 1000 ) ; if ( adjustedExpirationTime < expirationTime || expirationTime <= 0 ) { expirationTime = adjustedExpirationTime ; isInactivityTimeOut = true ; } } ExpirationMetaData expirationMetaData = ( ExpirationMetaData ) cacheInstancesTable . get ( cache ) ; if ( expirationMetaData == null ) { return ; } synchronized ( expirationMetaData ) { InvalidationTask it = ( InvalidationTask ) expirationMetaData . expirationTable . get ( id ) ; if ( it == null ) { it = ( InvalidationTask ) taskPool . remove ( ) ; it . id = id ; expirationMetaData . expirationTable . put ( id , it ) ; } else { expirationMetaData . timeLimitHeap . delete ( it ) ; } it . expirationTime = expirationTime ; it . isInactivityTimeOut = isInactivityTimeOut ; expirationMetaData . timeLimitHeap . insert ( it ) ; } }
This notifies this daemon that a value has changed so the expiration time should be updated . It updates internal tables and indexes accordingly .
40,336
public void valueWasRemoved ( DCache cache , Object id ) { if ( UNIT_TEST_INACTIVITY ) { System . out . println ( "valueWasRemoved() - entry" ) ; } ExpirationMetaData expirationMetaData = ( ExpirationMetaData ) cacheInstancesTable . get ( cache ) ; if ( expirationMetaData == null ) { return ; } synchronized ( expirationMetaData ) { InvalidationTask it = ( InvalidationTask ) expirationMetaData . expirationTable . remove ( id ) ; if ( it != null ) { expirationMetaData . timeLimitHeap . delete ( it ) ; it . reset ( ) ; taskPool . add ( it ) ; } } }
This notifies this daemon that an entry has removed It removes the entry from the internal tables .
40,337
public void valueWasAccessed ( DCache cache , Object id , long expirationTime , int inactivity ) { valueHasChanged ( cache , id , expirationTime , inactivity ) ; }
CPF - Inactivity - cache check inactivity > 0 before calling this method .
40,338
public void createExpirationMetaData ( DCache cache ) { ExpirationMetaData expirationMetaData = ( ExpirationMetaData ) cacheInstancesTable . get ( cache ) ; if ( expirationMetaData == null ) { int initialTableSize = DEFAULT_SIZE_FOR_MEM ; if ( cache . getSwapToDisk ( ) && cache . getCacheConfig ( ) . getDiskCachePerformanceLevel ( ) == CacheConfig . HIGH ) { initialTableSize = DEFAULT_SIZE_FOR_MEM_DISK ; } expirationMetaData = new ExpirationMetaData ( initialTableSize ) ; cacheInstancesTable . put ( cache , expirationMetaData ) ; } }
This method is called when the cache is created . This will initialize ExpirationMetaData for specified cache
40,339
public ApplicationSignature getApplicationSignature ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getApplicationSignature" ) ; SibTr . exit ( tc , "getApplicationSignature" , applicationSig ) ; } return applicationSig ; }
Returns the ApplicationSignature .
40,340
public static String getUserNameFromSubject ( Subject subject ) { Iterator < Principal > it = subject . getPrincipals ( ) . iterator ( ) ; String username = it . next ( ) . getName ( ) ; return username ; }
The sujbect has to be non - null
40,341
public static String encode ( String value ) { if ( value == null ) { return value ; } try { value = URLEncoder . encode ( value , Constants . UTF_8 ) ; } catch ( UnsupportedEncodingException e ) { } return value ; }
Encodes the given string using URLEncoder and UTF - 8 encoding .
40,342
public static String getTimeStamp ( long lNumber ) { String timeStamp = "" + lNumber ; int iIndex = TIMESTAMP_LENGTH - timeStamp . length ( ) ; return zeroFillers [ iIndex ] + timeStamp ; }
for unit test
40,343
public static String createNonceCookieValue ( String nonceValue , String state , ConvergedClientConfig clientConfig ) { return HashUtils . digest ( nonceValue + state + clientConfig . getClientSecret ( ) ) ; }
calculate the cookie value of Nonce
40,344
private void compress ( ) { counter = 1 ; for ( Iterator e = values ( ) . iterator ( ) ; e . hasNext ( ) ; ) { Selector s = ( Selector ) e . next ( ) ; s . setUniqueId ( counter ++ ) ; } }
Compress the uniqueId assignments for Selectors currently in the intern table
40,345
private static JsJmsMessage decodeTextBody ( String body ) throws MessageDecodeFailedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "decodeTextBody" ) ; JsJmsTextMessage result = new JsJmsTextMessageImpl ( MfpConstants . CONSTRUCTOR_NO_OP ) ; if ( body != null ) { result . setText ( URLDecode ( body ) ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "decodeTextBody" ) ; return result ; }
Decode a text message
40,346
private static JsJmsMessage decodeBytesBody ( String body ) throws MessageDecodeFailedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "decodeBytesBody" ) ; JsJmsBytesMessage result = new JsJmsBytesMessageImpl ( MfpConstants . CONSTRUCTOR_NO_OP ) ; if ( body != null ) result . setBytes ( HexString . hexToBin ( body , 0 ) ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "decodeBytesBody" ) ; return result ; }
Decode a bytes message
40,347
private static JsJmsMessage decodeObjectBody ( String body ) throws MessageDecodeFailedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "decodeObjectBody" ) ; JsJmsObjectMessage result = new JsJmsObjectMessageImpl ( MfpConstants . CONSTRUCTOR_NO_OP ) ; if ( body != null ) result . setSerializedObject ( HexString . hexToBin ( body , 0 ) ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "decodeObjectBody" ) ; return result ; }
Decode an object message
40,348
private static JsJmsMessage decodeStreamBody ( String body ) throws MessageDecodeFailedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "decodeStreamBody" ) ; JsJmsStreamMessage result = new JsJmsStreamMessageImpl ( MfpConstants . CONSTRUCTOR_NO_OP ) ; if ( body != null ) { try { StringTokenizer st = new StringTokenizer ( body , "&" ) ; while ( st . hasMoreTokens ( ) ) result . writeObject ( decodeObject ( st . nextToken ( ) ) ) ; } catch ( UnsupportedEncodingException e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.mfp.impl.WebJsJmsMessageFactoryImpl.decodeStreamBody" , "196" ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "decodeStreamBody" ) ; return result ; }
Decode a stream message
40,349
private static JsJmsMessage decodeMapBody ( String body ) throws MessageDecodeFailedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "decodeMapBody" ) ; JsJmsMapMessage result = new JsJmsMapMessageImpl ( MfpConstants . CONSTRUCTOR_NO_OP ) ; if ( body != null ) { try { StringTokenizer st = new StringTokenizer ( body , "&" ) ; while ( st . hasMoreTokens ( ) ) { Object [ ] pair = decodePair ( st . nextToken ( ) ) ; result . setObject ( ( String ) pair [ 0 ] , pair [ 1 ] ) ; } } catch ( UnsupportedEncodingException e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.mfp.impl.WebJsJmsMessageFactoryImpl.decodeMapBody" , "218" ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "decodeMapBody" ) ; return result ; }
Decode a map message
40,350
private static void decodeHeader ( JsJmsMessage msg , String id , String type , String topic , String props ) { if ( id != null ) { if ( id . length ( ) % 2 != 0 ) id = "0" + id ; msg . setCorrelationIdAsBytes ( HexString . hexToBin ( id , 0 ) ) ; } if ( type != null ) { if ( type . equals ( "SIB" ) ) msg . setJmsxAppId ( MfpConstants . WPM_JMSXAPPID ) ; else msg . setJmsxAppId ( URLDecode ( type ) ) ; } if ( topic != null ) msg . setDiscriminator ( URLDecode ( topic ) ) ; if ( props != null ) { StringTokenizer st = new StringTokenizer ( props , "&" ) ; while ( st . hasMoreTokens ( ) ) { Object [ ] pair = decodePair ( st . nextToken ( ) ) ; if ( ! ( ( String ) pair [ 0 ] ) . equals ( SIProperties . JMSXAppID ) ) { try { msg . setObjectProperty ( ( String ) pair [ 0 ] , pair [ 1 ] ) ; } catch ( Exception e ) { } } } } }
Decode and set the header fields
40,351
private static Object [ ] decodePair ( String text ) { Object [ ] result = new Object [ 2 ] ; int i = text . indexOf ( '=' ) ; result [ 0 ] = URLDecode ( text . substring ( 0 , i ) ) ; result [ 1 ] = decodeObject ( text . substring ( i + 1 ) ) ; return result ; }
Decode a name = value pair
40,352
private static Object decodeObject ( String text ) { Object result = null ; if ( text . startsWith ( "[]" ) ) result = HexString . hexToBin ( text , 2 ) ; else result = URLDecode ( text ) ; return result ; }
Decode an object as a string or byte array
40,353
private static String URLDecode ( String text ) { String result = null ; try { result = URLDecoder . decode ( text , "UTF8" ) ; } catch ( UnsupportedEncodingException e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.mfp.impl.WebJsMessageFactoryImpl.URLDecode" , "293" ) ; } return result ; }
URL decode a string
40,354
public MatchResponse getMatchResponse ( SecurityConstraint securityConstraint , String resourceName , String method ) { CollectionMatch collectionMatch = getCollectionMatch ( securityConstraint . getWebResourceCollections ( ) , resourceName , method ) ; if ( CollectionMatch . RESPONSE_NO_MATCH . equals ( collectionMatch ) || ( collectionMatch == null && securityConstraint . getRoles ( ) . isEmpty ( ) && securityConstraint . isAccessPrecluded ( ) == false ) ) { return MatchResponse . NO_MATCH_RESPONSE ; } else if ( collectionMatch == null ) { return MatchResponse . CUSTOM_NO_MATCH_RESPONSE ; } return new MatchResponse ( securityConstraint . getRoles ( ) , securityConstraint . isSSLRequired ( ) , securityConstraint . isAccessPrecluded ( ) , collectionMatch ) ; }
Gets the response object that contains the roles the SSL required and access precluded indicators . Gets the response using the custom method algorithm . If the collection match returned from the collection is null then response must be CUSTOM_NO_MATCH_RESPONSE .
40,355
protected void deactivate ( ComponentContext ctxt , int reason ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( this , tc , "Deactivating, reason=" + reason ) ; } unregisterAll ( ) ; }
Deactivate this component .
40,356
public void addHttpSessionListener ( HttpSessionListener listener , String J2EEName ) { synchronized ( mHttpSessionListeners ) { mHttpSessionListeners . add ( listener ) ; mHttpSessionListenersJ2eeNames . add ( J2EEName ) ; sessionListener = true ; _coreHttpSessionManager . getIStore ( ) . setHttpSessionListener ( true ) ; if ( mHttpAppSessionListeners != null ) mHttpAppSessionListeners . add ( listener ) ; if ( _coreHttpAppSessionManager != null ) _coreHttpAppSessionManager . getIStore ( ) . setHttpSessionListener ( true ) ; if ( listener instanceof IBMSessionListener ) { wasHttpSessionObserver . setDoesContainIBMSessionListener ( true ) ; if ( wasHttpAppSessionObserver != null ) { wasHttpAppSessionObserver . setDoesContainIBMSessionListener ( true ) ; LoggingUtil . SESSION_LOGGER_CORE . logp ( Level . FINE , methodClassName , methodNames [ ADD_HTTP_SESSION_LISTENER ] , "Marked " + " app IBM session listener for app observer " + mHttpAppSessionListeners ) ; } } } }
Akaimai requested function - overridden in WsSessionContext
40,357
protected String getArgumentValue ( String arg , String [ ] args , ConsoleWrapper stdin , PrintStream stdout ) { for ( int i = 1 ; i < args . length ; i ++ ) { String key = args [ i ] . split ( "=" ) [ 0 ] ; if ( key . equals ( arg ) ) { return getValue ( args [ i ] ) ; } } return null ; }
Gets the value for the specified argument String .
40,358
public void setHeartbeatInterval ( short heartbeatInterval ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setHeartbeatInterval" ) ; properties . put ( HEARTBEAT_INTERVAL , heartbeatInterval ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "setHeartbeatInterval" , "" + heartbeatInterval ) ; }
Sets the heartbeat interval .
40,359
private boolean isZip ( JarEntry entry ) throws IOException { try ( InputStream entryInputStream = sourceFatJar . getInputStream ( entry ) ) { try ( ZipInputStream zipInputStream = new ZipInputStream ( entryInputStream ) ) { ZipEntry ze = zipInputStream . getNextEntry ( ) ; if ( ze == null ) { return false ; } return true ; } } }
Check whether the jar entry is a zip regardless of the extension .
40,360
public static File getLogDir ( ) { String logDirLoc = null ; if ( logDir . get ( ) == null ) { File resultDir = null ; try { logDirLoc = AccessController . doPrivileged ( new java . security . PrivilegedExceptionAction < String > ( ) { public String run ( ) throws Exception { return System . getenv ( BootstrapConstants . ENV_LOG_DIR ) ; } } ) ; } catch ( Exception ex ) { } if ( logDirLoc != null ) { resultDir = new File ( logDirLoc ) ; } else { logDirLoc = System . getProperty ( BootstrapConstants . ENV_LOG_DIR ) ; if ( logDirLoc != null ) { resultDir = new File ( logDirLoc ) ; } } logDir = StaticValue . mutateStaticValue ( logDir , new FileInitializer ( resultDir ) ) ; } return logDir . get ( ) ; }
Returns directory containing server log directories .
40,361
public static File getOutputDir ( boolean isClient ) { String outputDirLoc = null ; if ( outputDir . get ( ) == null ) { try { outputDirLoc = AccessController . doPrivileged ( new java . security . PrivilegedExceptionAction < String > ( ) { public String run ( ) throws Exception { return System . getenv ( BootstrapConstants . ENV_WLP_OUTPUT_DIR ) ; } } ) ; } catch ( Exception ex ) { } File resultDir = null ; if ( outputDirLoc != null ) { resultDir = new File ( outputDirLoc ) ; } else { outputDirLoc = System . getProperty ( BootstrapConstants . ENV_WLP_OUTPUT_DIR ) ; if ( outputDirLoc != null ) { resultDir = new File ( outputDirLoc ) ; } else { File userDir = Utils . getUserDir ( ) ; if ( userDir != null ) { if ( isClient ) { resultDir = new File ( userDir , "clients" ) ; } else { resultDir = new File ( userDir , "servers" ) ; } } } } outputDir = StaticValue . mutateStaticValue ( outputDir , new FileInitializer ( resultDir ) ) ; } return outputDir . get ( ) ; }
Returns directory containing server output directories . A server output directory has server s name as a name and located under this directory .
40,362
public static boolean tryToClose ( ZipFile zipFile ) { if ( zipFile != null ) { try { zipFile . close ( ) ; return true ; } catch ( IOException e ) { } } return false ; }
Close the zip file
40,363
public static Class < ? > getRealClass ( Class < ? > clazz ) { Class < ? > realClazz = clazz ; if ( isWeldProxy ( clazz ) ) { realClazz = clazz . getSuperclass ( ) ; } return realClazz ; }
Get the real class . If it is proxy get its superclass which will be the real class .
40,364
public void destroy ( Exception e ) { if ( this . appCallback != null ) { this . appCallback . destroy ( e ) ; this . appCallback = null ; } }
This method is called when there is a problem with the connectAsync call further down the stack . This will just be used as a pass through .
40,365
public synchronized void addSmap ( String smap , String stratumName ) { embedded . add ( "*O " + stratumName + "\n" + smap + "*C " + stratumName + "\n" ) ; }
Adds the given string as an embedded SMAP with the given stratum name .
40,366
public void dumpItems ( ) { LinkedList < CBuffRecord > copy = new LinkedList < CBuffRecord > ( ) ; synchronized ( this ) { copy . addAll ( buffer ) ; buffer . clear ( ) ; currentSize = 0L ; if ( headerBytes == null ) { return ; } } dumpWriter . setHeader ( headerBytes ) ; for ( CBuffRecord record : copy ) { dumpWriter . logRecord ( record . timestamp , record . bytes ) ; } }
Dumps records stored in buffer to disk using configured LogRepositoryWriter .
40,367
protected Index getJandexIndex ( ) { String methodName = "getJandexIndex" ; boolean doLog = tc . isDebugEnabled ( ) ; boolean doJandexLog = JandexLogger . doLog ( ) ; boolean useJandex = getUseJandex ( ) ; if ( ! useJandex ) { if ( doLog || doJandexLog ) { boolean haveJandex = basicHasJandexIndex ( ) ; String msg ; if ( haveJandex ) { msg = MessageFormat . format ( "[ {0} ] Jandex disabled; Jandex index [ {1} ] found" , getHashText ( ) , getJandexIndexPath ( ) ) ; } else { msg = MessageFormat . format ( "[ {0} ] Jandex disabled; Jandex index [ {1} ] not found" , getHashText ( ) , getJandexIndexPath ( ) ) ; } if ( doLog ) { Tr . debug ( tc , msg ) ; } if ( doJandexLog ) { JandexLogger . log ( CLASS_NAME , methodName , msg ) ; } } return null ; } else { Index jandexIndex = basicGetJandexIndex ( ) ; if ( doLog || doJandexLog ) { String msg ; if ( jandexIndex != null ) { msg = MessageFormat . format ( "[ {0} ] Jandex enabled; Jandex index [ {1} ] found" , getHashText ( ) , getJandexIndexPath ( ) ) ; } else { msg = MessageFormat . format ( "[ {0} ] Jandex enabled; Jandex index [ {1} ] not found" , getHashText ( ) , getJandexIndexPath ( ) ) ; } if ( doLog ) { Tr . debug ( tc , msg ) ; } if ( doJandexLog ) { JandexLogger . log ( CLASS_NAME , methodName , msg ) ; } } return jandexIndex ; } }
Attempt to read the Jandex index .
40,368
public boolean and ( SimpleTest newTest ) { for ( int i = 0 ; i < tmpSimpleTests . size ( ) ; i ++ ) { SimpleTest cand = ( SimpleTest ) tmpSimpleTests . get ( i ) ; if ( cand . getIdentifier ( ) . getName ( ) . equals ( newTest . getIdentifier ( ) . getName ( ) ) ) { if ( cand . getIdentifier ( ) . isExtended ( ) ) { if ( cand . getIdentifier ( ) . getStep ( ) == newTest . getIdentifier ( ) . getStep ( ) ) { return cand . combine ( newTest ) ; } } else return cand . combine ( newTest ) ; } } tmpSimpleTests . add ( newTest ) ; alwaysTrue = false ; return true ; }
Add a SimpleTest to the Conjunction searching for contradictions .
40,369
public boolean organize ( ) { if ( tmpResidual . size ( ) > 0 ) { List [ ] equatedIds = findEquatedIdentifiers ( ) ; while ( equatedIds != null && tmpResidual . size ( ) > 0 ) { equatedIds = reduceResidual ( equatedIds ) ; if ( equatedIds != null && equatedIds . length == 0 ) return false ; } } for ( int i = 0 ; i < tmpSimpleTests . size ( ) ; ) if ( ( ( SimpleTestImpl ) tmpSimpleTests . get ( i ) ) . shedSubtests ( tmpResidual ) ) i ++ ; else tmpSimpleTests . remove ( i ) ; for ( int i = 0 ; i < tmpSimpleTests . size ( ) - 1 ; i ++ ) for ( int j = i + 1 ; j < tmpSimpleTests . size ( ) ; j ++ ) { SimpleTest iTest = ( SimpleTest ) tmpSimpleTests . get ( i ) ; SimpleTest jTest = ( SimpleTest ) tmpSimpleTests . get ( j ) ; OrdinalPosition iPos = ( OrdinalPosition ) iTest . getIdentifier ( ) . getOrdinalPosition ( ) ; OrdinalPosition jPos = ( OrdinalPosition ) jTest . getIdentifier ( ) . getOrdinalPosition ( ) ; if ( jPos . compareTo ( iPos ) < 0 ) { tmpSimpleTests . set ( j , iTest ) ; tmpSimpleTests . set ( i , jTest ) ; } else if ( jTest . getIdentifier ( ) . getOrdinalPosition ( ) == iTest . getIdentifier ( ) . getOrdinalPosition ( ) ) throw new IllegalStateException ( ) ; } simpleTests = ( SimpleTest [ ] ) tmpSimpleTests . toArray ( new SimpleTest [ 0 ] ) ; tmpSimpleTests = null ; for ( int i = 0 ; i < tmpResidual . size ( ) ; i ++ ) if ( residual == null ) residual = ( Selector ) tmpResidual . get ( i ) ; else residual = new OperatorImpl ( Operator . AND , residual , ( Selector ) tmpResidual . get ( i ) ) ; tmpResidual = null ; alwaysTrue = simpleTests . length == 0 && residual == null ; return true ; }
Organize the Conjunction into its final useful form for MatchSpace .
40,370
private List [ ] findEquatedIdentifiers ( ) { List [ ] ans = null ; for ( int i = 0 ; i < tmpSimpleTests . size ( ) ; i ++ ) { SimpleTest cand = ( SimpleTest ) tmpSimpleTests . get ( i ) ; if ( cand . getKind ( ) == SimpleTest . NULL ) { if ( ans == null ) ans = new List [ ] { new ArrayList ( ) , new ArrayList ( ) } ; ans [ 0 ] . add ( cand . getIdentifier ( ) . getName ( ) ) ; ans [ 1 ] . add ( null ) ; } else { Object candValue = cand . getValue ( ) ; if ( candValue != null ) { if ( ans == null ) ans = new List [ ] { new ArrayList ( ) , new ArrayList ( ) } ; ans [ 0 ] . add ( cand . getIdentifier ( ) . getName ( ) ) ; ans [ 1 ] . add ( candValue ) ; } } } return ans ; }
that these can be removed from tmpResidual . Return null if there are none .
40,371
private List [ ] reduceResidual ( List [ ] equatedIds ) { List [ ] ans = null ; for ( int i = 0 ; i < tmpResidual . size ( ) ; ) { Operator oper = substitute ( ( Operator ) tmpResidual . get ( i ) , equatedIds ) ; if ( oper . getNumIds ( ) > 0 && ! Matching . isSimple ( oper ) ) tmpResidual . set ( i ++ , oper ) ; else if ( oper . getNumIds ( ) == 1 ) { Selector trans = Matching . getTransformer ( ) . DNF ( oper ) ; if ( trans instanceof Operator && ( ( Operator ) trans ) . getOp ( ) == Selector . OR ) tmpResidual . set ( i ++ , oper ) ; else { SimpleTest newTest = new SimpleTestImpl ( trans ) ; if ( ! and ( newTest ) ) return new List [ 0 ] ; tmpResidual . remove ( i ) ; if ( newTest . getKind ( ) == SimpleTest . NULL ) { if ( ans == null ) ans = new List [ ] { new ArrayList ( ) , new ArrayList ( ) } ; ans [ 0 ] . add ( newTest . getIdentifier ( ) . getName ( ) ) ; ans [ 1 ] . add ( null ) ; } else { Object newTestValue = newTest . getValue ( ) ; if ( newTestValue != null ) { if ( ans == null ) ans = new List [ ] { new ArrayList ( ) , new ArrayList ( ) } ; ans [ 0 ] . add ( newTest . getIdentifier ( ) . getName ( ) ) ; ans [ 1 ] . add ( newTestValue ) ; } } } } else { Boolean theEval = ( Boolean ) Matching . getEvaluator ( ) . eval ( oper ) ; if ( theEval == null || ! ( theEval ) . booleanValue ( ) ) return new List [ 0 ] ; tmpResidual . remove ( i ) ; } } return ans ; }
therefore should be abandoned .
40,372
private static Operator substitute ( Operator oper , List [ ] equatedIds ) { Selector op1 = oper . getOperands ( ) [ 0 ] ; Selector op2 = ( oper . getOperands ( ) . length == 1 ) ? null : oper . getOperands ( ) [ 1 ] ; if ( op1 instanceof Identifier ) op1 = substitute ( ( Identifier ) op1 , equatedIds ) ; else if ( op1 instanceof Operator ) op1 = substitute ( ( Operator ) op1 , equatedIds ) ; if ( op1 == null ) return null ; if ( op2 != null ) { if ( op2 instanceof Identifier ) op2 = substitute ( ( Identifier ) op2 , equatedIds ) ; else if ( op2 instanceof Operator ) op2 = substitute ( ( Operator ) op2 , equatedIds ) ; if ( op2 == null ) return null ; } if ( op1 == oper . getOperands ( ) [ 0 ] && ( op2 == null || op2 == oper . getOperands ( ) [ 1 ] ) ) return oper ; else if ( oper instanceof LikeOperator ) { LikeOperatorImpl loper = ( LikeOperatorImpl ) oper ; return new LikeOperatorImpl ( loper . getOp ( ) , op1 , loper . getInternalPattern ( ) , loper . getPattern ( ) , loper . isEscaped ( ) , loper . getEscape ( ) ) ; } else return ( op2 == null ) ? new OperatorImpl ( oper . getOp ( ) , op1 ) : new OperatorImpl ( oper . getOp ( ) , op1 , op2 ) ; }
mutations are made directly to any tree nodes .
40,373
private static Selector substitute ( Identifier id , List [ ] equatedIds ) { for ( int i = 0 ; i < equatedIds [ 0 ] . size ( ) ; i ++ ) if ( id . getName ( ) . equals ( equatedIds [ 0 ] . get ( i ) ) ) return new LiteralImpl ( equatedIds [ 1 ] . get ( i ) ) ; return id ; }
if not matched .
40,374
private void setUnavailableUntil ( long time , boolean isInit ) { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) logger . logp ( Level . FINE , CLASS_NAME , "setUnavailableUntil" , "setUnavailableUntil() : " + time ) ; if ( isInit ) { state = UNINITIALIZED_STATE ; } else { state = UNAVAILABLE_STATE ; } unavailableUntil = time ; evtSource . onServletUnavailableForService ( getServletEvent ( ) ) ; }
Method setUnavailableUntil .
40,375
protected void setUninitialize ( ) { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) logger . logp ( Level . FINE , CLASS_NAME , "setUninitialized " , "" + this . toString ( ) ) ; state = UNINITIALIZED_STATE ; }
Puts a servlet into uninitialize state .
40,376
protected synchronized void invalidateCacheWrappers ( ) { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) logger . entering ( CLASS_NAME , "invalidateCacheWrappers" ) ; if ( cacheWrappers != null ) { Iterator i = cacheWrappers . iterator ( ) ; while ( i . hasNext ( ) ) { ServletReferenceListener w = ( ServletReferenceListener ) i . next ( ) ; if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) logger . logp ( Level . FINE , CLASS_NAME , "invalidateCacheWrappers" , "servlet reference listener + w + "]" ) ; w . invalidate ( ) ; } cacheWrappers = null ; } if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) logger . exiting ( CLASS_NAME , "invalidateCacheWrappers" ) ; }
which makes a call to invalidateCacheWrappers
40,377
private boolean checkForDefaultImplementation ( Class checkClass , String checkMethod , Class [ ] methodParams ) { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) logger . exiting ( CLASS_NAME , "checkForDefaultImplementation" , "Method : " + checkMethod + ", Class : " + checkClass . getName ( ) ) ; boolean defaultMethodInUse = true ; while ( defaultMethodInUse && checkClass != null && ! checkClass . getName ( ) . equals ( "javax.servlet.http.HttpServlet" ) ) { try { checkClass . getDeclaredMethod ( checkMethod , methodParams ) ; if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) logger . logp ( Level . FINE , CLASS_NAME , "checkForDefaultImplementation" , "Class implementing " + checkMethod + " is " + checkClass . getName ( ) ) ; defaultMethodInUse = false ; break ; } catch ( java . lang . NoSuchMethodException exc ) { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) logger . logp ( Level . FINE , CLASS_NAME , "checkForDefaultImplementation" , checkMethod + " is not implemented by class " + checkClass . getName ( ) ) ; } catch ( java . lang . SecurityException exc ) { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) logger . logp ( Level . FINE , CLASS_NAME , "checkForDefaultImplementation" , "Cannot determine if " + checkMethod + " is implemented by class " + checkClass . getName ( ) ) ; } checkClass = checkClass . getSuperclass ( ) ; } if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) logger . exiting ( CLASS_NAME , "checkForDefaultImplementation" , "Result : " + defaultMethodInUse ) ; return defaultMethodInUse ; }
PK83258 Add method checkDefaultImplementation
40,378
private int findIndexByKey ( Object key ) { for ( int i = ( size ( ) - 1 ) ; i >= 0 ; -- i ) { Element element = ( Element ) get ( i ) ; if ( element . key . equals ( key ) ) { return i ; } } return - 1 ; }
Return the index of the element with the specified key
40,379
public void toArray ( Element [ ] dest ) { if ( ivElements != null ) { System . arraycopy ( ivElements , ivHeadIndex , dest , 0 , size ( ) ) ; } }
Copies elements from the bucket into the destination array starting at index 0 . The destination array must be at least large enough to hold all the elements in the bucket ; otherwise the behavior is undefined .
40,380
private void add ( Element element ) { if ( ivElements == null ) { ivElements = new Element [ DEFAULT_CAPACITY ] ; } else if ( ivTailIndex == ivElements . length ) { int size = size ( ) ; int halfCapacity = ivElements . length >> 1 ; if ( ivHeadIndex > halfCapacity ) { System . arraycopy ( ivElements , ivHeadIndex , ivElements , 0 , size ) ; Arrays . fill ( ivElements , ivHeadIndex , ivElements . length , null ) ; } else { Element [ ] newElements = new Element [ ivElements . length + halfCapacity ] ; System . arraycopy ( ivElements , ivHeadIndex , newElements , 0 , size ) ; ivElements = newElements ; } ivHeadIndex = 0 ; ivTailIndex = size ; } ivElements [ ivTailIndex ++ ] = element ; }
Adds an element to the end of the bucket .
40,381
private void remove ( int listIndex ) { if ( listIndex == 0 ) { ivElements [ ivHeadIndex ++ ] = null ; } else if ( listIndex == ivTailIndex - 1 ) { ivElements [ -- ivTailIndex ] = null ; } else { int size = size ( ) ; int halfSize = size >> 1 ; if ( listIndex < halfSize ) { System . arraycopy ( ivElements , ivHeadIndex , ivElements , ivHeadIndex + 1 , listIndex ) ; ivElements [ ivHeadIndex ++ ] = null ; } else { int arrayIndex = ivHeadIndex + listIndex ; System . arraycopy ( ivElements , arrayIndex + 1 , ivElements , arrayIndex , size - listIndex - 1 ) ; ivElements [ -- ivTailIndex ] = null ; } } if ( isEmpty ( ) ) { ivHeadIndex = 0 ; ivTailIndex = 0 ; } }
Removes the element at the specified index . The index must be greater or equal to 0 and less than the size ; otherwise the behavior is undefined .
40,382
public void setToBeDeleted ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setToBeDeleted" ) ; synchronized ( _anycastInputHandlers ) { _toBeDeleted = true ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "setToBeDeleted" ) ; }
Method to indicate that the destination has been deleted
40,383
private boolean isInternalUnprotectedMethod ( EJBMethodMetaData methodMetaData ) { EJBMethodInterface interfaceType = methodMetaData . getEJBMethodInterface ( ) ; if ( EJBMethodInterface . LIFECYCLE_INTERCEPTOR . value ( ) == ( interfaceType . value ( ) ) || EJBMethodInterface . TIMER . value ( ) == ( interfaceType . value ( ) ) ) { return true ; } return false ; }
Check if the methodMetaData interface is internal and supposed to be unprotected as per spec .
40,384
public JWTTokenValidationFailedException errorCommon ( boolean bTrError , TraceComponent tc , String [ ] msgCodes , Object [ ] objects ) throws JWTTokenValidationFailedException { int msgIndex = 0 ; if ( ! TYPE_ID_TOKEN . equals ( this . getTokenType ( ) ) ) { msgIndex = 1 ; } return errorCommon ( bTrError , tc , msgCodes [ msgIndex ] , objects ) ; }
do not override
40,385
static JSBoxedListImpl create ( JSVaryingList subList , int subAccessor ) { if ( subList . getIndirection ( ) > 0 ) return new JSIndirectBoxedListImpl ( subList , subAccessor ) ; else return new JSBoxedListImpl ( subList , subAccessor ) ; }
kind of constructor .
40,386
public Object get ( int accessor ) { try { return ( ( JMFNativePart ) subList . getValue ( accessor ) ) . getValue ( subAccessor ) ; } catch ( JMFException ex ) { FFDCFilter . processException ( ex , "get" , "129" , this ) ; return null ; } }
thrown ) .
40,387
protected void setCredentials ( Subject subject , String securityName , String urAuthenticatedId ) throws Exception { if ( urAuthenticatedId != null && ! urAuthenticatedId . equals ( securityName ) ) { Hashtable < String , String > subjectHash = new Hashtable < String , String > ( ) ; subjectHash . put ( AuthenticationConstants . UR_AUTHENTICATED_USERID_KEY , urAuthenticatedId ) ; subject . getPrivateCredentials ( ) . add ( subjectHash ) ; } CredentialsService credentialsService = getCredentialsService ( ) ; credentialsService . setCredentials ( subject ) ; }
Set the relevant Credentials for this login module into the Subject and set the credentials for the determined accessId .
40,388
protected void updateSubjectWithSharedStateContents ( ) { subject . getPrincipals ( ) . add ( ( WSPrincipal ) sharedState . get ( Constants . WSPRINCIPAL_KEY ) ) ; subject . getPublicCredentials ( ) . add ( sharedState . get ( Constants . WSCREDENTIAL_KEY ) ) ; if ( sharedState . get ( Constants . WSSSOTOKEN_KEY ) != null ) subject . getPrivateCredentials ( ) . add ( sharedState . get ( Constants . WSSSOTOKEN_KEY ) ) ; }
Sets the original subject with the shared state contents .
40,389
void setUpSubject ( final String securityName , final String accessId , final String authMethod ) throws LoginException { try { AccessController . doPrivileged ( new PrivilegedExceptionAction < Object > ( ) { public Object run ( ) throws Exception { temporarySubject = new Subject ( ) ; setWSPrincipal ( temporarySubject , securityName , accessId , authMethod ) ; setCredentials ( temporarySubject , securityName , null ) ; setOtherPrincipals ( temporarySubject , securityName , accessId , authMethod , null ) ; subject . getPrincipals ( ) . addAll ( temporarySubject . getPrincipals ( ) ) ; subject . getPublicCredentials ( ) . addAll ( temporarySubject . getPublicCredentials ( ) ) ; subject . getPrivateCredentials ( ) . addAll ( temporarySubject . getPrivateCredentials ( ) ) ; return null ; } } ) ; } catch ( PrivilegedActionException e ) { throw new LoginException ( e . getLocalizedMessage ( ) ) ; } }
Common Subject set up . Guarantees an atomic commit to the subject passed in via initialization .
40,390
protected void payloadWritten ( int payloadSize ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "payloadWritten" , new Object [ ] { this , payloadSize } ) ; _unwrittenDataSize . addAndGet ( - payloadSize ) ; if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "unwrittenDataSize = " + _unwrittenDataSize . get ( ) + " totalDataSize = " + _totalDataSize ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "payloadWritten" ) ; }
Informs the recovery log that previously unwritten data has been written to disk by one of its recoverable units and no longer needs to be tracked in the unwritten data field . The recovery log must use the supplied information to track the amount of unwritten active data it holds .
40,391
protected void payloadDeleted ( int totalPayloadSize , int unwrittenPayloadSize ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "payloadDeleted" , new Object [ ] { this , totalPayloadSize , unwrittenPayloadSize } ) ; _unwrittenDataSize . addAndGet ( - unwrittenPayloadSize ) ; synchronized ( this ) { _totalDataSize -= totalPayloadSize ; } if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "unwrittenDataSize = " + _unwrittenDataSize . get ( ) + " totalDataSize = " + _totalDataSize ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "payloadDeleted" ) ; }
Informs the recovery log that data has been removed from one of its recoverable units . Right now this means that a recoverable unit and all its content has been removed but in the future this will also be driven when a single recoverable unit section within a recoverable unit has been removed . The recovery log must use the supplied information to track the amount of active data it holds . This information will be required each time a keypoint occurs in order to determine if there is sufficient space in the current file to perform the keypoint sucessfully .
40,392
protected void addRecoverableUnit ( RecoverableUnit recoverableUnit , boolean recovered ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "addRecoverableUnit" , new Object [ ] { recoverableUnit , recovered , this } ) ; final long identity = recoverableUnit . identity ( ) ; _recoverableUnits . put ( identity , recoverableUnit ) ; if ( recovered ) { _recUnitIdTable . reserveId ( identity , recoverableUnit ) ; } if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "addRecoverableUnit" ) ; }
Adds a new RecoverableUnitImpl object keyed from its identity to this classes collection of such objects .
40,393
protected RecoverableUnitImpl removeRecoverableUnitMapEntries ( long identity ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "removeRecoverableUnitMapEntries" , new Object [ ] { identity , this } ) ; final RecoverableUnitImpl recoverableUnit = ( RecoverableUnitImpl ) _recoverableUnits . remove ( identity ) ; if ( recoverableUnit != null ) { _recUnitIdTable . removeId ( identity ) ; } if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "removeRecoverableUnitMapEntries" , recoverableUnit ) ; return recoverableUnit ; }
Removes a RecoverableUnitImpl object keyed from its identity from this classes collection of such objects .
40,394
protected RecoverableUnitImpl getRecoverableUnit ( long identity ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getRecoverableUnit" , new Object [ ] { identity , this } ) ; RecoverableUnitImpl recoverableUnit = null ; if ( ! incompatible ( ) && ! failed ( ) ) { recoverableUnit = ( RecoverableUnitImpl ) _recoverableUnits . get ( identity ) ; } if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "getRecoverableUnit" , recoverableUnit ) ; return recoverableUnit ; }
Retrieves a RecoverableUnitImpl object keyed from its identity from this classes collection of such objects .
40,395
public void associateLog ( DistributedRecoveryLog otherLog , boolean failAssociatedLog ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "associateLog" , new Object [ ] { otherLog , failAssociatedLog , this } ) ; if ( otherLog instanceof MultiScopeLog ) { _associatedLog = ( MultiScopeLog ) otherLog ; _failAssociatedLog = failAssociatedLog ; } if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "associateLog" ) ; }
Associates another log with this one . PI45254 . The code is protects against infinite recursion since associated logs are only marked as failed if the log isn t already mark as failed . The code does NOT protect against deadlock due to synchronization for logA - > logB and logB - > logA - this is not an issue since failAssociated is only set to true for tranLog and not partnerLog - this could be fixed for general use by delegating to an AssociatedLogGroup object shared between associated logs .
40,396
public Class getDiscriminatoryDataType ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getDiscriminatorDataType" ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getDiscriminatorDataType" ) ; return com . ibm . wsspi . bytebuffer . WsByteBuffer . class ; }
Returns the data type this discriminator is able to discriminate for . This is always WsByteBuffer .
40,397
public Channel getChannel ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getChannel" ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getChannel" , channel ) ; return channel ; }
Returns the channel this discriminator discriminates on behalf of .
40,398
public int getWeight ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getWeight" ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getWeight" ) ; return 0 ; }
Get the weighting to use for this discriminator
40,399
protected synchronized void join ( SIXAResource resource ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "join" , resource ) ; resourcesJoinedToThisResource . add ( resource ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "join" ) ; }
Called when another XAResource is joining to us .