idx
int64
0
165k
question
stringlengths
73
5.81k
target
stringlengths
5
918
161,100
public void quit ( ) { try { this . keepOn = false ; if ( this . serverSocket != null && ! this . serverSocket . isClosed ( ) ) { this . serverSocket . close ( ) ; this . serverSocket = null ; } } catch ( final IOException e ) { throw new RuntimeException ( e ) ; } }
Exit POP3 server .
161,101
boolean contains ( String normalizedPath ) { if ( normalizedPath == null ) return false ; if ( normalizedPath . length ( ) < normalizedRoot . length ( ) ) return false ; return normalizedPath . regionMatches ( 0 , normalizedRoot , 0 , normalizedRoot . length ( ) ) ; }
Check if the provided path is contained within this root s hierarchy .
161,102
private static String getIPAddress ( ) { String rc ; try { rc = InetAddress . getLocalHost ( ) . getHostAddress ( ) ; } catch ( Exception e ) { rc = Long . valueOf ( new Random ( ) . nextLong ( ) ) . toString ( ) ; } return rc ; }
InetAddress is compatible with both IPv4 & IPv6
161,103
private SecurityMetadata getSecurityMetadata ( WebAppConfig webAppConfig ) { WebModuleMetaData wmmd = ( ( WebAppConfigExtended ) webAppConfig ) . getMetaData ( ) ; return ( SecurityMetadata ) wmmd . getSecurityMetaData ( ) ; }
Gets the security metadata from the web app config
161,104
private boolean isDenyUncoveredHttpMethods ( List < SecurityConstraint > scList ) { for ( SecurityConstraint sc : scList ) { List < WebResourceCollection > wrcList = sc . getWebResourceCollections ( ) ; for ( WebResourceCollection wrc : wrcList ) { if ( wrc . getDenyUncoveredHttpMethods ( ) ) { return true ; } } } retu...
Returns whether deny - uncovered - http - methods attribute is set . In order to check this value entire WebResourceCollection objects need to be examined since it only set properly when web . xml is processed .
161,105
public final DataSource createConnectionFactory ( ConnectionManager connMgr ) { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "createConnectionFactory" , connMgr ) ; DataSource connFactory = jdbcRuntime . newDataSource ( this , ...
Creates a javax . sql . DataSource that uses the application server provided connection manager to manage its connections .
161,106
private Connection getConnection ( PooledConnection pconn , WSConnectionRequestInfoImpl cri , String userName ) throws ResourceException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "getConnection" , AdapterUtil . toString ( ...
Gets a java . sql . Connection from a PooledConnection use the cri to extract certain information if needed if trused context is supported ...
161,107
public Set < ManagedConnection > getInvalidConnections ( @ SuppressWarnings ( "rawtypes" ) Set connectionSet ) throws ResourceException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "getInvalidConnections" , connectionSet ) ; ...
The spec interface is defined with raw types so we have no choice but to declare it that way too
161,108
private Object getTraceable ( Object d ) throws ResourceException { WSJdbcTracer tracer = new WSJdbcTracer ( helper . getTracer ( ) , helper . getPrintWriter ( ) , d , type , null , true ) ; Set < Class < ? > > classes = new HashSet < Class < ? > > ( ) ; for ( Class < ? > cl = d . getClass ( ) ; cl != null ; cl = cl . ...
Enable supplemental tracing for the underlying data source or java . sql . Driver .
161,109
private void onConnect ( Connection con , String [ ] sqlCommands ) throws SQLException { final boolean trace = TraceComponent . isAnyTracingEnabled ( ) ; TransactionManager tm = connectorSvc . getTransactionManager ( ) ; Transaction suspendedTx = null ; String currentSQL = null ; Throwable failure = null ; try { UOWCoo...
Execute the onConnect SQL commands . The connection won t be enlisted in a WAS transaction yet but it s necessary to suspend and WAS global transaction in order to avoid confusing the DB2 type 2 JDBC driver .
161,110
private void postGetConnectionHandling ( Connection conn ) throws SQLException { helper . doConnectionSetup ( conn ) ; String [ ] sqlCommands = dsConfig . get ( ) . onConnect ; if ( sqlCommands != null && sqlCommands . length > 0 ) onConnect ( conn , sqlCommands ) ; if ( ! wasUsedToGetAConnection ) { helper . gatherAnd...
utility used to gather metadata info and issue doConnectionSetup .
161,111
final void reallySetLogWriter ( final PrintWriter out ) throws ResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "setting the logWriter to:" , out ) ; if ( dataSourceOrDriver != null ) { try { AccessController . doPrivileged ( new PrivilegedException...
This method is to be used by RRA code to set logwriter when needed
161,112
public final int getLoginTimeout ( ) throws SQLException { try { if ( ! Driver . class . equals ( type ) ) { return ( ( CommonDataSource ) dataSourceOrDriver ) . getLoginTimeout ( ) ; } return 0 ; } catch ( SQLException sqlX ) { FFDCFilter . processException ( sqlX , getClass ( ) . getName ( ) , "1670" , this ) ; throw...
Retrieves the login timeout for the DataSource .
161,113
public String formatRecord ( RepositoryLogRecord record , Locale locale ) { if ( null == record ) { throw new IllegalArgumentException ( "Record cannot be null" ) ; } StringBuilder sb = new StringBuilder ( 300 ) ; String lineSeparatorPlusPadding = "" ; createEventHeader ( record , sb ) ; lineSeparatorPlusPadding = svLi...
Formats a RepositoryLogRecord into a localized basic format output String .
161,114
private void loadTldFromClassloader ( GlobalTagLibConfig globalTagLibConfig , TldParser tldParser ) { for ( Iterator itr = globalTagLibConfig . getTldPathList ( ) . iterator ( ) ; itr . hasNext ( ) ; ) { TldPathConfig tldPathConfig = ( TldPathConfig ) itr . next ( ) ; InputStream is = globalTagLibConfig . getClassloade...
Added by DJV for Liberty - we don t want to depend on the taglib coming from a jar on our class path if we can avoid it so this version uses the classloader specified by the povided taglib config to find and read the TLDs from that taglib config .
161,115
public void addGlobalTagLibConfig ( GlobalTagLibConfig globalTagLibConfig ) { try { TldParser tldParser = new TldParser ( this , configManager , false , globalTagLibConfig . getClassloader ( ) ) ; if ( globalTagLibConfig . getClassloader ( ) == null ) loadTldFromJarInputStream ( globalTagLibConfig , tldParser ) ; else ...
add some GlobalTabLibConfig to the global tag libs we know about . If the provided config provides a classloader we will load the TLDs via that class loaders otherwise the JAR URL will be used to find the TLDs .
161,116
public static synchronized ClientConnectionManager getRef ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getRef" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getRef" , instance ) ; return instance ; }
Returns a reference to the single instance of this class in existence . The class must have been previously initilised by a call to the initialise method - otherwise invoking this method will generate a runtime exception . This class implements the singleton design pattern .
161,117
public WSStatistic getStatistic ( int dataId ) { ArrayList members = copyStatistics ( ) ; if ( members == null || members . size ( ) <= 0 ) return null ; int sz = members . size ( ) ; for ( int i = 0 ; i < sz ; i ++ ) { StatisticImpl data = ( StatisticImpl ) members . get ( i ) ; if ( data != null && data . getId ( ) =...
get Statistic by data id
161,118
private synchronized void myupdate ( WSStats newStats , boolean keepOld , boolean recursiveUpdate ) { if ( newStats == null ) return ; StatsImpl newStats1 = ( StatsImpl ) newStats ; this . instrumentationLevel = newStats1 . getLevel ( ) ; updateMembers ( newStats , keepOld ) ; if ( recursiveUpdate ) updateSubcollection...
Assume we have verified newStats is the same PMI module as this Stats
161,119
public void insert ( SimpleTest test , Object target ) { if ( size == ranges . length ) { RangeEntry [ ] tmp = new RangeEntry [ 2 * size ] ; System . arraycopy ( ranges , 0 , tmp , 0 , size ) ; ranges = tmp ; } ranges [ size ] = new RangeEntry ( test , target ) ; size ++ ; }
Insert a range and an associated target into the table .
161,120
public Object getExact ( SimpleTest test ) { for ( int i = 0 ; i < size ; i ++ ) { if ( ranges [ i ] . correspondsTo ( test ) ) return ranges [ i ] . target ; } return null ; }
Retrieve the Object associated with an exactly defined range
161,121
public void replace ( SimpleTest test , Object target ) { for ( int i = 0 ; i < size ; i ++ ) if ( ranges [ i ] . correspondsTo ( test ) ) { ranges [ i ] . target = target ; return ; } throw new IllegalStateException ( ) ; }
Replace the Object in a range that is known to exist
161,122
public List find ( Number value ) { List targets = new ArrayList ( 1 ) ; for ( int i = 0 ; i < size ; i ++ ) { if ( ranges [ i ] . contains ( value ) ) targets . add ( ranges [ i ] . target ) ; } return targets ; }
Find targets associated with all ranges including this value .
161,123
@ FFDCIgnore ( XMLStreamException . class ) public boolean parseServerConfiguration ( InputStream in , String docLocation , BaseConfiguration config , MergeBehavior mergeBehavior ) throws ConfigParserException , ConfigValidationException { XMLStreamReader parser = null ; try { parser = getXMLInputFactory ( ) . createXM...
private if not for tests
161,124
public void start ( QueuedFuture < ? > queuedFuture ) { Runnable timeoutTask = ( ) -> { queuedFuture . abort ( new TimeoutException ( ) ) ; } ; start ( timeoutTask ) ; }
start timer and cancel given future
161,125
private void timeout ( ) { lock . writeLock ( ) . lock ( ) ; try { if ( ! this . stopped ) { long now = System . nanoTime ( ) ; long remaining = this . targetEnd - now ; this . timedout = remaining <= FTConstants . MIN_TIMEOUT_NANO ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { debugTime...
This method is run when the timer pops
161,126
private void start ( Runnable timeoutTask ) { long timeout = timeoutPolicy . getTimeout ( ) . toNanos ( ) ; start ( timeoutTask , timeout ) ; }
Get the timeout from the policy and start the timer
161,127
private void start ( Runnable timeoutTask , long remainingNanos ) { lock . writeLock ( ) . lock ( ) ; try { this . timeoutTask = timeoutTask ; this . start = System . nanoTime ( ) ; this . targetEnd = start + remainingNanos ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { debugTime ( ">Sta...
This is the method which actually starts the timer
161,128
public void stop ( ) { lock . writeLock ( ) . lock ( ) ; try { debugRelativeTime ( "Stop!" ) ; this . stopped = true ; if ( this . future != null && ! this . future . isDone ( ) ) { debugRelativeTime ( "Cancelling" ) ; this . future . cancel ( true ) ; } this . future = null ; } finally { lock . writeLock ( ) . unlock ...
Stop the timeout ... mark it as stopped and cancel the scheduled future task if required
161,129
public void restart ( ) { lock . writeLock ( ) . lock ( ) ; try { if ( this . timeoutTask == null ) { throw new IllegalStateException ( Tr . formatMessage ( tc , "internal.error.CWMFT4999E" ) ) ; } stop ( ) ; this . stopped = false ; start ( this . timeoutTask ) ; } finally { lock . writeLock ( ) . unlock ( ) ; } }
Restart the timer ... stop the timer reset the stopped flag and then start again with the same timeout policy
161,130
public long check ( ) { long remaining = 0 ; lock . readLock ( ) . lock ( ) ; try { if ( this . timedout ) { boolean wasInterrupted = Thread . interrupted ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { if ( wasInterrupted ) { Tr . debug ( tc , "{0}: Throwing timeout exception and cle...
Check if the timedout flag was previously set and throw an exception if it was . Otherwise return the remaining timeout time in nanoseconds .
161,131
private void debugTime ( String message , long nanos ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { FTDebug . debugTime ( tc , getDescriptor ( ) , message , nanos ) ; } }
Output a debug message showing a given relative time converted from nanos to seconds
161,132
public static String createPropertyFilter ( String name , String value ) { assert name . matches ( "[^=><~()]+" ) ; StringBuilder builder = new StringBuilder ( name . length ( ) + 3 + ( value == null ? 0 : value . length ( ) * 2 ) ) ; builder . append ( '(' ) . append ( name ) . append ( '=' ) ; int begin = 0 ; if ( va...
Creates a filter string that matches an attribute value exactly . Characters in the value with special meaning will be escaped .
161,133
public static void delete ( final File f ) { if ( f != null && f . exists ( ) ) { AccessController . doPrivileged ( new PrivilegedAction < Object > ( ) { public Object run ( ) { if ( ! f . delete ( ) ) { logger . log ( Level . INFO , Messages . INSTALL_KERNEL_MESSAGES . getLogMessage ( "LOG_CANNOT_DELETE_FILE" , f . ge...
Java 2 security APIs for deleteOnExit
161,134
public static FileInputStream getFileIputStream ( final File file ) throws FileNotFoundException { try { return AccessController . doPrivileged ( new PrivilegedExceptionAction < FileInputStream > ( ) { public FileInputStream run ( ) throws FileNotFoundException { return new FileInputStream ( file ) ; } } ) ; } catch ( ...
Java 2 security APIs for FileInputStream
161,135
public static long getFileLength ( final File file ) throws FileNotFoundException { try { return AccessController . doPrivileged ( new PrivilegedExceptionAction < Long > ( ) { public Long run ( ) throws FileNotFoundException { return file . length ( ) ; } } ) ; } catch ( PrivilegedActionException e ) { throw ( FileNotF...
Java 2 security APIs for file length
161,136
JavaURLContext createJavaURLContext ( Hashtable < ? , ? > envmt , Name name ) { return new JavaURLContext ( envmt , helperServices , name ) ; }
This method should only be called by the JavaURLContextReplacer class for de - serializing an instance of JavaURLContext . The name parameter can be null .
161,137
public String encodeURL ( HttpSession session , String url ) { return encodeURL ( session , null , url , null ) ; }
called from ConvergedHttpSession . encodeURL path
161,138
public void complete ( VirtualConnection vc , TCPReadRequestContext rsc ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "complete() called: vc=" + vc ) ; } HttpOutboundServiceContextImpl mySC = ( HttpOutboundServiceContextImpl ) vc . getStateMap ( ) . get ( CallbackIDs...
Called by the channel below us when a read has finished .
161,139
public void error ( VirtualConnection vc , TCPReadRequestContext rsc , IOException ioe ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "error() called: vc=" + vc + " ioe=" + ioe ) ; } HttpOutboundServiceContextImpl mySC = ( HttpOutboundServiceContextImpl ) vc . getStat...
Called by the channel below us when an error occurs during a read .
161,140
public static void logLoudAndClear ( String textToLog , String callingClass , String callingMethod ) { final String methodName = "logLoudAndClear" ; final boolean trace = TraceComponent . isAnyTracingEnabled ( ) ; final String cClass = ( callingClass != null && ! callingClass . isEmpty ( ) ) ? callingClass : "callingCl...
logLoudAndClear Log the provided text in a very distinct way making it easy to find it in the trace . log This method should be used for testing and debugging proposes only . This method should not be used in shipped code .
161,141
private MessagingEngine createMessageEngine ( JsMEConfig me ) throws Exception { String thisMethodName = CLASS_NAME + ".createMessageEngine(JsMEConfig)" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , thisMethodName , "replace ME name here" ) ; } JsMessagingEngine eng...
Create a single Message Engine admin object using suppled config object .
161,142
private JsBusImpl getBusProxy ( JsMEConfig me ) { String thisMethodName = CLASS_NAME + ".getBusProxy(ConfigObject)" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , thisMethodName , "ME Name" ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ...
Returns the runtime configuration of the bus to which the supplied messaging engine belongs . If the bus runtime configuration does not yet exist it is created . In liberty this is default bus configuration
161,143
private JsBusImpl getBusProxy ( String name ) throws SIBExceptionBusNotFound { String thisMethodName = CLASS_NAME + ".getBusProxy(String)" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , thisMethodName , name ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc ....
Returns the runtime configuration of the bus to which the named messaging engine belongs . If the bus runtime configuration does not yet exist it is created .
161,144
public JsBus getBus ( String busName ) throws SIBExceptionBusNotFound { String thisMethodName = CLASS_NAME + ".getBus(String)" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , thisMethodName , busName ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryE...
Returns the runtime configuration of the named bus . For liberty is always default bus
161,145
public Set getMessagingEngineSet ( String busName ) { String thisMethodName = CLASS_NAME + ".getMessagingEngineSet(String)" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , thisMethodName , busName ) ; } Set retSet = new HashSet ( ) ; if ( meConfig != null ) { String m...
Returns the set of messaging engines on the named bus .
161,146
public String [ ] showMessagingEngines ( ) { String thisMethodName = CLASS_NAME + ".showMessagingEngines()" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , thisMethodName , this ) ; } final String [ ] list = new String [ _messagingEngines . size ( ) ] ; Enumeration e ...
Return a readable string of messaging engines in the process
161,147
public void startMessagingEngine ( String busName , String name ) throws Exception { String thisMethodName = CLASS_NAME + ".startMessagingEngine(String, String)" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , thisMethodName , new Object [ ] { busName , name } ) ; } B...
Start a messaging engine
161,148
public boolean isServerStarted ( ) { String thisMethodName = CLASS_NAME + ".isServerStarted()" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , thisMethodName , this ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . exit ( tc , ...
Has the WAS server in which we are contained now started?
161,149
public boolean isServerStopping ( ) { String thisMethodName = CLASS_NAME + ".isServerStopping()" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , thisMethodName , this ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . exit ( tc ...
Is the WAS server in which we are contained stopping?
161,150
public boolean isServerInRecoveryMode ( ) { String thisMethodName = CLASS_NAME + ".isServerInRecoveryMode()" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , thisMethodName , this ) ; } boolean ret = false ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntry...
250606 . 3 recovery mode support
161,151
public List < String > listDefinedBuses ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "listDefinedBuses" , this ) ; } List buses = null ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . exit ( tc , "listDefinedBuses" , buses ...
Returns a list of configured buses in this cell . For liberty this method will return the null value because no directory structure is maintained in liberty for a bus .
161,152
public static final String base64Decode ( String str , String enc ) throws UnsupportedEncodingException { if ( str == null ) { return null ; } else { byte data [ ] = getBytes ( str ) ; return base64Decode ( new String ( data , enc ) ) ; } }
Converts a String with the given encoding to a base64 encoded String .
161,153
public static final String base64Decode ( String str ) { if ( str == null ) { return null ; } else { byte data [ ] = getBytes ( str ) ; return toString ( base64Decode ( data ) ) ; } }
Converts a base64 encoded String to a decoded String .
161,154
public SIBusMessage receiveNoWait ( final SITransaction tran ) throws SISessionDroppedException , SIConnectionDroppedException , SISessionUnavailableException , SIConnectionUnavailableException , SIConnectionLostException , SILimitExceededException , SINotAuthorizedException , SIResourceException , SIErrorException , S...
Receives a message . Checks that the session is valid . Maps the transaction parameter before delegating .
161,155
public void start ( boolean deliverImmediately ) throws SIConnectionDroppedException , SISessionUnavailableException , SIConnectionUnavailableException , SIConnectionLostException , SIResourceException , SIErrorException , SIErrorException { final String methodName = "start" ; if ( TraceComponent . isAnyTracingEnabled ...
Starts message delivery . Checks that the session is valid then delegates .
161,156
public void stop ( ) throws SISessionDroppedException , SIConnectionDroppedException , SISessionUnavailableException , SIConnectionUnavailableException , SIConnectionLostException , SIResourceException , SIErrorException { final String methodName = "stop" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEnt...
Stops message delivery . Checks that the session is valid then delegates .
161,157
public void unlockAll ( boolean incrementUnlockCount ) throws SISessionUnavailableException , SISessionDroppedException , SIConnectionUnavailableException , SIConnectionDroppedException , SIResourceException , SIConnectionLostException , SIIncorrectCallException { throw new SibRaNotSupportedException ( NLS . getString ...
Unlocking of messages is not supported .
161,158
public void setConnectionObjectID ( int i ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setConnectionObjectID" , "" + i ) ; connectionObjectID = i ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "setCon...
Sets the Connection ID referring to the SIMPConnection Object on the server .
161,159
public ProxyQueueConversationGroup getProxyQueueConversationGroup ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getProxyQueueConversationGroup" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getPr...
Gets the proxy queue group associated with this conversation .
161,160
public CatConnectionListenerGroup getCatConnectionListeners ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getCatConnectionListeners" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getCatConnection...
Gets the connection listener group associated with thisconversation
161,161
public SICoreConnection getSICoreConnection ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getSICoreConnection" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getSICoreConnection" , siCoreConnectio...
Returns the SICoreConnection in use with this conversation
161,162
public final boolean unlink ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "unlink" , _positionString ( ) ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "cursor count = " + _cursorCount ) ; boolean ...
Request that the receiver be unlinked from the list . If the receiver is linked it will be marked as logically unlinked . Note that this will perform a logical unlink which may result in a physical unlink
161,163
private boolean isRequestForbidden ( StringBuffer path ) { boolean requestIsForbidden = false ; String matchString = path . toString ( ) ; if ( WCCustomProperties . ALLOW_DOTS_IN_NAME ) { if ( matchString . indexOf ( ".." ) > - 1 ) { if ( ( matchString . indexOf ( "/../" ) > - 1 ) || ( matchString . indexOf ( "\\..\\" ...
returns true if request is forbidden because it contains .. etc .
161,164
private boolean isDirectoryTraverse ( StringBuffer path ) { boolean directoryTraverse = false ; String matchString = path . toString ( ) ; if ( WCCustomProperties . ALLOW_DOTS_IN_NAME ) { if ( matchString . indexOf ( ".." ) > - 1 ) { if ( ( matchString . indexOf ( "/../" ) > - 1 ) || ( matchString . indexOf ( "\\..\\" ...
542155 Add isDirectoryTraverse method - reduced version of isRequestForbidden
161,165
public ServiceRegistration < FileMonitor > monitorFiles ( Collection < String > paths , long monitorInterval ) { BundleContext bundleContext = actionable . getBundleContext ( ) ; final Hashtable < String , Object > fileMonitorProps = new Hashtable < String , Object > ( ) ; fileMonitorProps . put ( FileMonitor . MONITOR...
Registers this file monitor to start monitoring the specified files at the specified interval .
161,166
public ServiceRegistration < FileMonitor > monitorFiles ( String ID , Collection < String > paths , long pollingRate , String trigger ) { BundleContext bundleContext = actionable . getBundleContext ( ) ; final Hashtable < String , Object > fileMonitorProps = new Hashtable < String , Object > ( ) ; fileMonitorProps . pu...
Registers this file monitor to start monitoring the specified files either by mbean notification or polling rate .
161,167
private Boolean isActionNeeded ( Collection < File > createdFiles , Collection < File > modifiedFiles ) { boolean actionNeeded = false ; for ( File createdFile : createdFiles ) { if ( currentlyDeletedFiles . contains ( createdFile ) ) { currentlyDeletedFiles . remove ( createdFile ) ; actionNeeded = true ; } } if ( mod...
Action is needed if a file is modified or if it is recreated after it was deleted .
161,168
public QueuedMessage [ ] getQueuedMessages ( java . lang . Integer fromIndexInteger , java . lang . Integer toIndexInteger , java . lang . Integer totalMessagesPerpageInteger ) throws Exception { int fromIndex = fromIndexInteger . intValue ( ) ; int toIndex = toIndexInteger . intValue ( ) ; int totalMessagesPerpage = t...
673411 - start
161,169
private void initializeCacheData ( int cacheSize ) { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && ( tc . isEntryEnabled ( ) || tcOOM . isEntryEnabled ( ) ) ) Tr . entry ( tc . isEntryEnabled ( ) ? tc : tcOOM , "initializeCacheData : " + ivCache . getName ( ) + " preferred size ...
Initialize various optimization values used by the eviction strategy that depend on the cache size .
161,170
private void initializeSweepInterval ( long sweepInterval ) { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && ( tc . isEntryEnabled ( ) || tcOOM . isEntryEnabled ( ) ) ) Tr . entry ( tc . isEntryEnabled ( ) ? tc : tcOOM , "initializeSweepInterval : " + ivCache . getName ( ) + " pr...
Initialize all of the intervals that are derived from the configurable sweep interval . Can be called at any time during runtime .
161,171
private boolean isTraceEnabled ( boolean debug ) { if ( debug ? tc . isDebugEnabled ( ) : tc . isEntryEnabled ( ) ) { return true ; } if ( ivCache . numSweeps % NUM_SWEEPS_PER_OOMTRACE == 1 && ( debug ? tcOOM . isDebugEnabled ( ) : tcOOM . isEntryEnabled ( ) ) ) { return true ; } return false ; }
Returns true if trace should be printed .
161,172
protected NetworkConnection getNetworkConnectionInstance ( VirtualConnection vc ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getNetworkConnectionInstance" , vc ) ; NetworkConnection retConn = null ; if ( vc != null ) { retConn = conn ; if ( vc != ( ( CFWNetworkConnection ) conn ) . getVirtualConnecti...
This method tries to avoid creating a new instance of a CFWNetworkConnection object by seeing if the specified virtual connection is the one that we are wrapping in the CFWNetworkConnection instance that created this context . If it is we simply return that . Otherwise we must create a new instance .
161,173
private void setChoices ( BigInteger multiChoice , JSchema schema ) { JSType topType = ( JSType ) schema . getJMFType ( ) ; if ( topType instanceof JSVariant ) setChoices ( multiChoice , schema , ( JSVariant ) topType ) ; else if ( topType instanceof JSTuple ) setChoices ( multiChoice , topType . getMultiChoiceCount ( ...
multichoice code .
161,174
private void setChoices ( BigInteger multiChoice , JSchema schema , JSVariant var ) { for ( int i = 0 ; i < var . getCaseCount ( ) ; i ++ ) { BigInteger count = ( ( JSType ) var . getCase ( i ) ) . getMultiChoiceCount ( ) ; if ( multiChoice . compareTo ( count ) >= 0 ) multiChoice = multiChoice . subtract ( count ) ; e...
Set the choices implied by the multiChoice code or contribution to a single JSVariant
161,175
private void setChoices ( BigInteger multiChoice , BigInteger radix , JSchema schema , JSVariant [ ] vars ) { for ( int j = 0 ; j < vars . length ; j ++ ) { radix = radix . divide ( vars [ j ] . getMultiChoiceCount ( ) ) ; BigInteger contrib = multiChoice . divide ( radix ) ; multiChoice = multiChoice . remainder ( rad...
JSVariant whose choices are being set .
161,176
private static BigInteger getMultiChoice ( int [ ] choices , JSchema schema , JSVariant var ) throws JMFUninitializedAccessException { int choice = choices [ var . getIndex ( ) ] ; if ( choice == - 1 ) throw new JMFUninitializedAccessException ( schema . getPathName ( var ) ) ; BigInteger ans = BigInteger . ZERO ; for ...
Compute the multiChoice code or contribution for an individual variant
161,177
private static BigInteger getMultiChoice ( int [ ] choices , JSchema schema , JSVariant [ ] vars ) throws JMFUninitializedAccessException { BigInteger base = BigInteger . ZERO ; for ( int i = 0 ; i < vars . length ; i ++ ) base = base . multiply ( vars [ i ] . getMultiChoiceCount ( ) ) . add ( getMultiChoice ( choices ...
being calculate .
161,178
protected String getStyle ( FacesContext facesContext , UIComponent link ) { if ( link instanceof HtmlCommandLink ) { return ( ( HtmlCommandLink ) link ) . getStyle ( ) ; } return ( String ) link . getAttributes ( ) . get ( HTML . STYLE_ATTR ) ; }
Can be overwritten by derived classes to overrule the style to be used .
161,179
protected String getStyleClass ( FacesContext facesContext , UIComponent link ) { if ( link instanceof HtmlCommandLink ) { return ( ( HtmlCommandLink ) link ) . getStyleClass ( ) ; } return ( String ) link . getAttributes ( ) . get ( HTML . STYLE_CLASS_ATTR ) ; }
Can be overwritten by derived classes to overrule the style class to be used .
161,180
protected void completeConnectionPreface ( ) throws Http2Exception { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "completeConnectionPreface entry: about to send preface SETTINGS frame" ) ; } FrameSettings settings ; if ( Constants . SPEC_INITIAL_WINDOW_SIZE != this . s...
Complete the connection preface . At this point we should have received the client connection preface string . Now we need to make sure that the client sent a settings frame along with the preface update our settings and send an empty settings frame in response to the client preface .
161,181
private void readWriteTransitionState ( Constants . Direction direction ) throws Http2Exception { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "readWriteTransitionState: entry: frame type: " + currentFrame . getFrameType ( ) + " state: " + state ) ; } if ( currentFrame ...
Transitions the stream state give the previous state and current frame . Handles writes and error processing as needed .
161,182
private void updateStreamState ( StreamState state ) { this . state = state ; if ( StreamState . CLOSED . equals ( state ) ) { setCloseTime ( System . currentTimeMillis ( ) ) ; muxLink . closeStream ( this ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "current stre...
Update the stream state and provide logging if enabled
161,183
private void processSETTINGSFrame ( ) throws FlowControlException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "processSETTINGSFrame entry:\n" + currentFrame . toString ( ) ) ; } if ( ! connection_preface_settings_rcvd && ! ( ( FrameSettings ) currentFrame ) . flagAck...
Helper method to process a SETTINGS frame received from the client . Since the protocol utilizes SETTINGS frames for initialization some special logic is needed .
161,184
private void updateStreamReadWindow ( ) throws Http2Exception { if ( currentFrame instanceof FrameData ) { long frameSize = currentFrame . getPayloadLength ( ) ; streamReadWindowSize -= frameSize ; muxLink . connectionReadWindowSize -= frameSize ; if ( streamReadWindowSize < ( muxLink . maxReadWindowSize / 2 ) || muxLi...
If this stream is receiving a DATA frame the local read window needs to be updated . If the read window drops below a threshold a WINDOW_UPDATE frame will be sent for both the connection and stream to update the windows .
161,185
protected void updateInitialWindowsUpdateSize ( int newSize ) throws FlowControlException { if ( myID == 0 ) { return ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "updateInitialWindowsUpdateSize entry: stream {0} newSize: {1}" , myID , newSize ) ; } long diff = newS...
Updates the initial window size for this stream . If any data frames are waiting for an increased window size write them out if the new window size allows it .
161,186
private void processIdle ( Constants . Direction direction ) throws Http2Exception { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "processIdle entry: stream " + myID ) ; } if ( direction == Constants . Direction . READ_IN ) { if ( frameType == FrameTypes . HEADERS ) { m...
Perform operations to transition into IDLE state
161,187
private boolean isWindowLimitExceeded ( FrameData dataFrame ) { if ( streamWindowUpdateWriteLimit - dataFrame . getPayloadLength ( ) < 0 || muxLink . getWorkQ ( ) . getConnectionWriteLimit ( ) - dataFrame . getPayloadLength ( ) < 0 ) { String s = "Cannot write Data Frame because it would exceed the stream window update...
Check to see if a writing out a frame will cause the stream or connection window to go exceeded
161,188
public void sendRequestToWc ( FramePPHeaders frame ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "H2StreamProcessor.sendRequestToWc()" ) ; } if ( null == frame ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "H2Strea...
Send an artificially created H2 request from a push_promise up to the WebContainer
161,189
private void setHeadersComplete ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "completed headers have been received stream " + myID ) ; } headersCompleted = true ; muxLink . setContinuationExpected ( false ) ; }
Call when all header block fragments for a header block have been received
161,190
private void getHeadersFromFrame ( ) { byte [ ] hbf = null ; if ( currentFrame . getFrameType ( ) == FrameTypes . HEADERS || currentFrame . getFrameType ( ) == FrameTypes . PUSHPROMISEHEADERS ) { hbf = ( ( FrameHeaders ) currentFrame ) . getHeaderBlockFragment ( ) ; } else if ( currentFrame . getFrameType ( ) == FrameT...
Appends the header block fragment in the current header frame to this stream s incomplete header block
161,191
private void getBodyFromFrame ( ) { if ( dataPayload == null ) { dataPayload = new ArrayList < byte [ ] > ( ) ; } if ( currentFrame . getFrameType ( ) == FrameTypes . DATA ) { dataPayload . add ( ( ( FrameData ) currentFrame ) . getData ( ) ) ; } }
Grab the data from the current frame
161,192
private void processCompleteData ( ) throws ProtocolException { WsByteBufferPoolManager bufManager = HttpDispatcher . getBufferManager ( ) ; WsByteBuffer buf = bufManager . allocate ( getByteCount ( dataPayload ) ) ; for ( byte [ ] bytes : dataPayload ) { buf . put ( bytes ) ; } buf . flip ( ) ; if ( expectedContentLen...
Put the data payload for this stream into the read buffer that will be passed to the webcontainer . This should only be called when this stream has received an end of stream flag .
161,193
private void setReadyForRead ( ) throws ProtocolException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "setReadyForRead entry: stream id:" + myID ) ; } muxLink . updateHighestStreamId ( myID ) ; if ( headersCompleted ) { ExecutorService executorService = CHFWBundle . ...
Tell the HTTP inbound link that we have data ready for it to read
161,194
private void moveDataIntoReadBufferArray ( WsByteBuffer newReadBuffer ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "moveDataIntoReadBufferArray entry: stream " + myID + " buffer: " + newReadBuffer ) ; } if ( newReadBuffer != null ) { int size = newReadBuffer . remai...
Add a buffer to the list of buffers that will be sent to the WebContainer when a read is requested
161,195
@ SuppressWarnings ( "unchecked" ) public VirtualConnection read ( long numBytes , WsByteBuffer [ ] requestBuffers ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "read entry: stream " + myID + " request: " + requestBuffers + " num bytes requested: " + numBytes ) ; } l...
Read the HTTP header and data bytes for this stream
161,196
public boolean isStreamClosed ( ) { if ( this . myID == 0 && ! endStream ) { return false ; } if ( state == StreamState . CLOSED ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "isStreamClosed stream closed; " + streamId ( ) ) ; } return true ; } boolean rc = muxLink ....
Check if the current stream should be closed
161,197
private int getByteCount ( ArrayList < byte [ ] > listOfByteArrays ) { int count = 0 ; for ( byte [ ] byteArray : listOfByteArrays ) { if ( byteArray != null ) { count += byteArray . length ; } } return count ; }
Get the number of bytes in this list of byte arrays
161,198
public static String generateIncUuid ( Object caller ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "generateIncUuid" , "Caller=" + caller ) ; java . util . Date time = new java . util . Date ( ) ; int hash = caller . hashCode ( ) ; long millis = time . getTime ( ) ;...
The UUID for this incarnation of ME is generated using the hashcode of this object and the least significant four bytes of the current time in milliseconds .
161,199
public static String getMEName ( Object o ) { String meName ; if ( ! threadLocalStack . isEmpty ( ) ) { meName = threadLocalStack . peek ( ) ; } else { meName = DEFAULT_ME_NAME ; } String str = "" ; if ( o != null ) { str = "/" + Integer . toHexString ( System . identityHashCode ( o ) ) ; } return "" ; }
Get Jetstream ME name to be printed in trace message