idx
int64
0
41.2k
question
stringlengths
73
5.81k
target
stringlengths
5
918
24,700
public String getRemoteEngineUuid ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getRemoteEngineUuid" ) ; String remoteUUID = _aiStream . getAnycastInputHandler ( ) . getLocalisationUuid ( ) . toString ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . is...
Return the Messaging engine that this request has been generated against
24,701
private static long getIPAddress ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getIPAddress" ) ; int lower32Bits = 0 ; try { final byte [ ] address = AccessController . doPrivileged ( new PrivilegedExceptionAction < byte [ ] > ( ) { public byte [ ] run ( ) throws UnknownHostException { return java . net . Ine...
return value when the IP address is 9 . 20 . 217 . 12
24,702
public boolean isMandatory ( String propName ) { if ( mandatoryProperties == null ) { setMandatoryPropertyNames ( ) ; } if ( mandatoryProperties . contains ( propName ) ) { return true ; } else { return false ; } }
Returns true if the provided property is a mandatory property ; false otherwise .
24,703
public boolean isPersistentProperty ( String propName ) { if ( transientProperties == null ) { setTransientPropertyNames ( ) ; } if ( transientProperties . contains ( propName ) ) { return false ; } else { return true ; } }
Returns true if the provided property is a persistent property ; false otherwise .
24,704
public static Class < ? > loadClass ( String name , ClassLoader callerClassLoader ) throws ClassNotFoundException { Class < ? > clazz = null ; try { ClassLoader loader = getContextClassLoader ( ) ; if ( loader != null ) { clazz = loader . loadClass ( name ) ; } } catch ( ClassNotFoundException e ) { } if ( clazz == nul...
Loads the class with the specified name . For Java 2 callers the current thread s context class loader is preferred falling back on the class loader of the caller when the current thread s context is not set or the caller is pre Java 2 . If the callerClassLoader is null then fall back on the system class loader .
24,705
public static URL getResource ( String name , ClassLoader callerClassLoader ) { _checkResourceName ( name ) ; URL url = null ; ClassLoader loader = getContextClassLoader ( ) ; if ( loader != null ) { url = loader . getResource ( name ) ; } if ( url == null ) { if ( callerClassLoader != null ) { url = callerClassLoader ...
Locates the resource with the specified name . For Java 2 callers the current thread s context class loader is preferred falling back on the class loader of the caller when the current thread s context is not set or the caller is pre Java 2 . If the callerClassLoader is null then fall back on the system class loader .
24,706
public static InputStream getResourceAsStream ( String name , ClassLoader callerClassLoader ) { _checkResourceName ( name ) ; InputStream stream = null ; ClassLoader loader = getContextClassLoader ( ) ; if ( loader != null ) { stream = loader . getResourceAsStream ( name ) ; } if ( stream == null ) { if ( callerClassLo...
Locates the resource stream with the specified name . For Java 2 callers the current thread s context class loader is preferred falling back on the class loader of the caller when the current thread s context is not set or the caller is pre Java 2 . If the callerClassLoader is null then fall back on the system class lo...
24,707
public Serializer writeNumber ( Number value ) throws IOException { if ( null == value ) return writeNull ( ) ; if ( value instanceof Float ) { if ( ( ( Float ) value ) . isNaN ( ) ) return writeNull ( ) ; if ( Float . NEGATIVE_INFINITY == value . floatValue ( ) ) return writeNull ( ) ; if ( Float . POSITIVE_INFINITY =...
Method to write a number to the current writer .
24,708
public Serializer writeBoolean ( Boolean value ) throws IOException { if ( null == value ) return writeNull ( ) ; writeRawString ( value . toString ( ) ) ; return this ; }
Method to write a boolean value to the output stream .
24,709
private String rightAlignedZero ( String s , int len ) { if ( len == s . length ( ) ) return s ; StringBuffer sb = new StringBuffer ( s ) ; while ( sb . length ( ) < len ) { sb . insert ( 0 , '0' ) ; } return sb . toString ( ) ; }
Method to generate a string with a particular width . Alignment is done using zeroes if it does not meet the width requirements .
24,710
public Serializer writeString ( String value ) throws IOException { if ( null == value ) return writeNull ( ) ; writer . write ( '"' ) ; char [ ] chars = value . toCharArray ( ) ; for ( int i = 0 ; i < chars . length ; i ++ ) { char c = chars [ i ] ; switch ( c ) { case '"' : writer . write ( "\\\"" ) ; break ; case '\...
Method to write a String out to the writer encoding special characters and unicode characters properly .
24,711
private Serializer write ( Object object ) throws IOException { if ( null == object ) return writeNull ( ) ; if ( object instanceof Number ) return writeNumber ( ( Number ) object ) ; if ( object instanceof String ) return writeString ( ( String ) object ) ; if ( object instanceof Boolean ) return writeBoolean ( ( Bool...
Method to write out a generic JSON type .
24,712
public Serializer writeObject ( JSONObject object ) throws IOException { if ( null == object ) return writeNull ( ) ; writeRawString ( "{" ) ; indentPush ( ) ; Iterator iter = null ; if ( object instanceof OrderedJSONObject ) { iter = ( ( OrderedJSONObject ) object ) . getOrder ( ) ; } else { List propertyNames = getPr...
Method to write a complete JSON object to the stream .
24,713
public Serializer writeArray ( JSONArray value ) throws IOException { if ( null == value ) return writeNull ( ) ; writeRawString ( "[" ) ; indentPush ( ) ; for ( Iterator iter = value . iterator ( ) ; iter . hasNext ( ) ; ) { Object element = iter . next ( ) ; if ( ! JSONObject . isValidObject ( element ) ) throw new I...
Method to write a JSON array out to the stream .
24,714
public void getUsersForGroup ( List < String > grpMbrAttrs , int countLimit ) throws WIMException { String securityName = null ; try { securityName = getSecurityName ( false ) ; List < String > returnNames = urBridge . getUsersForGroup ( securityName , countLimit ) . getList ( ) ; for ( int j = 0 ; j < returnNames . si...
Get the groups for the user and add the specified attributes to each of the groups .
24,715
public static long random ( final long randomStart ) { long randomValue = randomStart ; randomValue ^= ( randomValue << 21 ) ; randomValue ^= ( randomValue >>> 35 ) ; randomValue ^= ( randomValue << 4 ) ; return randomValue ; }
Calculate a random value based on the given start Value .
24,716
public JsPermittedChainUsage fromString ( String name ) { JsPermittedChainUsage result = null ; for ( int i = 0 ; i < _set . length && result == null ; i ++ ) { if ( name . equals ( _set [ i ] . toString ( ) ) ) result = _set [ i ] ; } return result ; }
This method converts a string into an instance of the enum . If the string is not valid for this enum then null is returned .
24,717
public OSGiInjectionScopeData getInjectionScopeData ( ComponentMetaData cmd , NamingConstants . JavaColonNamespace namespace ) { if ( cmd == null ) { return null ; } if ( namespace == NamingConstants . JavaColonNamespace . GLOBAL ) { return globalScopeData ; } if ( namespace == NamingConstants . JavaColonNamespace . CO...
Gets the injection scope data for a namespace .
24,718
private void processApplicationReferences ( EARApplicationInfo appInfo , Application app ) throws StateChangeException { Map < JNDIEnvironmentRefType , List < ? extends JNDIEnvironmentRef > > allRefs = new EnumMap < JNDIEnvironmentRefType , List < ? extends JNDIEnvironmentRef > > ( JNDIEnvironmentRefType . class ) ; bo...
Process references declared in application . xml .
24,719
boolean isTransactionRolledBack ( ) { final String methodName = "isTransactionRolledBack" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName ) ; } boolean isRolledBack = true ; Boolean rolledBack = null ; if ( _lastXidUsed != null ) { synchronized...
Checks if the transaction was rolled back or not . If for some reason we could not obtain the transaction state then we return true indicating a rollback .
24,720
public static void rcvXAOpen ( CommsByteBuffer request , Conversation conversation , int requestNumber , boolean allocatedFromBufferPool , boolean partOfExchange ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "rcvXAOpen" , new Object [ ] { request , conversation , ""...
Gets the XAResource from the SICoreConnection and stores it in the object store .
24,721
private synchronized void recordElapsedTime ( ) { if ( startTime == 0 ) return ; long current = System . nanoTime ( ) ; timeWaited += Math . abs ( current - startTime ) ; startTime = current ; }
Record the elapsed time and continue timing from now .
24,722
private void waitForEventOrTimeout ( ) throws InterruptedException { long remainingWait = timeout - timeWaited ; long millisToWait = remainingWait / 1000000 ; int nanosToWait = ( int ) ( remainingWait % 1000000 ) ; wait ( millisToWait , nanosToWait ) ; }
Wait for a notification or a timeout - may wake spuriously .
24,723
public static String toHexString ( byte [ ] byteSource , int bytes ) { StringBuffer result = null ; boolean truncated = false ; if ( byteSource != null ) { if ( bytes > byteSource . length ) { bytes = byteSource . length ; } else if ( bytes < byteSource . length ) { truncated = true ; } result = new StringBuffer ( byte...
Converts a byte array into a printable hex string .
24,724
private String getObjectInfoFromRealObject ( ) throws IOException , ClassNotFoundException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getObjectInfoFromRealObject" ) ; final Serializable obj = objMsg . getRealObject ( ) ; final String oscDesc = ( obj == null...
Gets a description of the class for the object payload from the real object .
24,725
private String getObjectInfoFromSerializedObject ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getObjectInfoFromSerializedObject" ) ; String oscDesc ; byte [ ] data = new byte [ 0 ] ; try { data = objMsg . getSerializedObject ( ) ; oscDesc = SerializedObje...
Gets a description of the class for the object payload from the serialized data .
24,726
public byte [ ] createUniqueId ( ) throws SIConnectionDroppedException , SIConnectionUnavailableException , SIConnectionLostException , SIResourceException , SIErrorException { checkValid ( ) ; return _delegateConnection . createUniqueId ( ) ; }
Creates a unique identifier . Checks that the connection is valid and then delegates .
24,727
public SIDestinationAddress createTemporaryDestination ( final Distribution distribution , final String destinationPrefix ) throws SIConnectionDroppedException , SIConnectionUnavailableException , SIConnectionLostException , SILimitExceededException , SINotAuthorizedException , SIInvalidDestinationPrefixException , SIR...
Creates a temporary destination . Checks that the connection is valid and then delegates .
24,728
public Serializable invokeCommand ( String key , String commandName , Serializable commandData ) throws SIConnectionDroppedException , SIConnectionUnavailableException , SINotAuthorizedException , SIResourceException , SIIncorrectCallException , SICommandInvocationFailedException { return _delegateConnection . invokeCo...
Calls invokeCommand on the delegate connection .
24,729
public void close ( ) throws SIConnectionLostException , SIResourceException , SIErrorException , SIConnectionDroppedException , SIConnectionUnavailableException { try { _delegateConnection . close ( ) ; } finally { if ( _managedConnection != null ) { _managedConnection . connectionClosed ( this ) ; } } }
Closes this connection . Delegates and then informs the current managed connection .
24,730
public void send ( final SIBusMessage msg , final SITransaction tran , final SIDestinationAddress destAddr , final DestinationType destType , final OrderingContext orderingContext , final String alternateUser ) throws SIConnectionDroppedException , SIConnectionUnavailableException , SIConnectionLostException , SILimitE...
Sends a message . Checks that the connection is valid . Maps the transaction parameter before delegating .
24,731
public void addConnectionListener ( SICoreConnectionListener listener ) throws SIConnectionDroppedException , SIConnectionUnavailableException { checkValid ( ) ; _delegateConnection . addConnectionListener ( listener ) ; }
Adds a connection listener . Checks that the connection is valid and then delegates .
24,732
public void sendToExceptionDestination ( SIDestinationAddress address , SIBusMessage message , int reason , String [ ] inserts , SITransaction tran , final String alternateUser ) throws SIConnectionDroppedException , SIConnectionUnavailableException , SIConnectionLostException , SILimitExceededException , SINotAuthoriz...
Check the connection is valid then delegates .
24,733
public DestinationConfiguration getDestinationConfiguration ( final SIDestinationAddress destinationAddress ) throws SIConnectionDroppedException , SIConnectionUnavailableException , SIConnectionLostException , SINotAuthorizedException , SITemporaryDestinationNotFoundException , SIResourceException , SIErrorException ,...
Returns the configuration for the given destination . Checks that the connection is valid and then delegates .
24,734
public SIBusMessage receiveNoWait ( final SITransaction tran , final Reliability unrecoverableReliability , final SIDestinationAddress destinationAddress , final DestinationType destType , final SelectionCriteria criteria , final Reliability reliability , final String alternateUser ) throws SIConnectionDroppedException...
Receives a message . Checks that the connection is valid . Maps the transaction parameter before delegating .
24,735
public String getResolvedUserid ( ) throws SIConnectionDroppedException , SIConnectionUnavailableException , SIConnectionLostException , SIResourceException , SIErrorException { checkValid ( ) ; return _delegateConnection . getResolvedUserid ( ) ; }
Returns the userid associated with this connection . Checks that the connection is valid and then delegates .
24,736
public SIDestinationAddress checkMessagingRequired ( SIDestinationAddress requestDestAddr , SIDestinationAddress replyDestAddr , DestinationType destinationType , String alternateUser ) throws SIConnectionDroppedException , SIConnectionUnavailableException , SIIncorrectCallException , SITemporaryDestinationNotFoundExce...
Performs the following checks to see if a messaging operation can be avoided by the calling application
24,737
public BifurcatedConsumerSession createBifurcatedConsumerSession ( final long id ) throws SISessionDroppedException , SIConnectionDroppedException , SISessionUnavailableException , SIConnectionUnavailableException , SIConnectionLostException , SILimitExceededException , SINotAuthorizedException , SIResourceException , ...
This method is used to create a BifurcatedConsumerSession object which is an additional session representing an existing consumer . Checks that the connection is valid and then delegates .
24,738
private SibRaManagedConnection getAssociatedManagedConnection ( ) throws SIResourceException { try { if ( _managedConnection == null ) { final ConnectionManager connectionManager = _connectionFactory . getConnectionManager ( ) ; if ( connectionManager instanceof LazyAssociatableConnectionManager ) { ( ( LazyAssociatabl...
Returns the managed connection associated with this connection . If the connection is not currently associated then calls the connection manager to be re - associated .
24,739
private SITransaction getContainerTransaction ( ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , "getContainerTransaction" ) ; } final SITransaction containerTransaction ; try { final SibRaManagedConnection managedConnection = ...
Returns the current container transaction if any .
24,740
void setConnectionFactory ( final SibRaConnectionFactory connectionFactory ) { if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , "setConnectionFactory" , connectionFactory ) ; } _connectionFactory = connectionFactory ; if ( TraceComponent . isAnyTracingEnable...
Sets the parent connection factory . Called by the connection factory prior to returning the connection to the caller . The connection factory is needed in order to obtain the connection manager and managed connection factory in order to perform lazy enlistment and re - association .
24,741
public void setCustomProperties ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setCustomProperties" , this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "setCustomProperties" ) ; }
Set a custom property for the bus
24,742
public void setCustomProperty ( String name , String value ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setCustomProperty" , name + " " + value ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "setCustomProperty" )...
Set an individual custom property for the bus
24,743
public String getCustomProperty ( String name ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getCustomProperty" , name ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getCustomProperty" , "value" ) ; return null ; ...
This method returns a custom property that was configured for the bus .
24,744
public Boolean isEventNotificationPropertySet ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "isEventNotificationPropertySet" , this ) ; Boolean enabled = null ; if ( customProperties . containsKey ( JsConstants . SIB_EVENT_NOTIFICATION_KEY ) ) { String value = cus...
Test whether Event Notification is enabled for the bus .
24,745
private void loadAuditAllowed ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "loadAuditAllowed" , this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "loadAuditAllowed" ) ; }
Loads the audit document for this bus
24,746
public synchronized void generatePluginConfig ( String root , String serverName , boolean utilityRequest , File writeDirectory ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "generatePluginConfig" , "server is stopping = " + serverIsStopping ) ; } try { generateInProg...
Subcommand for creating the plugin - cfg . xml file at runtime using the user provided Plugin install root and Plugin server name .
24,747
public boolean isErrorPagePresent ( ExternalContext externalContext ) { IServletContext context = ( IServletContext ) externalContext . getContext ( ) ; WebAppConfig webAppConfig = context . getWebAppConfig ( ) ; return webAppConfig . isErrorPagePresent ( ) ; }
check if the web config defined the error pages
24,748
public final boolean removeDeliveryDelayable ( DeliveryDelayable deliveryDelayable ) throws SevereMessageStoreException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "removeDeliveryDelayable" , "objId=" + ( deliveryDelayable == null ? "null" : String . valueOf ( del...
Remove an DeliveryDelayable reference for an item from the deliveryDelay index .
24,749
public final void start ( long deliveryDelayScanInterval , JsMessagingEngine jsme ) throws SevereMessageStoreException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "start" , "interval=" + deliveryDelayScanInterval + " indexSize=" + deliveryDelayIndex . size ( ...
Start the DeliveryDelayManager daemon .
24,750
private void scanForInvalidDeliveryDelay ( ) throws SevereMessageStoreException { final String methodName = "scanForInvalidDeliveryDelay" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , methodName ) ; String str = messageStore . getProperty ( MessageStoreConstant...
Scan the delivery delay intervals loaded at startup to determine if any may have been migrated incorrectly .
24,751
public final void stop ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "stop" ) ; synchronized ( lockObject ) { addEnabled = false ; if ( runEnabled ) { runEnabled = false ; deliveryDelayManagerStopTime = timeNow ( ) ; } if ( deliveryDelayAlarm != null ) { de...
Stop the DeliveryDelayManager daemon .
24,752
private final boolean remove ( DeliveryDelayableReference deliveryDelayableReference , boolean unlocked ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "remove" , " deliveryDelayableReference=" + deliveryDelayableReference + " unlocked=" + unlocked + " delivery...
Remove the DeliveryDelayable reference from the DeliveryDelay index . This will remove the current entry pointed - to by the iterator .
24,753
@ SuppressWarnings ( "unchecked" ) protected void addArrayValue ( AnnotationValueImpl annotationValue ) { ( ( List < AnnotationValueImpl > ) getArrayValue ( ) ) . add ( annotationValue ) ; this . stringValue = null ; }
case of visitor calls to process array element values .
24,754
public static UserRegistry getUserRegistry ( String realmName ) throws WSSecurityException { try { WSSecurityService ss = wsSecurityServiceRef . getService ( ) ; if ( ss == null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "No WSSecurityService, returning null" ) ; ...
Gets the UserRegistry object for the given realm . If the realm name is null returns the active registry . If the realm is not valid or security is not enabled or no registry is configured returns null .
24,755
public static boolean isRealmInboundTrusted ( String inboundRealm , String localRealm ) { WSSecurityService ss = wsSecurityServiceRef . getService ( ) ; if ( ss == null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "No WSSecurityService, returning true" ) ; } return ...
Determine if the inbound realm is one of the trusted realms of the specified local realm . If the local realm is null the realm of the current active user registry will be used .
24,756
final public SelectionKey getKey ( SocketChannel channel ) { if ( null == channel ) { return null ; } return channel . keyFor ( this . selector ) ; }
Access the possible SelectionKey on this selector for the provided channel .
24,757
protected Queue < Object > getWorkQueue ( ) { synchronized ( this . queueLock ) { Queue < Object > tmp = this . workQueue1 ; this . workQueue1 = this . workQueue2 ; this . workQueue2 = tmp ; return tmp ; } }
Access the current work queue of pending updates for the selector . This will cause further updates to go onto another queue until this method is called again .
24,758
protected void resetTimeout ( long newTimeoutTime ) { if ( newTimeoutTime < this . nextTimeoutTime ) { this . nextTimeoutTime = newTimeoutTime ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( this , tc , "resetTimeout waking up selector" ) ; } wakeup ( ) ; } }
Set the next timeout marker to the provided value if appropriate .
24,759
protected < T > T instantiateClass ( Class < T > clazz ) throws Throwable { ManagedObject < T > mo = null ; if ( releasableFactory != null ) { mo = releasableFactory . createValidationReleasable ( clazz ) ; } if ( mo != null ) { if ( releasables == null ) { releasables = new LinkedList < ValidationReleasable < ? > > ( ...
Override the base implementation so that when a class is instantiated it is done so as a CDI managed bean .
24,760
public ConstraintValidatorFactory getConstraintValidatorFactoryOverride ( Configuration < ? > config ) { ValidationReleasable < ConstraintValidatorFactory > releasable = null ; String cvfClassName = config . getBootstrapConfiguration ( ) . getConstraintValidatorFactoryClassName ( ) ; if ( cvfClassName == null && releas...
Get the default WebSphere ConstraintValidatorFactory as a managed object .
24,761
static ContentMatcher createMatcher ( OrdinalPosition lastOrdinalPosition , Conjunction selector , ContentMatcher oldMatcher ) { if ( tc . isEntryEnabled ( ) ) tc . entry ( cclass , "createMatcher" , "lastOrdinalPosition: " + lastOrdinalPosition + ",selector: " + selector + ", oldmatcher: " + oldMatcher ) ; if ( oldMat...
Create a new ContentMatcher given the ordinal position of the parent and the child Matcher that currently occupies the place in which the new ContentMatcher will be placed . Sometimes no new ContentMatcher is created because the old child Matcher is either usable as is or needs to have the new ContentMatcher created be...
24,762
private static ContentMatcher createMatcher ( SimpleTest test , ContentMatcher oldMatcher ) { if ( tc . isEntryEnabled ( ) ) tc . entry ( cclass , "createMatcher" , "test: " + test + ", oldmatcher: " + oldMatcher ) ; Identifier id = test . getIdentifier ( ) ; boolean isExtended = ( test instanceof ExtendedSimpleTestImp...
Subroutine to determine the kind of Matcher to create and create it .
24,763
private void inject ( Object obj , final Object instance , HashMap < Class < ? > , InjectionTarget [ ] > cookies ) throws InjectionException { if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "inject" , "obj + obj + "]" ) ; if ( cookies . size ( ) == 0 ) { if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "inject" , "n...
instance is considered as the first injection target but may be null in which case injection is done on obj .
24,764
public void setRoleMap ( String roleName , List < String > mList , boolean omission ) { if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "Setting rolemap with omission" ) ; setMethodsAttribute ( mList , omission , ROLE , roleName ) ; if ( omission ) { unchkResourceForOmissionList = updateList ( unchkResourceForOmission...
if omission is true put the item to omission list .
24,765
public Map < String , String > getRoleMap ( ) { if ( mapAllMethods != null ) { return getRoleMapFromAllMap ( ) ; } Map < String , List < String > > outputRTMNormal = null ; Map < String , List < String > > outputRTMOmission = null ; if ( mapMethod != null ) { outputRTMNormal = getRoleToMethodMap ( getMethod ( mapMethod...
In here null is used to represent all methods .
24,766
private String convertMethod ( List < String > methodList , boolean negative ) { boolean first = true ; StringBuffer methodSB = new StringBuffer ( ) ; for ( String method : methodList ) { if ( first ) { first = false ; if ( negative ) { methodSB . append ( "!" ) ; } } else { methodSB . append ( "," ) ; } methodSB . app...
convert array of method to string
24,767
public Map < String , MethodConstraint > getRoleMap ( int table ) { if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "Getting role methods map" ) ; return getMethodSet ( table , ROLE_NO_CHECK ) ; }
returns entries which has a role
24,768
public Map < String , MethodConstraint > getUserDataMap ( int table ) { if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "Getting user data map of which attribute is either confidential or integral" ) ; return getMethodSet ( table , UD_CONFIDENTIAL_OR_INTEGRAL_NO_EX_CHECK ) ; }
to get entries with user data constraint is set as NONE use getUserDataMapNone method
24,769
public RepositoryResourceImpl createResourceFromAsset ( Asset ass , RepositoryConnection connection ) throws RepositoryBackendException { RepositoryResourceImpl result ; if ( null == ass . getWlpInformation ( ) || ass . getType ( ) == null ) { result = new RepositoryResourceImpl ( connection , ass ) { } ; } else { resu...
Creates a resources from the supplied asset
24,770
private void updateTime ( long tolerance ) { long now = System . currentTimeMillis ( ) ; if ( now == this . lastTimeCheck ) { return ; } if ( 0L != tolerance ) { long range = ( - 1 == tolerance ) ? DEFAULT_TOLERANCE : tolerance ; if ( ( now - this . lastTimeCheck ) <= range ) { return ; } } this . myDate . setTime ( no...
Utility method to determine whether to use the cached time value or update to a newly formatted timestamp .
24,771
public static String getFormattedMessageFromLocalizedMessage ( String traceString , Object [ ] newParms , boolean b ) { String retVal = "" ; try { retVal = MessageFormat . format ( traceString , newParms ) ; if ( null == retVal && b ) { retVal = traceString ; } } catch ( IllegalArgumentException e ) { retVal = traceStr...
Retrieve a string from the bundle and format it using the parameters
24,772
public String getFormattedMessage ( String messageKey , Object [ ] param , String defaultKey ) { String key = getString ( messageKey ) ; String retVal = MessageFormat . format ( key , param ) ; return retVal ; }
Retrieve a message and format it with the parameters
24,773
public String getString ( String messageKey ) { String retVal = messageKey ; ResourceBundle rb = getResourceBundle ( ) ; if ( null != rb ) { try { String tmpRetVal = rb . getString ( messageKey ) ; if ( null != tmpRetVal ) { retVal = tmpRetVal ; } } catch ( MissingResourceException e ) { } } return retVal ; }
Retrieve a message key from the resource bundle
24,774
private ResourceBundle getResourceBundle ( ) { ResourceBundle rb = null ; if ( null != ivBundleName && ! "" . equals ( ivBundleName . trim ( ) ) ) { ClassLoader classLoader = null ; try { classLoader = AccessController . doPrivileged ( new PrivilegedExceptionAction < ClassLoader > ( ) { public ClassLoader run ( ) throw...
Private message to locate resource bundle
24,775
private ResourceBundle locateBundleFromCallee ( ) { ResourceBundle rb = null ; if ( finder == null ) { finder = StackFinder . getInstance ( ) ; } final Class < ? > aClass = finder . getCaller ( ) ; if ( aClass != null ) { ClassLoader classLoader = null ; try { classLoader = AccessController . doPrivileged ( new Privile...
Call the stack finder to get the callee of the logging api then use the classloader from class to retrieve resource bundle
24,776
private boolean synchronizedRequestPermissionToExecute ( ) { boolean result = false ; synchronized ( this ) { switch ( state . get ( ) ) { case CLOSED : result = true ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Allowing execution in closed state" ) ; } break ; case ...
Implements the logic for requestPermissionToExecute for the cases where synchronization is required
24,777
private void synchronizedRecordResult ( CircuitBreakerResult result ) { synchronized ( this ) { switch ( state . get ( ) ) { case CLOSED : rollingWindow . record ( result ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Recording result {0} in closed state: {1}" , resu...
Implements the logic for recordResult for the cases where synchronization is required
24,778
private void stateClosed ( ) { rollingWindow . clear ( ) ; state . set ( State . CLOSED ) ; metricRecorder . reportCircuitClosed ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Transitioned to Closed state" ) ; } }
Transition to closed state
24,779
private void stateHalfOpen ( ) { halfOpenRunningExecutions = 0 ; halfOpenSuccessfulExecutions = 0 ; state . set ( State . HALF_OPEN ) ; metricRecorder . reportCircuitHalfOpen ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Transitioned to Half Open state" ) ; } }
Transition to half open state
24,780
private void stateOpen ( ) { openStateStartTime = System . nanoTime ( ) ; state . set ( State . OPEN ) ; metricRecorder . reportCircuitOpen ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Transitioned to Open state" ) ; } }
Transition to open state
24,781
public static com . ibm . websphere . cache . Cache getCache ( ) { if ( isServletCachingEnabled ( ) ) return ( com . ibm . websphere . cache . Cache ) ServerCache . cache ; else return null ; }
This obtains a reference to the dynamic cache .
24,782
public static DistributedMap getDistributedMap ( ) { final String methodName = "getDistributedMap()" ; if ( tc . isEntryEnabled ( ) ) { Tr . entry ( tc , methodName ) ; } DistributedMap distributedMap = null ; Context context = null ; if ( isObjectCachingEnabled ( ) ) { try { context = new InitialContext ( ) ; distribu...
This method will return a DistributedMap reference to the dynamic cache .
24,783
public Object eval ( Selector sel , MatchSpaceKey msg , EvalCache cache , Object contextValue , boolean permissive ) throws BadMessageFormatMatchingException { if ( sel . getType ( ) == Selector . INVALID ) throw new IllegalArgumentException ( ) ; Object ans ; if ( sel . getUniqueId ( ) != 0 && ! sel . isExtended ( ) )...
Evaluates a selector tree
24,784
public static Number castToNumber ( Object val ) { if ( tc . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . entry ( cclass , "castToNumber" , val ) ; if ( ! ( val instanceof String ) ) { if ( tc . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . exit ( cclass , "castToNumber" , null ) ; return null ...
be so cast .
24,785
private static Boolean castToBoolean ( Object val ) { if ( tc . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . entry ( cclass , "castToBoolean" , val ) ; Boolean theReturn = null ; if ( val instanceof String ) { String stringVal = ( String ) val ; if ( stringVal . equalsIgnoreCase ( "true" ) ) theReturn = Bo...
Cast an Object which is not null and not an instance of BooleanValue to BooleanValue if possible under the permissive rules BooleanValue . NULL otherwise . In fact only a String can be so cast .
24,786
protected String getStringFromNode ( Object inNode ) { if ( tc . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . entry ( cclass , "getStringFromNode" , inNode ) ; String strValue = null ; if ( tc . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . exit ( cclass , "getStringFromNode" , strValue ) ; ret...
Get the String value of a node .
24,787
public Object getDocumentRoot ( MatchSpaceKey msg ) throws BadMessageFormatMatchingException { if ( tc . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . entry ( cclass , "getDocumentRoot" , msg ) ; Object docRoot = null ; if ( tc . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . exit ( cclass , "get...
Get a DOM document root from a message .
24,788
protected Boolean compareList ( ArrayList firstList , Object val1 , boolean lessThan , boolean permissive , boolean overallTrue ) { if ( tc . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . entry ( cclass , "compareList" , new Object [ ] { firstList , val1 , new Boolean ( lessThan ) , new Boolean ( permissive...
An implementation of this method is provided in the derived XPath class . In the parent class it merely returns null .
24,789
private static Object promoteAndEvaluate ( int op , Object val0 , Object val1 , boolean permissive ) { if ( tc . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . entry ( cclass , "promoteAndEvaluate" , new Object [ ] { new Integer ( op ) , val0 , val1 , new Boolean ( permissive ) } ) ; Object theReturn = null ...
Evaluate a binary numeric operator with numeric result
24,790
public static int ttIndex ( Boolean bVal ) { int idx = 2 ; if ( bVal != null ) { if ( bVal . booleanValue ( ) ) { idx = 0 ; } else if ( ! bVal . booleanValue ( ) ) { idx = 1 ; } } return idx ; }
Get Truth Table index
24,791
public static Boolean and ( Boolean a , Boolean b ) { return andTable [ ttIndex ( a ) ] [ ttIndex ( b ) ] ; }
Perform logical and between BooleanValue instances
24,792
public static Boolean or ( Boolean a , Boolean b ) { return orTable [ ttIndex ( a ) ] [ ttIndex ( b ) ] ; }
Perform logical or between BooleanValue instances
24,793
public static Boolean not ( Boolean bVal ) { if ( bVal == null ) return null ; else if ( bVal . equals ( Boolean . TRUE ) ) return Boolean . FALSE ; else if ( bVal . equals ( Boolean . FALSE ) ) return Boolean . TRUE ; else return null ; }
Perform logical not on a Boolean instance
24,794
public static int compare ( Number a , Number b ) { int aType = getType ( a ) ; int bType = getType ( b ) ; int compType = ( aType >= bType ) ? aType : bType ; switch ( compType ) { case INT : int li = a . intValue ( ) ; int ri = b . intValue ( ) ; return ( li < ri ) ? - 1 : ( li == ri ) ? 0 : 1 ; case LONG : long ll =...
Implement Number compare
24,795
public static int getType ( Number val ) { if ( val instanceof Integer ) { return INT ; } else if ( val instanceof Long ) { return LONG ; } else if ( val instanceof Short ) { return SHORT ; } else if ( val instanceof Byte ) { return BYTE ; } else if ( val instanceof Double ) { return DOUBLE ; } else if ( val instanceof...
Make a NumericValue from a standard wrapper subclass of Number
24,796
private static Number neg ( Number n ) { switch ( getType ( n ) ) { case INT : return new Integer ( - n . intValue ( ) ) ; case LONG : return new Long ( - n . longValue ( ) ) ; case FLOAT : return new Float ( - n . floatValue ( ) ) ; case DOUBLE : return new Double ( - n . doubleValue ( ) ) ; default : throw new Illega...
Negate the value
24,797
private static Number times ( Number a , Number b ) { int aType = getType ( a ) ; int bType = getType ( b ) ; int compType = ( aType >= bType ) ? aType : bType ; switch ( compType ) { case INT : return new Integer ( a . intValue ( ) * b . intValue ( ) ) ; case LONG : return new Long ( a . longValue ( ) * b . longValue ...
Multiply two values
24,798
protected static String getResourceNameFromDescription ( String desc ) { Type type = Type . getType ( desc ) ; String className = type . getClassName ( ) ; String resourceName = className . replace ( "." , "/" ) ; return resourceName ; }
That call should be inlined .
24,799
protected boolean i_recordScannedClassName ( String i_className ) { boolean didPlaceClass = annotationTargets . i_placeClass ( i_getClassSourceName ( ) , i_className ) ; if ( ! didPlaceClass ) { return false ; } boolean didAddClass = annotationTargets . i_addScannedClassName ( i_className , getScanPolicy ( ) ) ; return...
Main record methods ...