idx
int64
0
165k
question
stringlengths
73
5.81k
target
stringlengths
5
918
161,400
protected Object getSession ( String id , int version , boolean isSessionAccess , boolean forceSessionRetrieval , Object xdCorrelator ) { if ( isSessionAccess ) { if ( version == - 1 ) { _store . refreshSession ( id , xdCorrelator ) ; } else { _store . refreshSession ( id , version , xdCorrelator ) ; } } ISession iSess...
forceSessionRetrieval can only be true when using applicationSessions
161,401
public static byte [ ] copyCredToken ( byte [ ] credToken ) { if ( credToken == null ) { return null ; } final int LEN = credToken . length ; if ( LEN == 0 ) { return new byte [ LEN ] ; } byte [ ] newCredToken = new byte [ LEN ] ; System . arraycopy ( credToken , 0 , newCredToken , 0 , LEN ) ; return newCredToken ; }
Create a copy of the specified byte array .
161,402
public static X509Certificate [ ] copyCertChain ( X509Certificate [ ] certChain ) { if ( certChain == null ) { return null ; } final int LEN = certChain . length ; if ( LEN == 0 ) { return new X509Certificate [ LEN ] ; } X509Certificate [ ] newCertChain = new X509Certificate [ LEN ] ; System . arraycopy ( certChain , 0...
Create a copy of the specified cert array .
161,403
public void waitOnChains ( long quiesceTimeout ) { ChannelFramework cf = ChannelFrameworkFactory . getChannelFramework ( ) ; int elapsedTime = 0 ; if ( waitingChainNames . size ( ) > 0 && elapsedTime < quiesceTimeout ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( this , tc...
Poll the list of chains until they re stopped or the quiesce timeout is hit
161,404
static void closeLink ( CommsConnection conn ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "closeLink" , conn ) ; conn . setSchemaSet ( null ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "closeLink" ) ; }
Called when a connection closes .
161,405
static byte [ ] receiveHandshake ( CommsConnection conn , byte [ ] data ) throws JMFException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "receiveHandshake" , conn ) ; Coder coder = new Coder ( data ) ; conn . setSchemaSet ( makeSchemaIdSet ( coder ) ) ; byte [ ] id...
Called when schema ids are received during an initial handshake
161,406
static void receiveSchemas ( CommsConnection conn , byte [ ] data ) throws JMFException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "receiveSchemas" , conn ) ; final SchemaSet ids ; try { ids = ( SchemaSet ) conn . getSchemaSet ( ) ; if ( ids == null ) { if ( TraceC...
Called when schema definitions are received on a connection
161,407
static void sendSchemas ( CommsConnection conn , JMFSchema [ ] schemas ) throws SIConnectionLostException , SIConnectionUnavailableException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "sendSchemas" , conn ) ; SchemaSet ids = ( SchemaSet ) conn . getSchemaSet ( ) ; ...
Called when sending a message on a connection to check for and send any missing schemas
161,408
private static void addSchemaDefinitions ( SchemaSet ids , Coder coder ) throws JMFException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Decoding " + coder . count + "new schema definitions" ) ; for ( int i = 0 ; i < coder . count ; i ++ ) { int length = ArrayUtil ...
Add extra incoming schema definitions
161,409
public void cleanUpSubject ( ) { if ( temporarySubject != null ) { AccessController . doPrivileged ( new PrivilegedAction < Object > ( ) { public Object run ( ) { removeSubjectPrincipals ( ) ; removeSubjectPublicCredentials ( ) ; removeSubjectPrivateCredentials ( ) ; return null ; } } ) ; } temporarySubject = null ; }
Common Subject clean up .
161,410
protected void payloadWritten ( int payloadSize ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "payloadWritten" , new Object [ ] { this , new Integer ( payloadSize ) } ) ; _unwrittenDataSize -= payloadSize ; if ( _unwrittenDataSize == 0 ) { _recUnit . payloadWritten ( payloadSize + HEADER_SIZE ) ; } else { _recUn...
Informs the recoverable unit section that previously unwritten data has been written to disk by one of its data items and no longer needs to be tracked in the unwritten data field . The recoverable unit must use the supplied information to track the amount of unwritten active data it holds . This information must be pa...
161,411
protected void payloadDeleted ( int totalPayloadSize , int unwrittenPayloadSize ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "payloadDeleted" , new Object [ ] { this , new Integer ( totalPayloadSize ) , new Integer ( unwrittenPayloadSize ) } ) ; _totalDataSize -= totalPayloadSize ; _unwrittenDataSize -= unwritt...
Informs the recoverable unit section that data has been removed . At present this method is only used by the SingleDataItem class to remove the payload required for the its data before adding back additional payload back again for the replacement data data .
161,412
public BeanId getBeanId ( ) { if ( ivBeanId == null ) { ivBeanId = new BeanId ( ivBMD . j2eeName , null , false ) ; } return ivBeanId ; }
Gets the partially formed BeanId for this bean . The resulting BeanId will not have a home reference .
161,413
protected String promptForText ( com . ibm . ws . security . audit . reader . utils . ConsoleWrapper stdin , PrintStream stdout ) { return promptForText ( stdin , stdout , "encode.enterText" , "encode.reenterText" , "encode.readError" , "encode.entriesDidNotMatch" ) ; }
Prompt the user to enter text to encode . Prompts twice and compares to ensure it was entered correctly .
161,414
public static String getPropertyOrNull ( String name ) { try { return AccessController . doPrivileged ( new SystemPropertyAction ( name ) ) ; } catch ( SecurityException ex ) { LOG . log ( Level . FINE , "SecurityException raised getting property " + name , ex ) ; return null ; } }
Get the system property via the AccessController but if a SecurityException is raised just return null ;
161,415
public MatchTarget duplicate ( ) { try { return ( MatchTarget ) clone ( ) ; } catch ( CloneNotSupportedException e ) { FFDC . processException ( cclass , "com.ibm.ws.sib.matchspace.MatchTarget.duplicate" , e , "1:112:1.15" ) ; throw new IllegalStateException ( ) ; } }
Creates a clone of this MatchTarget . Override only if the system clone support does not produce a correct result .
161,416
public EJBBinding createBindingObject ( HomeRecord hr , HomeWrapperSet homeSet , String interfaceName , int interfaceIndex , boolean local ) { return new EJBBinding ( hr , interfaceName , interfaceIndex , local ) ; }
Store the binding information for later use .
161,417
public EJBBinding createJavaBindingObject ( HomeRecord hr , HomeWrapperSet homeSet , String interfaceName , int interfaceIndex , boolean local , EJBBinding bindingObject ) { return bindingObject ; }
This method is provided for tWas and is not used for Liberty . Just return the bindingObject for now .
161,418
protected Class < ? > loadClass ( String className , boolean resolve ) throws ClassNotFoundException { Class < ? > loadedClass = null ; synchronized ( this ) { loadedClass = findLoadedClass ( className ) ; if ( loadedClass == null ) { int index = className . lastIndexOf ( '.' ) ; String packageName = index > 0 ? classN...
load class from the local classpath first and the class was not found load from parent or system classload again .
161,419
public DERObject getConvertedValue ( DERObjectIdentifier oid , String value ) { if ( value . length ( ) != 0 && value . charAt ( 0 ) == '#' ) { try { return convertHexEncoded ( value , 1 ) ; } catch ( IOException e ) { throw new RuntimeException ( "can't recode value for oid " + oid . getId ( ) , e ) ; } } else if ( oi...
Apply default coversion for the given value depending on the oid and the character range of the value .
161,420
public byte [ ] transform ( ClassLoader loader , String className , Class < ? > classBeingRedefined , ProtectionDomain protectionDomain , byte [ ] classfileBuffer ) throws IllegalClassFormatException { if ( ( loader == null && ! includeBootstrap ) || probeManagerImpl . isExcludedClass ( className ) ) { return null ; } ...
Perform necessary transformation to hook static initializers of probe candidates .
161,421
public synchronized void setStoreFileSize ( long newMinimumStoreFileSize , long newMaximumStoreFileSize ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "setStoreFileSize" , new Object [ ] { new Long ( newMinimumStoreFileSize ) , ne...
Sets the size of the store file to the new values . At least the minimum space is reserved in the file system . No more than the maximum number of bytes will be used . Blocks until this has completed . The initial values used by the ObjecStore are 0 and Long . MAX_VAULE . The store will attempt to release space as Mana...
161,422
public synchronized void setCachedManagedObjectsSize ( int cachedManagedObjectsSize ) throws ObjectManagerException { this . cachedManagedObjectsSize = cachedManagedObjectsSize ; cachedManagedObjects = new java . lang . ref . SoftReference [ cachedManagedObjectsSize ] ; writeHeader ( ) ; force ( ) ; }
Causes all curently cached ManagedObjects to be dropped .
161,423
protected void setAllocationAllowed ( ) throws ObjectManagerException { final String methodName = "setAllocationAllowed" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , methodName , new Object [ ] { new Long ( storeFileSizeAllocated ) , new Long ( storeFileSizeUs...
Tests to see if allocation of new Objects should be allowed or not . Caller must be synchronized on this .
161,424
public final void reserve ( int deltaSize , boolean paced ) throws ObjectManagerException { final String methodName = "reserve" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , methodName , new Object [ ] { new Integer ( deltaSize ) , new Boolean ( paced ) } ) ; l...
Space accounting .
161,425
public void simulateFull ( boolean isFull ) throws ObjectManagerException { final String methodName = "simulateFull" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , methodName , new Object [ ] { new Boolean ( isFull ) } ) ; if ( isFull ) { objectManagerState . wa...
When enabled reserve requests to this ObjectStore will throw ObjectStoreFullException .
161,426
public synchronized void flush ( ) throws ObjectManagerException { final String methodName = "flush" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , methodName ) ; if ( storeStrategy == STRATEGY_SAVE_ONLY_ON_SHUTDOWN ) { if ( objectManagerState . getObjectManager...
Writes buffered output to hardened storage . Blocks until this has completed .
161,427
private void updateDirectory ( ) throws ObjectManagerException { final String methodName = "updateDirectory" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , methodName ) ; if ( checkpointManagedObjectsToWrite == null ) captureCheckpointManagedObjects ( ) ; checkp...
Capture the objects we will write and delete . Update the directory and freeSpaceMap . Do not overwrite any existing data because we need to have the before and after versions available until we flip over to the after version when we rewrite the header . 1 ) Update the directory . 2 ) Allocate new space for the directo...
161,428
FreeSpace allocateSpace ( long lengthRequired ) throws ObjectManagerException { final String methodName = "allocateSpace" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , methodName , new Object [ ] { new Long ( lengthRequired ) } ) ; FreeSpace freeSpace ; java . ...
Allocate space in the file .
161,429
public Map < String , ProvisioningFeatureDefinition > getFeatureDefinitions ( String productName ) { if ( productName . equals ( CORE_PRODUCT_NAME ) ) { return getCoreProductFeatureDefinitions ( ) ; } else if ( productName . equals ( USR_PRODUCT_EXT_NAME ) ) { return getUsrProductFeatureDefinitions ( ) ; } else { retur...
Retrieves a map of features definitions associated with the specified product name .
161,430
public Map < String , ProvisioningFeatureDefinition > getCoreFeatureDefinitionsExceptPlatform ( ) { Map < String , ProvisioningFeatureDefinition > features = new TreeMap < String , ProvisioningFeatureDefinition > ( ) ; File featureDir = getCoreFeatureDir ( ) ; if ( ! featureDir . isDirectory ( ) && ! featureDir . mkdir...
This API for install used only .
161,431
private Map < String , ProvisioningFeatureDefinition > getCoreProductFeatureDefinitions ( ) { Map < String , ProvisioningFeatureDefinition > features = new TreeMap < String , ProvisioningFeatureDefinition > ( ) ; File featureDir = getCoreFeatureDir ( ) ; if ( ! featureDir . isDirectory ( ) && ! featureDir . mkdir ( ) )...
Retrieves a Map of Liberty core features .
161,432
private Map < String , ProvisioningFeatureDefinition > getUsrProductFeatureDefinitions ( ) { Map < String , ProvisioningFeatureDefinition > features = null ; File userDir = Utils . getUserDir ( ) ; if ( userDir != null && userDir . exists ( ) ) { File userFeatureDir = new File ( userDir , USER_FEATURE_DIR ) ; if ( user...
Retrieves a Map of feature definitions in default usr product extension location
161,433
public String getProdFeatureLocation ( String productName ) { String location = null ; if ( productName . equals ( CORE_PRODUCT_NAME ) ) { location = Utils . getInstallDir ( ) . getAbsolutePath ( ) ; } else if ( productName . equals ( USR_PRODUCT_EXT_NAME ) ) { location = Utils . getUserDir ( ) . getAbsolutePath ( ) ; ...
Retrieves the location of the specified product name .
161,434
public String getProdFeatureId ( String productName ) { String productId = null ; if ( ! productName . equals ( CORE_PRODUCT_NAME ) && ! productName . equals ( USR_PRODUCT_EXT_NAME ) ) { readProductExtFeatureLocations ( ) ; if ( productExtNameInfoMap . containsKey ( productName ) ) { productId = productExtNameInfoMap ....
Retrieves the ID of the specified product name .
161,435
public File getCoreFeatureDir ( ) { File featureDir = null ; File installDir = Utils . getInstallDir ( ) ; if ( installDir != null ) { featureDir = new File ( installDir , FEATURE_DIR ) ; } if ( featureDir == null ) { throw new RuntimeException ( "Feature Directory not found" ) ; } return featureDir ; }
Retrieves the Liberty core features directory .
161,436
public File getCorePlatformDir ( ) { File platformDir = null ; File installDir = Utils . getInstallDir ( ) ; if ( installDir != null ) { platformDir = new File ( installDir , PLATFORM_DIR ) ; } if ( platformDir == null ) { throw new RuntimeException ( "Platform Directory not found" ) ; } return platformDir ; }
Retrieves the Liberty core platform directory .
161,437
public File getCoreAssetDir ( ) { File assetDir = null ; File installDir = Utils . getInstallDir ( ) ; if ( installDir != null ) { assetDir = new File ( installDir , ASSET_DIR ) ; } if ( assetDir == null ) { throw new RuntimeException ( "Asset Directory not found" ) ; } return assetDir ; }
Retrieves the Liberty core assets directory .
161,438
public ContentBasedLocalBundleRepository getBundleRepository ( String featureName , WsLocationAdmin locService ) { return BundleRepositoryRegistry . getRepositoryHolder ( featureName ) . getBundleRepository ( ) ; }
Get bundle repository
161,439
@ FFDCIgnore ( { IllegalCharsetNameException . class , UnsupportedCharsetException . class } ) public static String mapCharset ( String enc , String deflt ) { if ( enc == null ) { return deflt ; } int idx = enc . indexOf ( ";" ) ; if ( idx != - 1 ) { enc = enc . substring ( 0 , idx ) ; } enc = charsetPattern . matcher ...
into something that is actually supported by Java and the Stax parsers and such .
161,440
public static void setUp ( ) throws Exception { LDAPUtils . addLDAPVariables ( server ) ; Log . info ( c , "setUp" , "Starting the server... (will wait for userRegistry servlet to start)" ) ; server . copyFileToLibertyInstallRoot ( "lib/features" , "internalfeatures/securitylibertyinternals-1.0.mf" ) ; server . addInst...
Updates the sample which is expected to be at the hard - coded path . If this test is failing check this path is correct .
161,441
public void getUserSecurityName ( ) throws Exception { String user = "vmmtestuser" ; String securityName = "cn=vmmtestuser,cn=users,dc=secfvt2,dc=austin,dc=ibm,dc=com" ; Log . info ( c , "getUserSecurityName" , "Checking with a valid user." ) ; LDAPFatUtils . assertDNsEqual ( "User security name didn't match expected v...
Hit the test servlet to see if getUserSecurityName works when supplied with a valid user
161,442
public void initialRead ( ) { try { this . buffer = this . isc . getRequestBodyBuffer ( ) ; if ( null != this . buffer ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Buffer returned from getRequestBodyBuffer : " + this . buffer ) ; } this . bytesRead += this . buffer...
with the current set of data
161,443
private String encode ( PrintStream stderr , String plaintext , String encodingType , Map < String , String > properties ) throws InvalidPasswordEncodingException , UnsupportedCryptoAlgorithmException { String ret = null ; try { ret = PasswordUtil . encode ( plaintext , encodingType == null ? PasswordUtil . getDefaultE...
Handle encoding of the plaintext provided . Capture any Exceptions and print the stack trace .
161,444
protected String getDescription ( JSONArray customInfoArray ) { StringBuffer sb = new StringBuffer ( ) ; sb . append ( getMessage ( "encode.option-custom.encryption" ) ) ; for ( int i = 0 ; i < customInfoArray . size ( ) ; i ++ ) { JSONObject customInfo = ( JSONObject ) customInfoArray . get ( i ) ; String name = ( Str...
Returns the message string of the custom encryption information .
161,445
private void extractFiles ( ArtifactMetadata artifactMetadata ) throws RepositoryArchiveIOException , RepositoryArchiveEntryNotFoundException , RepositoryArchiveException { _readmePayload = artifactMetadata . getFileWithExtension ( ".txt" ) ; if ( _readmePayload == null ) { throw new RepositoryArchiveEntryNotFoundExcep...
Extract the files from the zip
161,446
private String getFixId ( IFixInfo iFixInfo , ExtractedFileInformation xmlInfo ) throws RepositoryArchiveInvalidEntryException { if ( null == iFixInfo ) { throw new RepositoryArchiveInvalidEntryException ( "Null XML object provided" , xmlInfo . getSourceArchive ( ) , xmlInfo . getSelectedPathFromArchive ( ) ) ; } retur...
Get the ID of the iFix from the Java representation of the iFix XML
161,447
private List < String > getProvides ( IFixInfo iFixInfo , ParserBase . ExtractedFileInformation xmlInfo ) throws RepositoryArchiveInvalidEntryException { if ( null == iFixInfo ) { throw new RepositoryArchiveInvalidEntryException ( "Null document provided" , xmlInfo . getSourceArchive ( ) , xmlInfo . getSelectedPathFrom...
Get a list of the APARs fixed by this iFix
161,448
private String parseManifestForAppliesTo ( File file ) throws RepositoryArchiveIOException { Manifest mf = null ; try ( JarFile jar = new JarFile ( file ) ) { try { mf = jar . getManifest ( ) ; } catch ( IOException ioe ) { throw new RepositoryArchiveIOException ( "Error getting manifest from jar " + jar . getName ( ) ...
Looks at the manifest file extracting info and putting the info into the supplied asset
161,449
public static int bytesToInt ( byte [ ] bytes , int offset ) { return ( ( bytes [ offset + 3 ] & 0xFF ) << 0 ) + ( ( bytes [ offset + 2 ] & 0xFF ) << 8 ) + ( ( bytes [ offset + 1 ] & 0xFF ) << 16 ) + ( ( bytes [ offset + 0 ] & 0xFF ) << 24 ) ; }
A utility method to convert the int from the byte array to an int .
161,450
public static short bytesToShort ( byte [ ] bytes , int offset ) { short result = 0x0 ; for ( int i = offset ; i < offset + 2 ; ++ i ) { result = ( short ) ( ( result ) << 8 ) ; result |= ( bytes [ i ] & 0x00FF ) ; } return result ; }
A utility method to convert the short from the byte array to a short .
161,451
public static long bytesToLong ( byte [ ] bytes , int offset ) { long result = 0x0 ; for ( int i = offset ; i < offset + 8 ; ++ i ) { result = result << 8 ; result |= ( bytes [ i ] & 0x00000000000000FFl ) ; } return result ; }
A utility method to convert the long from the byte array to a long .
161,452
public static char bytesToChar ( byte [ ] bytes , int offset ) { char result = 0x0 ; for ( int i = offset ; i < offset + 2 ; ++ i ) { result = ( char ) ( ( result ) << 8 ) ; result |= ( bytes [ i ] & 0x00FF ) ; } return result ; }
A utility method to convert the char from the byte array to a char .
161,453
public static void intToBytes ( int value , byte [ ] bytes , int offset ) { bytes [ offset + 3 ] = ( byte ) ( value >>> 0 ) ; bytes [ offset + 2 ] = ( byte ) ( value >>> 8 ) ; bytes [ offset + 1 ] = ( byte ) ( value >>> 16 ) ; bytes [ offset + 0 ] = ( byte ) ( value >>> 24 ) ; }
A utility method to convert an int into bytes in an array .
161,454
public static void shortToBytes ( short value , byte [ ] bytes , int offset ) { for ( int i = offset + 1 ; i >= offset ; -- i ) { bytes [ i ] = ( byte ) value ; value = ( short ) ( ( value ) >> 8 ) ; } }
A utility method to convert a short into bytes in an array .
161,455
public static void longToBytes ( long value , byte [ ] bytes , int offset ) { for ( int i = offset + 7 ; i >= offset ; -- i ) { bytes [ i ] = ( byte ) value ; value = value >> 8 ; } }
A utility method to convert the long into bytes in an array .
161,456
public static long varIntBytesToLong ( byte [ ] bytes , int offset ) { int shift = 0 ; long result = 0 ; while ( shift < 64 ) { final byte b = bytes [ offset ++ ] ; result |= ( long ) ( b & 0x7F ) << shift ; if ( ( b & 0x80 ) == 0 ) { return result ; } shift += 7 ; } throw new IllegalStateException ( "Varint representa...
Reads a long from the byte array in the Varint format .
161,457
public static int varIntBytesToInt ( byte [ ] bytes , int offset ) { byte tmp = bytes [ offset ++ ] ; if ( tmp >= 0 ) { return tmp ; } int result = tmp & 0x7f ; if ( ( tmp = bytes [ offset ++ ] ) >= 0 ) { result |= tmp << 7 ; } else { result |= ( tmp & 0x7f ) << 7 ; if ( ( tmp = bytes [ offset ++ ] ) >= 0 ) { result |=...
Reads an int from the byte array in the Varint format .
161,458
public static int writeLongAsVarIntBytes ( long v , byte [ ] bytes , int offest ) { int pos = offest ; while ( true ) { if ( ( v & ~ 0x7FL ) == 0 ) { bytes [ pos ++ ] = ( ( byte ) v ) ; return pos ; } else { bytes [ pos ++ ] = ( byte ) ( ( v & 0x7F ) | 0x80 ) ; v >>>= 7 ; } } }
Writes a long to the byte array in the Varint format .
161,459
public static int writeIntAsVarIntBytes ( int intVal , byte [ ] bytes , int offset ) { int pos = offset ; int v = intVal ; if ( ( v & ~ 0x7F ) == 0 ) { bytes [ pos ++ ] = ( ( byte ) v ) ; return 1 + offset ; } while ( true ) { if ( ( v & ~ 0x7F ) == 0 ) { bytes [ pos ++ ] = ( ( byte ) v ) ; return pos ; } else { bytes ...
Writes an integer to the byte array in the Varint format .
161,460
public static String limitedBytesToString ( byte [ ] bytes ) { if ( bytes . length <= 1000 ) { return Arrays . toString ( bytes ) ; } else { byte [ ] firstBytes = new byte [ 1000 ] ; System . arraycopy ( bytes , 0 , firstBytes , 0 , 1000 ) ; return Arrays . toString ( firstBytes ) ; } }
If the byte array length is less than 1000 returns the result of calling Arrays . toString on the supplied byte array . Otherwise returns the result of calling Arrays . toString on a byte array containing the first 1000 bytes in the supplied byte array .
161,461
public static RESTHandlerJsonException createRESTHandlerJsonException ( Throwable e , JSONConverter converter , int status ) { try { if ( converter == null ) { converter = JSONConverter . getConverter ( ) ; } ByteArrayOutputStream os = new ByteArrayOutputStream ( ) ; converter . writeThrowable ( os , e ) ; String excep...
This method will recycle the given converter .
161,462
public static synchronized void notifyStarted ( HttpEndpointImpl endpoint , String resolvedHostName , int port , boolean isHttps ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Notify endpoint started: " + endpoint , resolvedHostName , port , isHttps , defaultHost . g...
Add an endpoint that has started listening and notify associated virtual hosts
161,463
public static synchronized void notifyStopped ( HttpEndpointImpl endpoint , String resolvedHostName , int port , boolean isHttps ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Notify endpoint stopped: " + endpoint , resolvedHostName , port , isHttps , defaultHost . g...
Remove a port associated with an endpoint that has stopped listening and notify associated virtual hosts .
161,464
public void addWsByteBuffer ( WsByteBuffer buffer ) { if ( this . allWsByteBuffers == null ) { this . allWsByteBuffers = new Hashtable < WsByteBuffer , WsByteBuffer > ( ) ; } this . allWsByteBuffers . put ( buffer , buffer ) ; }
Add a related buffer to the stored list for this instance .
161,465
public void addOwner ( String owner ) { if ( this . owners == null ) { this . owners = new Hashtable < String , String > ( ) ; } this . owners . put ( owner , owner ) ; }
Add the following owner to the list for this buffer .
161,466
public String getInputUniqueUserId ( String inputVirtualRealm ) { String returnValue = getInputMapping ( inputVirtualRealm , Service . CONFIG_DO_UNIQUE_USER_ID_MAPPING , UNIQUE_USER_ID_DEFAULT ) ; return returnValue ; }
Get the input unique user ID mapping for the UserRegistry .
161,467
public String getOutputUniqueUserId ( String inputVirtualRealm ) { String returnValue = getOutputMapping ( inputVirtualRealm , Service . CONFIG_DO_UNIQUE_USER_ID_MAPPING , UNIQUE_USER_ID_DEFAULT ) ; return returnValue ; }
Get the output unique user ID mapping for the UserRegistry .
161,468
public String getInputUserSecurityName ( String inputVirtualRealm ) { String returnValue = getInputMapping ( inputVirtualRealm , Service . CONFIG_DO_USER_SECURITY_NAME_MAPPING , INPUT_USER_SECURITY_NAME_DEFAULT ) ; return returnValue ; }
Get the input user security name mapping for the UserRegistry .
161,469
public String getInputUserDisplayName ( String inputVirtualRealm ) { String returnValue = getInputMapping ( inputVirtualRealm , Service . CONFIG_DO_USER_DISPLAY_NAME_MAPPING , USER_DISPLAY_NAME_DEFAULT ) ; return returnValue ; }
Get the input user display name mapping for the UserRegistry .
161,470
public String getOutputUserDisplayName ( String inputVirtualRealm ) { String returnValue = getOutputMapping ( inputVirtualRealm , Service . CONFIG_DO_USER_DISPLAY_NAME_MAPPING , USER_DISPLAY_NAME_DEFAULT ) ; return returnValue ; }
Get the output user display name mapping for the UserRegistry .
161,471
public String getInputUniqueGroupId ( String inputVirtualRealm ) { String returnValue = getInputMapping ( inputVirtualRealm , Service . CONFIG_DO_UNIQUE_GROUP_ID_MAPPING , INPUT_UNIQUE_GROUP_ID_DEFAULT ) ; return returnValue ; }
Get the input unique group ID mapping for the UserRegistry .
161,472
public String getOutputUniqueGroupId ( String inputVirtualRealm ) { String returnValue = getOutputMapping ( inputVirtualRealm , Service . CONFIG_DO_UNIQUE_GROUP_ID_MAPPING , OUTPUT_UNIQUE_GROUP_ID_DEFAULT ) ; return returnValue ; }
Get the output unique group ID mapping for the UserRegistry .
161,473
public String getInputGroupSecurityName ( String inputVirtualRealm ) { String returnValue = getInputMapping ( inputVirtualRealm , Service . CONFIG_DO_GROUP_SECURITY_NAME_MAPPING , INPUT_GROUP_SECURITY_NAME_DEFAULT ) ; return returnValue ; }
Get the input group security name mapping for the UserRegistry .
161,474
public String getOutputGroupSecurityName ( String inputVirtualRealm ) { String returnValue = getOutputMapping ( inputVirtualRealm , Service . CONFIG_DO_GROUP_SECURITY_NAME_MAPPING , OUTPUT_GROUP_SECURITY_NAME_DEFAULT ) ; return returnValue ; }
Get the output group security name mapping for the UserRegistry .
161,475
public String getInputGroupDisplayName ( String inputVirtualRealm ) { String returnValue = getInputMapping ( inputVirtualRealm , Service . CONFIG_DO_GROUP_DISPLAY_NAME_MAPPING , GROUP_DISPLAY_NAME_DEFAULT ) ; return returnValue ; }
Get the input group display name mapping for the UserRegistry .
161,476
public String getOutputGroupDisplayName ( String inputVirtualRealm ) { String returnValue = getOutputMapping ( inputVirtualRealm , Service . CONFIG_DO_GROUP_DISPLAY_NAME_MAPPING , GROUP_DISPLAY_NAME_DEFAULT ) ; return returnValue ; }
Get the output group display name mapping for the UserRegistry .
161,477
@ FFDCIgnore ( Exception . class ) private String getInputMapping ( String inputVirtualRealm , String inputProperty , String inputDefaultProperty ) { String methodName = "getInputMapping" ; String returnValue = null ; RealmConfig realmConfig = mappingUtils . getCoreConfiguration ( ) . getRealmConfig ( inputVirtualRealm...
Get the WIM input property that maps to the UserRegistry input property .
161,478
private static Object _convertOrCoerceValue ( FacesContext facesContext , UIComponent uiComponent , Object value , SelectItem selectItem , Converter converter ) { Object itemValue = selectItem . getValue ( ) ; if ( converter != null && itemValue instanceof String ) { itemValue = converter . getAsObject ( facesContext ,...
If converter is available and selectItem . value is String uses getAsObject otherwise uses EL type coertion and return result .
161,479
public final static MessageType getMessageType ( Byte aValue ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Value = " + aValue ) ; return set [ aValue . intValue ( ) ] ; }
Returns the corresponding MessageType for a given Byte . This method should NOT be called by any code outside the MFP component . It is only public so that it can be accessed by sub - packages .
161,480
void balance ( int kFactor , NodeStack stack , GBSNode fpoint , int fpidx , int maxBal ) { GBSNode bparent = stack . node ( fpidx - 1 ) ; switch ( kFactor ) { case 2 : balance2 ( stack , bparent , fpoint , fpidx , maxBal ) ; break ; case 4 : balance4 ( stack , bparent , fpoint , fpidx , maxBal ) ; break ; case 6 : bala...
Balance a fringe following the addition of its final node .
161,481
private void balance2 ( NodeStack stack , GBSNode bparent , GBSNode fpoint , int fpidx , int maxBal ) { GBSNode a = fpoint ; GBSNode b = a . rightChild ( ) ; if ( bparent . rightChild ( ) == a ) bparent . setRightChild ( b ) ; else bparent . setLeftChild ( b ) ; b . setLeftChild ( a ) ; a . clearRightChild ( ) ; if ( (...
Balance a fringe with a K factor of two .
161,482
private void balance4 ( NodeStack stack , GBSNode bparent , GBSNode fpoint , int fpidx , int maxBal ) { if ( maxBal == 3 ) { GBSNode a = fpoint ; GBSNode b = a . rightChild ( ) ; if ( bparent . rightChild ( ) == a ) bparent . setRightChild ( b ) ; else bparent . setLeftChild ( b ) ; b . setLeftChild ( a ) ; a . clearRi...
Balance a fringe with a K factor of four .
161,483
private void balance6 ( NodeStack stack , GBSNode bparent , GBSNode fpoint , int fpidx , int maxBal ) { if ( maxBal == 5 ) { GBSNode a = fpoint ; GBSNode b = a . rightChild ( ) ; GBSNode c = b . rightChild ( ) ; if ( bparent . rightChild ( ) == a ) bparent . setRightChild ( c ) ; else bparent . setLeftChild ( c ) ; c ....
Balance a fringe with a K factor of six .
161,484
private void balance8 ( NodeStack stack , GBSNode bparent , GBSNode fpoint , int fpidx , int maxBal ) { if ( maxBal == 7 ) { GBSNode a = fpoint ; GBSNode b = a . rightChild ( ) ; GBSNode c = b . rightChild ( ) ; GBSNode d = c . rightChild ( ) ; GBSNode e = d . rightChild ( ) ; GBSNode f = e . rightChild ( ) ; d . setLe...
Balance a fringe with a K factor of eight .
161,485
@ Reference ( name = BASE_INSTANCE , service = ContextService . class , cardinality = ReferenceCardinality . OPTIONAL , policy = ReferencePolicy . DYNAMIC , policyOption = ReferencePolicyOption . GREEDY , target = "(id=unbound)" ) protected void setBaseInstance ( ServiceReference < ContextService > ref ) { lock . write...
Declarative Services method for setting the service reference to the base contextService instance .
161,486
@ Reference ( name = THREAD_CONTEXT_MANAGER , service = WSContextService . class , cardinality = ReferenceCardinality . MANDATORY , policy = ReferencePolicy . STATIC , target = "(component.name=com.ibm.ws.context.manager)" ) protected void setThreadContextManager ( WSContextService svc ) { threadContextMgr = ( ThreadCo...
Declarative Services method for setting the thread context manager .
161,487
protected void unsetBaseInstance ( ServiceReference < ContextService > ref ) { lock . writeLock ( ) . lock ( ) ; try { threadContextConfigurations = null ; } finally { lock . writeLock ( ) . unlock ( ) ; } }
Declarative Services method for unsetting the service reference to the base contextService instance .
161,488
public synchronized void complete ( ) { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINEST ) ) { logger . entering ( CLASS_NAME , "complete" , this ) ; } if ( ! lockHeldByDifferentThread ( ) ) { if ( ! completePending ) { if ( com . ibm . ws . webcontainer . os...
we re okay to sync on the scheduling of the complete
161,489
public synchronized void dispatch ( ServletContext context , String path ) throws IllegalStateException { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINEST ) ) { logger . entering ( CLASS_NAME , "dispatch(ctx,path)" , new Object [ ] { this , context , path } )...
we re okay to sync on the scheduling of the dispatch
161,490
public final void commit_one_phase ( ) throws XAException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "commit_one_phase" , _resource ) ; if ( tcSummary . isDebugEnabled ( ) ) Tr . debug ( tcSummary , "commit_one_phase" , this ) ; try { _resource . commit ( _xid , true ) ; _completedCommit = true ; _vote = JTARes...
Commit a transaction using one - phase optimization .
161,491
public final void rollback ( ) throws XAException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "rollback" , _resource ) ; if ( tcSummary . isDebugEnabled ( ) ) Tr . debug ( tcSummary , "rollback" , this ) ; try { _resource . rollback ( _xid ) ; _vote = JTAResourceVote . rollback ; } catch ( XAException xae ) { _c...
Rollback a transaction .
161,492
public final void forget ( ) throws XAException { if ( tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "forget" , _resource ) ; Tr . exit ( tc , "forget" ) ; } }
The resource manager can forget all knowledge of the transaction . Only allowed because commit_one_phase may return heuristic
161,493
private void verifyConfiguration ( ) throws DeploymentException { Map < URL , ModuleMetaData > mmds = getModuleMetaDataMap ( ) ; if ( mmds != null ) { for ( Map . Entry < URL , ModuleMetaData > entry : mmds . entrySet ( ) ) { ModuleMetaData mmd = entry . getValue ( ) ; if ( mmd instanceof WebModuleMetaData ) { String j...
make sure that there is one HAM for each modules and if there is a HAM in a module make sure there is no login configuration in web . xml .
161,494
private String getModuleFromClass ( Class < ? > klass , Map < String , ModuleProperties > moduleMap ) { String file = getClassFileLocation ( klass ) ; if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "File name : " + file ) ; } String moduleName = null ; for ( Map . Entry < String , ModuleProperties > entry : moduleM...
Identify the module name from the class . If the class exists in the jar file return war file name if it is located under the war file otherwise returning jar file name .
161,495
private Properties getGlobalLoginBasicProps ( ) throws Exception { String realm = getWebAppSecurityConfig ( ) . getBasicAuthRealmName ( ) ; Properties props = new Properties ( ) ; if ( realm == null ) { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "basicAuthenticationMechanismRealmName is not set. the default val...
Returns BasicAuth realm name for container override basic login
161,496
private Properties getGlobalLoginFormProps ( ) throws Exception { WebAppSecurityConfig webAppSecConfig = getWebAppSecurityConfig ( ) ; String loginURL = webAppSecConfig . getLoginFormURL ( ) ; String errorURL = webAppSecConfig . getLoginErrorURL ( ) ; if ( loginURL == null || loginURL . isEmpty ( ) ) { Tr . error ( tc ...
Returns LoginToContinue properties for container override form login
161,497
private void initialize ( Map < String , Object > metadata ) { if ( metadata == null ) { metadata = new HashMap < String , Object > ( ) ; } metadata . put ( REQUEST_ID , generateRequestID ( ) ) ; this . metadata = metadata ; }
Generates a new metadata Map if none is given . Generates and adds a request ID to the metadata .
161,498
public void addObserver ( Observer observer ) { super . addObserver ( observer ) ; if ( countObservers ( ) > 1 ) { super . deleteObserver ( observer ) ; AbstractConnectionFactoryService cfSvc = ( AbstractConnectionFactoryService ) observer ; Object [ ] params = new Object [ ] { CONNECTION_MANAGER , name , cfSvc . getCo...
Add an observer for this connection manager service .
161,499
public void destroyConnectionFactories ( ) { final boolean trace = TraceComponent . isAnyTracingEnabled ( ) ; if ( trace && tc . isEntryEnabled ( ) ) { final String pmName ; if ( pm != null ) pmName = pm . getUniqueId ( ) ; else pmName = "factory name not avaiable" ; Tr . entry ( this , tc , "destroyConnectionFactories...
Destroy all connection factories that are using this connection manager service .