idx
int64
0
165k
question
stringlengths
73
5.81k
target
stringlengths
5
918
160,700
@ FFDCIgnore ( Exception . class ) final void shutdownFramework ( ) { Tr . audit ( tc , "httpChain.error.shutdown" , name ) ; try { Bundle bundle = bundleContext . getBundle ( Constants . SYSTEM_BUNDLE_LOCATION ) ; if ( bundle != null ) bundle . stop ( ) ; } catch ( Exception e ) { } }
When an error occurs during startup and the config variable fail . on . error . enabled is true then this method is used to stop the root bundle thus bringing down the OSGi framework .
160,701
@ Reference ( name = "sslOptions" , service = ChannelConfiguration . class , policy = ReferencePolicy . DYNAMIC , policyOption = ReferencePolicyOption . GREEDY , cardinality = ReferenceCardinality . OPTIONAL ) protected void setSslOptions ( ServiceReference < ChannelConfiguration > service ) { if ( TraceComponent . isA...
The specific sslOptions is selected by a filter set through metatype that matches a specific user - configured option set or falls back to a default .
160,702
@ Reference ( name = "remoteIp" , service = ChannelConfiguration . class , policy = ReferencePolicy . DYNAMIC , policyOption = ReferencePolicyOption . GREEDY , cardinality = ReferenceCardinality . MANDATORY ) protected void setRemoteIp ( ChannelConfiguration config ) { if ( TraceComponent . isAnyTracingEnabled ( ) && t...
The specific remoteIpOptions is selected by a filter set through metatype that matches a specific user - configured option set or falls back to a default .
160,703
@ Reference ( name = "executorService" , service = ExecutorService . class , policy = ReferencePolicy . DYNAMIC ) protected void setExecutorService ( ServiceReference < ExecutorService > executorService ) { this . executorService . setReference ( executorService ) ; }
DS method for setting the required dynamic executor service reference .
160,704
private void performAction ( Runnable action , boolean addToQueue ) { ExecutorService exec = executorService . getService ( ) ; if ( exec == null ) { action . run ( ) ; } else { if ( addToQueue ) { synchronized ( actionQueue ) { actionQueue . add ( action ) ; if ( ( actionFuture == null ) && ( configFuture == null ) ) ...
Schedule an activity to run off the SCR action thread if the ExecutorService is available
160,705
synchronized void reset ( double value , int updated ) { ewma = value ; ewmaStddev = value * SINGLE_VALUE_STDDEV ; ewmaVariance = ewmaStddev * ewmaStddev ; consecutiveOutliers = 0 ; lastUpdate = updated ; }
Reset the distribution by throwing away all history and adding a single data point .
160,706
synchronized void addDataPoint ( double value , int updated ) { if ( ewmaVariance == Double . NEGATIVE_INFINITY ) { reset ( value , updated ) ; return ; } double delta = value - ewma ; double increment = ALPHA * delta ; ewma += increment ; ewmaVariance = ( 1 - ALPHA ) * ( ewmaVariance + delta * increment ) ; ewmaStddev...
Add a throughput observation to the distribution setting lastUpdate
160,707
static void handleThrowable ( Throwable t ) { if ( t instanceof ThreadDeath ) { throw ( ThreadDeath ) t ; } if ( t instanceof VirtualMachineError ) { throw ( VirtualMachineError ) t ; } }
Checks whether the supplied Throwable is one that needs to be rethrown and swallows all others .
160,708
protected boolean isEvictionRequired ( ) { boolean evictionRequired = false ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { int size = primaryTable . size ( ) + secondaryTable . size ( ) + tertiaryTable . size ( ) ; Tr . debug ( tc , "The current cache size is " + size + "( " + primaryTab...
Determine if the cache is &quot ; full&quot ; and entries need to be evicted .
160,709
private boolean isDelegatedFacesServlet ( String className ) { if ( className == null ) { return false ; } try { Class < ? > clazz = Class . forName ( className ) ; return DELEGATED_FACES_SERVLET_CLASS . isAssignableFrom ( clazz ) ; } catch ( ClassNotFoundException cnfe ) { return false ; } }
Checks if the class represented by className implements DelegatedFacesServlet .
160,710
public static synchronized void unregisterModule ( PmiModule instance ) { if ( disabled ) return ; if ( instance == null ) return ; String [ ] path = instance . getPath ( ) ; if ( path == null || path . length == 0 ) return ; for ( int k = 0 ; k < path . length ; k ++ ) { if ( path [ k ] == null ) return ; } if ( tc . ...
remove module - never remove TYPE_MODULE .
160,711
protected static ModuleAggregate getModuleAggregate ( String moduleID ) { ModuleAggregate aggregate = ( ModuleAggregate ) moduleAggregates . get ( moduleID ) ; if ( aggregate != null ) return aggregate ; synchronized ( moduleAggregates ) { aggregate = ( ModuleAggregate ) moduleAggregates . get ( moduleID ) ; if ( aggre...
create it if not there - synchronized
160,712
public static ModuleItem findModuleItem ( String [ ] path ) { if ( disabled ) return null ; if ( path == null || path [ 0 ] . equals ( APPSERVER_MODULE ) ) { return moduleRoot ; } return moduleRoot . find ( path , 0 ) ; }
find a ModuleItem
160,713
public static StatLevelSpec [ ] getInstrumentationLevel ( StatDescriptor sd , boolean recursive ) { if ( disabled ) return null ; ModuleItem item = findModuleItem ( sd . getPath ( ) ) ; if ( item == null ) { return null ; } else { if ( ! recursive ) { StatLevelSpec [ ] pld = new StatLevelSpec [ 1 ] ; PmiModule instance...
6 . 0 API
160,714
public static int getInstrumentationLevel ( String [ ] path ) { if ( disabled ) return LEVEL_UNDEFINED ; DataDescriptor dd = new DataDescriptor ( path ) ; ModuleItem item = findModuleItem ( dd ) ; if ( item == null ) { return LEVEL_UNDEFINED ; } else { return item . getInstance ( ) . getInstrumentationLevel ( ) ; } }
get instrumenation level based on the path during runtime
160,715
public static String getInstrumentationLevelString ( ) { if ( disabled ) return null ; Map modules = moduleRoot . children ; if ( modules == null ) { return "" ; } else { PerfLevelDescriptor [ ] plds = new PerfLevelDescriptor [ modules . size ( ) ] ; Iterator values = modules . values ( ) . iterator ( ) ; int i = 0 ; w...
return the top level modules s PerfLevelDescriptor in String
160,716
public JwtBuilder audience ( List < String > newaudiences ) throws InvalidClaimException { builder = builder . audience ( newaudiences ) ; return this ; }
Sets audience claim . This claim in the JWT identifies the recipients that the token is intended for .
160,717
public JwtBuilder signWith ( String algorithm , Key key ) throws KeyException { builder = builder . signWith ( algorithm , key ) ; return this ; }
Signing key and algorithm information .
160,718
public JwtBuilder claim ( String name , Object value ) throws InvalidClaimException { builder = builder . claim ( name , value ) ; return this ; }
Sets the specified claim .
160,719
public JwtBuilder claim ( Map < String , Object > map ) throws InvalidClaimException { builder = builder . claim ( map ) ; return this ; }
Sets the specified claims .
160,720
public JwtBuilder claimFrom ( String jsonOrJwt , String claim ) throws InvalidClaimException , InvalidTokenException { builder = builder . claimFrom ( jsonOrJwt , claim ) ; return this ; }
Retrieves the specified claim from the given json or jwt string .
160,721
protected Dispatchable getThreadContext ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getThreadContext" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getThreadContext" ) ; return null ; }
Not needed for receive listener data invocations
160,722
protected synchronized void invoke ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "invoke" ) ; try { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) JFapUtils . debugTraceWsByteBuffer ( this , tc , data , 16 , "data passed to dataR...
Invokes the dataReceived method . If the callback throws an exception than the connection associated with it is invalidated .
160,723
protected synchronized void reset ( Connection connection , ReceiveListener listener , WsByteBuffer data , int size , int segmentType , int requestNumber , int priority , boolean allocatedFromPool , boolean partOfExchange , Conversation conversation ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabl...
Resets the state of this invocation object - used by the pooling code .
160,724
protected synchronized void repool ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "repool" ) ; connection = null ; listener = null ; data = null ; conversation = null ; owningPool . add ( this ) ; setDispatchable ( null ) ; if ( TraceComponent . isAnyTracing...
Returns this object to its associated object pool .
160,725
public static void setCookieForRequestParameter ( HttpServletRequest request , HttpServletResponse response , String id , String state , boolean isHttpsRequest , ConvergedClientConfig clientCfg ) { Map < String , String [ ] > map = request . getParameterMap ( ) ; JsonObject jsonObject = new JsonObject ( ) ; Set < Map ....
set the code cookie during authentication
160,726
public static MultivaluedMap < String , String > getStructuredParams ( String query , String sep , boolean decode , boolean decodePlus ) { MultivaluedMap < String , String > map = new MetadataMap < > ( new LinkedHashMap < String , List < String > > ( ) ) ; getStructuredParams ( map , query , sep , decode , decodePlus )...
Retrieve map of query parameters from the passed in message
160,727
public static List < MediaType > intersectMimeTypes ( List < MediaType > requiredMediaTypes , List < MediaType > userMediaTypes , boolean addRequiredParamsIfPossible ) { return intersectMimeTypes ( requiredMediaTypes , userMediaTypes , addRequiredParamsIfPossible , false ) ; }
intersect two mime types
160,728
protected void addNameToApplicationMap ( String name ) { String appName = getApplicationName ( ) ; if ( appName == null ) return ; ConcurrentLinkedQueue < String > list = applicationMap . get ( appName ) ; if ( list == null ) { ConcurrentLinkedQueue < String > newList = new ConcurrentLinkedQueue < String > ( ) ; list =...
Adds the metric name to an application map . This map is not a complete list of metrics owned by an application produced metrics are managed in the MetricsExtension
160,729
public SortedSet < String > getNames ( ) { return Collections . unmodifiableSortedSet ( new TreeSet < String > ( metrics . keySet ( ) ) ) ; }
Returns a set of the names of all the metrics in the registry .
160,730
public SortedMap < String , Counter > getCounters ( MetricFilter filter ) { return getMetrics ( Counter . class , filter ) ; }
Returns a map of all the counters in the registry and their names which match the given filter .
160,731
public SortedMap < String , Histogram > getHistograms ( MetricFilter filter ) { return getMetrics ( Histogram . class , filter ) ; }
Returns a map of all the histograms in the registry and their names which match the given filter .
160,732
public SortedMap < String , Meter > getMeters ( MetricFilter filter ) { return getMetrics ( Meter . class , filter ) ; }
Returns a map of all the meters in the registry and their names which match the given filter .
160,733
public SortedMap < String , Timer > getTimers ( MetricFilter filter ) { return getMetrics ( Timer . class , filter ) ; }
Returns a map of all the timers in the registry and their names which match the given filter .
160,734
public synchronized int addElement ( E theElement ) { if ( theElement == null ) { return - 1 ; } if ( elementCount == currentCapacity ) { expandTable ( ) ; } int theIndex = occupiedSlots . nextClearBit ( 0 ) ; if ( theIndex < 0 || theIndex > currentCapacity - 1 ) { throw new IllegalStateException ( "No space available ...
Add an element to the LookupTable . Returns the index value which can be used to look up the element in the LookupTable .
160,735
public synchronized Object removeElement ( int theIndex ) { if ( theIndex < 0 || theIndex > currentCapacity - 1 ) { throw new IllegalArgumentException ( "Index is out of range." ) ; } Object theElement = theElementArray [ theIndex ] ; if ( theElement != null ) { theElementArray [ theIndex ] = null ; elementCount -- ; o...
Remove the object from the LookupTable which is referenced by the supplied Index value .
160,736
public int findElement ( Object element ) { for ( int i = 0 ; i < currentCapacity ; i ++ ) { if ( element == theElementArray [ i ] ) { return i ; } } return - 1 ; }
Finds a supplied object in the LookupTable and returns its index .
160,737
@ SuppressWarnings ( "unchecked" ) private void expandTable ( ) { int newCapacity = currentCapacity + increment ; if ( newCapacity < currentCapacity ) { throw new IllegalStateException ( "Attempt to expand LookupTable beyond maximum capacity" ) ; } E [ ] theNewArray = ( E [ ] ) new Object [ newCapacity ] ; System . arr...
Expands the lookup table to accommodate more elements . Does this by adding the expansion increment to the current capacity .
160,738
public void initialize ( Map < String , Object > configProps ) throws WIMException { reposId = ( String ) configProps . get ( KEY_ID ) ; reposRealm = ( String ) configProps . get ( REALM ) ; if ( String . valueOf ( configProps . get ( ConfigConstants . CONFIG_PROP_SUPPORT_CHANGE_LOG ) ) . equalsIgnoreCase ( ConfigConst...
Function that is invoked when the LdapAdapter is initialized . It extracts the repository configuration details and sets itself up with the required properties .
160,739
private String getCallerUniqueName ( ) throws WIMApplicationException { String uniqueName = null ; Subject subject = null ; WSCredential cred = null ; try { if ( ( subject = WSSubject . getRunAsSubject ( ) ) == null ) { subject = WSSubject . getCallerSubject ( ) ; } if ( subject != null ) { Iterator < WSCredential > it...
Helper function returns the caller s unique name . Created to use for logging the calls to clear cache with clearAll mode .
160,740
private Entity createEntityFromLdapEntry ( Object parentDO , String propName , LdapEntry ldapEntry , List < String > propNames ) throws WIMException { final String METHODNAME = "createEntityFromLdapEntry" ; String outEntityType = ldapEntry . getType ( ) ; Entity outEntity = null ; if ( outEntityType != null ) { if ( ou...
Create an Entity object corresponding to the LdapEntry object returned by the LdapConnection object .
160,741
private String getString ( boolean isOctet , Object ldapValue ) { if ( isOctet ) { return LdapHelper . getOctetString ( ( byte [ ] ) ldapValue ) ; } else { return ldapValue . toString ( ) ; } }
Convert the value into an appropriate string value .
160,742
private String getDateString ( Object ldapValue ) throws WIMSystemException { return String . valueOf ( getDateString ( ldapValue , false ) ) ; }
Convert the value into an appropriate date string value .
160,743
private IdentifierType createIdentiferFromLdapEntry ( LdapEntry ldapEntry ) throws WIMException { IdentifierType outId = new IdentifierType ( ) ; outId . setUniqueName ( ldapEntry . getUniqueName ( ) ) ; outId . setExternalId ( ldapEntry . getExtId ( ) ) ; outId . setExternalName ( ldapEntry . getDN ( ) ) ; outId . set...
Create an IdentifierType object for the LdapEntry .
160,744
@ SuppressWarnings ( "unchecked" ) private void setPropertyValue ( Entity entity , Attribute attr , String propName , LdapAttribute ldapAttr ) throws WIMException { String dataType = entity . getDataType ( propName ) ; boolean isMany = entity . isMultiValuedProperty ( propName ) ; String syntax = LDAP_ATTR_SYNTAX_STRIN...
Set the appropriate value for the specified property .
160,745
private Object processPropertyValue ( Entity entity , String propName , final String dataType , final String syntax , Object ldapValue ) throws WIMException { if ( DATA_TYPE_STRING . equals ( dataType ) ) { boolean octet = LDAP_ATTR_SYNTAX_OCTETSTRING . equalsIgnoreCase ( syntax ) ; return getString ( octet , ldapValue...
Process the value of a property .
160,746
private void getGroups ( Entity entity , LdapEntry ldapEntry , GroupMembershipControl grpMbrshipCtrl ) throws WIMException { if ( grpMbrshipCtrl == null ) { return ; } int level = grpMbrshipCtrl . getLevel ( ) ; List < String > propNames = grpMbrshipCtrl . getProperties ( ) ; String [ ] bases = null ; List < String > s...
Method to get the Groups for the given entity .
160,747
private List < String > getDynamicMembers ( Attribute groupMemberURLs ) throws WIMException { final String METHODNAME = "getDynamicMembers" ; List < String > memberDNs = new ArrayList < String > ( ) ; if ( groupMemberURLs != null ) { try { for ( NamingEnumeration < ? > enu = groupMemberURLs . getAll ( ) ; enu . hasMore...
Method to get the list of dynamic members from the given Group Member URL .
160,748
private void getDescendants ( Entity entity , LdapEntry ldapEntry , DescendantControl descCtrl ) throws WIMException { if ( descCtrl == null ) { return ; } List < String > propNames = descCtrl . getProperties ( ) ; int level = descCtrl . getLevel ( ) ; List < String > descTypes = getEntityTypes ( descCtrl ) ; String [ ...
Method to get the list of descendants .
160,749
private void getAncestors ( Entity entity , LdapEntry ldapEntry , AncestorControl ancesCtrl ) throws WIMException { if ( ancesCtrl == null ) { return ; } List < String > propNames = ancesCtrl . getProperties ( ) ; int level = ancesCtrl . getLevel ( ) ; List < String > ancesTypes = getEntityTypes ( ancesCtrl ) ; String ...
Method to get the ancestors of the given entity .
160,750
public static Set < String > getSpecifiedRealms ( Root root ) { Set < String > result = new HashSet < String > ( ) ; List < Context > contexts = root . getContexts ( ) ; for ( Context context : contexts ) { String key = context . getKey ( ) ; if ( key != null && key . equals ( SchemaConstants . PROP_REALM ) ) { String ...
return the specified realms from the root object of the input data graph
160,751
public static String getContextProperty ( Root root , String propertyName ) { String result = "" ; List < Context > contexts = root . getContexts ( ) ; for ( Context context : contexts ) { String key = context . getKey ( ) ; if ( key != null && key . equals ( propertyName ) ) { result = ( String ) context . getValue ( ...
return the customProperty from the root object of the input data graph
160,752
private boolean isEntitySearchBaseConfigured ( List < String > mbrTypes ) { String METHODNAME = "isEntitySearchBaseConfigured(mbrTypes)" ; boolean isConfigured = false ; if ( mbrTypes != null ) { for ( String mbrType : mbrTypes ) { LdapEntity ldapEntity = iLdapConfigMgr . getLdapEntity ( mbrType ) ; if ( ldapEntity != ...
Checks if a search base is configured for the entity types .
160,753
private List < LdapEntry > deleteAll ( LdapEntry ldapEntry , boolean delDescendant ) throws WIMException { String dn = ldapEntry . getDN ( ) ; List < LdapEntry > delEntries = new ArrayList < LdapEntry > ( ) ; List < LdapEntry > descs = getDescendants ( dn , SearchControls . ONELEVEL_SCOPE ) ; if ( descs . size ( ) > 0 ...
Delete the descendants of the specified ldap entry .
160,754
private List < LdapEntry > getDescendants ( String DN , int level ) throws WIMException { int scope = SearchControls . ONELEVEL_SCOPE ; if ( level == 0 ) { scope = SearchControls . SUBTREE_SCOPE ; } List < LdapEntry > descendants = new ArrayList < LdapEntry > ( ) ; Set < LdapEntry > ldapEntries = iLdapConn . searchEnti...
Get all the descendants of the given DN .
160,755
private List < String > getGroups ( String dn ) throws WIMException { List < String > grpList = new ArrayList < String > ( ) ; String filter = iLdapConfigMgr . getGroupMemberFilter ( dn ) ; String [ ] searchBases = iLdapConfigMgr . getGroupSearchBases ( ) ; for ( int i = 0 ; i < searchBases . length ; i ++ ) { String s...
Get the groups that contain the specified DN as its member .
160,756
private void updateGroupMember ( String oldDN , String newDN ) throws WIMException { if ( ! iLdapConfigMgr . updateGroupMembership ( ) ) { return ; } String filter = iLdapConfigMgr . getGroupMemberFilter ( oldDN ) ; String [ ] mbrAttrs = iLdapConfigMgr . getMemberAttributes ( ) ; Map < String , ModificationItem [ ] > m...
Update the Group member
160,757
private AuditUtilityTask getTask ( String taskName ) { AuditUtilityTask task = null ; for ( AuditUtilityTask availTask : tasks ) { if ( availTask . getTaskName ( ) . equals ( taskName ) ) { task = availTask ; } } return task ; }
Given a task name return the corresponding AuditUtilityTask .
160,758
static int objectType ( Object value ) { if ( value instanceof String ) return STRING ; else if ( value instanceof Boolean ) return BOOLEAN ; else if ( value instanceof Number ) return EvaluatorImpl . getType ( ( Number ) value ) + Selector . INT ; else if ( value instanceof Serializable ) return OBJECT ; else return I...
Determine Selector type code of a Literal value according to its class . Used by the Literal constructor and by the Evaluator
160,759
private Cookie convertHttpCookie ( HttpCookie cookie ) { Cookie rc = new Cookie ( cookie . getName ( ) , cookie . getValue ( ) ) ; rc . setVersion ( cookie . getVersion ( ) ) ; if ( null != cookie . getPath ( ) ) { rc . setPath ( cookie . getPath ( ) ) ; } if ( null != cookie . getDomain ( ) ) { rc . setDomain ( cookie...
Convert the transport cookie to a J2EE cookie .
160,760
private static ResponseSwitch getResponseSwitch ( Object response ) { while ( response != null ) { if ( response instanceof ResponseSwitch ) { return ( ResponseSwitch ) response ; } if ( response instanceof ServletResponseWrapper ) { response = ( ( ServletResponseWrapper ) response ) . getResponse ( ) ; } break ; } ret...
Trys to obtain a ResponseSwitch from the Response .
160,761
private static ResponseSwitch createResponseSwitch ( Object response ) { if ( response instanceof HttpServletResponse ) { return new HttpServletResponseSwitch ( ( HttpServletResponse ) response ) ; } else if ( response instanceof ServletResponse ) { return new ServletResponseSwitch ( ( ServletResponse ) response ) ; } ...
Try to create a ResponseSwitch for this response .
160,762
private void updateFederatedManagerService ( ) { if ( ! activated ) { return ; } if ( profileManager . getReference ( ) != null ) { Tr . info ( tc , "FEDERATED_MANAGER_SERVICE_READY" ) ; } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Some required federated mana...
Federated Manager is ready when all of these required services have been registered .
160,763
private SSLConfig parseSSLConfig ( Map < String , Object > properties , boolean reinitialize ) throws Exception { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "parseSSLConfig: " + properties . get ( LibertyConstants . KEY_ID ) , properties ) ; SSLConfig rc = parseSecureSo...
Helper method to build the SSLConfig properties from the SSLConfig model object .
160,764
public synchronized SSLConfig getSSLConfig ( String alias ) throws IllegalArgumentException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getSSLConfig: " + alias ) ; SSLConfig rc = null ; if ( alias == null || alias . equals ( "" ) ) { rc = getDefaultSSLConfig ( ) ; } e...
Finds an SSLConfig from the Map given an alias .
160,765
public synchronized void loadGlobalProperties ( Map < String , Object > map ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "loadGlobalProperties" ) ; globalConfigProperties . clear ( ) ; for ( Entry < String , Object > prop : map . entrySet ( ) ) { if ( TraceComponent ....
Helper method for loading global properties .
160,766
private void set ( Class < ? > builderCls , Object builder , String propName , Object value ) throws IntrospectionException , IllegalArgumentException , IllegalAccessException , InvocationTargetException { try { Class < ? > cls = COUCHDB_CLIENT_OPTIONS_TYPES . get ( propName ) ; Method method = builderCls . getMethod (...
Configure a couchdb option .
160,767
private void configureJMSConnectionFactories ( List < JMSConnectionFactory > jmsConnFactories ) { Map < String , ConfigItem < JMSConnectionFactory > > jmsCfConfigItemMap = configurator . getConfigItemMap ( JNDIEnvironmentRefType . JMSConnectionFactory . getXMLElementName ( ) ) ; for ( JMSConnectionFactory jmsConnFactor...
To configure JMS ConnectionFactory
160,768
private void configureJMSDestinations ( List < JMSDestination > jmsDestinations ) { Map < String , ConfigItem < JMSDestination > > jmsDestinationConfigItemMap = configurator . getConfigItemMap ( JNDIEnvironmentRefType . JMSConnectionFactory . getXMLElementName ( ) ) ; for ( JMSDestination jmsDestination : jmsDestinatio...
To configure JMS Destinations
160,769
public static final RequestType getRequestType ( ExternalContext externalContext ) { if ( _PORTLET_10_SUPPORTED || _PORTLET_20_SUPPORTED ) { if ( _PORTLET_CONTEXT_CLASS . isInstance ( externalContext . getContext ( ) ) ) { Object request = externalContext . getRequest ( ) ; if ( _PORTLET_RENDER_REQUEST_CLASS . isInstan...
Returns the requestType of this ExternalContext .
160,770
public static final RequestType getRequestType ( Object context , Object request ) { if ( _PORTLET_10_SUPPORTED || _PORTLET_20_SUPPORTED ) { if ( _PORTLET_CONFIG_CLASS . isInstance ( context ) || _PORTLET_CONTEXT_CLASS . isInstance ( context ) ) { if ( _PORTLET_RENDER_REQUEST_CLASS . isInstance ( request ) ) { return R...
This method is used when a ExternalContext object is not available like in TomahawkFacesContextFactory .
160,771
public static InputStream getRequestInputStream ( ExternalContext ec ) throws IOException { RequestType type = getRequestType ( ec ) ; if ( type . isRequestFromClient ( ) ) { Object req = ec . getRequest ( ) ; if ( type . isPortlet ( ) ) { return ( InputStream ) _runMethod ( req , "getPortletInputStream" ) ; } else { r...
Returns the request input stream if one is available
160,772
private static Object _runMethod ( Object obj , String methodName ) { try { Method sessionIdMethod = obj . getClass ( ) . getMethod ( methodName ) ; return sessionIdMethod . invoke ( obj ) ; } catch ( Exception e ) { return null ; } }
Runs a method on an object and returns the result
160,773
public static HttpServletResponse getHttpServletResponse ( Object response ) { while ( response != null ) { if ( response instanceof HttpServletResponse ) { return ( HttpServletResponse ) response ; } if ( response instanceof ServletResponseWrapper ) { response = ( ( ServletResponseWrapper ) response ) . getResponse ( ...
Trys to obtain a HttpServletResponse from the Response . Note that this method also trys to unwrap any ServletResponseWrapper in order to retrieve a valid HttpServletResponse .
160,774
public String addSymbol ( String symbol ) { int bucket = hash ( symbol ) % fTableSize ; int length = symbol . length ( ) ; OUTER : for ( Entry entry = fBuckets [ bucket ] ; entry != null ; entry = entry . next ) { if ( length == entry . characters . length ) { for ( int i = 0 ; i < length ; i ++ ) { if ( symbol . charA...
Adds the specified symbol to the symbol table and returns a reference to the unique symbol . If the symbol already exists the previous symbol reference is returned instead in order guarantee that symbol references remain unique .
160,775
static XARecoveryWrapper deserialize ( byte [ ] serializedWrapper ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "deserialize" ) ; XARecoveryWrapper wrapper = null ; try { final ByteArrayInputStream bis = new ByteArrayInputStream ( serializedWrapper ) ; final ObjectInputStream oin = new ObjectInputStream ( bis ) ...
which classloader is passed in and which is on the thread .
160,776
private String [ ] canonicalise ( final String [ ] xaResInfoClasspath ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "canonicalise" , xaResInfoClasspath ) ; final String [ ] result ; if ( xaResInfoClasspath != null ) { final ArrayList < String > al = new ArrayList < String > ( ) ; for ( final String pathElement :...
Canonicalise inbound paths so they can be compared with paths held in the classloaders
160,777
public void connectionClosed ( ConnectionEvent event ) { final boolean isTracingEnabled = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTracingEnabled && tc . isEntryEnabled ( ) ) { Tr . entry ( this , tc , "connectionClosed" ) ; } if ( event . getId ( ) == ConnectionEvent . CONNECTION_CLOSED ) { if ( ! mcWrapper ....
This method is called by a resource adapter when the application calls close on a Connection .
160,778
public void connectionErrorOccurred ( ConnectionEvent event ) { int eventID = event . getId ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { StringBuilder entry = new StringBuilder ( event . getClass ( ) . getSimpleName ( ) ) . append ( '{' ) ; entry . append ( "id=" ) . append ( event...
This method is called by a resource adapter when a connection error occurs . This is also called internally by this class when other event handling methods fail and require cleanup .
160,779
public void localTransactionCommitted ( ConnectionEvent event ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( this , tc , "localTransactionCommitted" ) ; } if ( event . getId ( ) == ConnectionEvent . LOCAL_TRANSACTION_COMMITTED ) { if ( mcWrapper . involvedInTransaction ( )...
This method is called by a resource adapter when a CCI local transation commit is called by the application on a connection . If the MC is associated with a UOW delist its corresponding transaction wrapper .
160,780
public void localTransactionStarted ( ConnectionEvent event ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( this , tc , "localTransactionStarted" ) ; } if ( event . getId ( ) == ConnectionEvent . LOCAL_TRANSACTION_STARTED ) { UOWCoordinator uowCoordinator = mcWrapper . getU...
This method is called by a resource adapter when a CCI local transation begin is called by the application on a connection
160,781
public boolean hasObjectWithPrefix ( NamingConstants . JavaColonNamespace namespace , String name ) throws NamingException { if ( namespace == NamingConstants . JavaColonNamespace . COMP ) { return hasObjectWithPrefix ( compLock , compBindings , name ) ; } if ( namespace == NamingConstants . JavaColonNamespace . COMP_E...
Returns true if a JNDI subcontext exists .
160,782
public Collection < ? extends NameClassPair > listInstances ( NamingConstants . JavaColonNamespace namespace , String contextName ) throws NamingException { if ( namespace == NamingConstants . JavaColonNamespace . COMP ) { return listInstances ( compLock , compBindings , contextName ) ; } if ( namespace == NamingConsta...
Lists the contents of a JNDI subcontext .
160,783
private synchronized void disableDeferredReferenceData ( ) { deferredReferenceDataEnabled = false ; if ( parent != null && deferredReferenceDatas != null ) { parent . removeDeferredReferenceData ( this ) ; deferredReferenceDatas = null ; } }
Unregister this scope data with its parent if necessary for deferred reference data processing .
160,784
public synchronized void addDeferredReferenceData ( DeferredReferenceData refData ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "addDeferredReferenceData" , "this=" + this , refData ) ; } if ( deferredReferenceDatas == null ) { deferredReferenceDatas = new LinkedHash...
Add a child deferred reference data to this scope .
160,785
public synchronized void removeDeferredReferenceData ( DeferredReferenceData refData ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "removeDeferredReferenceData" , "this=" + this , refData ) ; } if ( deferredReferenceDatas != null ) { deferredReferenceDatas . remove (...
Remove a child deferred reference data to this scope .
160,786
public boolean processDeferredReferenceData ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "processDeferredReferenceData" , "this=" + this ) ; } Map < DeferredReferenceData , Boolean > deferredReferenceDatas ; synchronized ( this ) { deferredReferenceDatas = this . ...
Process all child reference datas .
160,787
@ SuppressWarnings ( "unused" ) private static void releaseRenderer ( ) { if ( log . isLoggable ( Level . FINEST ) ) { log . finest ( "releaseRenderer rendererMap -> " + delegateRendererMap . toString ( ) ) ; } ClassLoader classLoader = Thread . currentThread ( ) . getContextClassLoader ( ) ; if ( log . isLoggable ( Le...
The idea of this method is to be called from AbstractFacesInitializer .
160,788
public static String generateNonce ( int length ) { if ( length < 0 ) { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Negative length provided. Will default to nonce of length " + NONCE_LENGTH ) ; } length = NONCE_LENGTH ; } StringBuilder randomString = new StringBuilder ( ) ; SecureRandom r = new SecureRandom ( ...
Generates a random string with the specified length .
160,789
public Subject authenticate ( CallbackHandler callbackHandler , Subject subject ) throws WSLoginFailedException , CredentialException { if ( callbackHandler == null ) { throw new WSLoginFailedException ( TraceNLS . getFormattedMessage ( this . getClass ( ) , TraceConstants . MESSAGE_BUNDLE , "JAAS_LOGIN_NO_CALLBACK_HAN...
Authenticating on the client will only create a dummy basic auth subject and does not truly authenticate anything . This subject is sent to the server ove CSIv2 where the real authentication happens .
160,790
protected Subject createBasicAuthSubject ( AuthenticationData authenticationData , Subject subject ) throws WSLoginFailedException , CredentialException { Subject basicAuthSubject = subject != null ? subject : new Subject ( ) ; String loginRealm = ( String ) authenticationData . get ( AuthenticationData . REALM ) ; Str...
Create the basic auth subject using the given authentication data
160,791
static RLSSuspendTokenManager getInstance ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getInstance" ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "getInstance" , _instance ) ; return _instance ; }
Returns the single instance of the RLSSuspendTokenManager
160,792
RLSSuspendToken registerSuspend ( int timeout ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "registerSuspend" , new Integer ( timeout ) ) ; RLSSuspendToken token = Configuration . getRecoveryLogComponent ( ) . createRLSSuspendToken ( null ) ; Alarm alarm = null ; if ( timeout > 0 ) { alarm = Configuration . getA...
Registers that a suspend call has been made on the RecoveryLogService and generates a unique RLSSuspendToken which must be passed in to registerResume to cancel this suspend operation
160,793
void registerResume ( RLSSuspendToken token ) throws RLSInvalidSuspendTokenException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "registerResume" , token ) ; if ( token != null && _tokenMap . containsKey ( token ) ) { synchronized ( _tokenMap ) { Alarm alarm = ( Alarm ) _tokenMap . remove ( token ) ; if ( alarm ...
Cancels the suspend request that returned the matching RLSSuspendToken . The suspend call s alarm if there is one will also be cancelled
160,794
boolean isResumable ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "isResumable" ) ; boolean isResumable = true ; synchronized ( _tokenMap ) { if ( ! _tokenMap . isEmpty ( ) ) { isResumable = false ; } } if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "isResumable" , new Boolean ( isResumable ) ) ; return isRes...
Returns true if there are no tokens in the map indicating that no active suspends exist .
160,795
public static String formatUniqueName ( String uniqueName ) throws InvalidUniqueNameException { String validName = getValidUniqueName ( uniqueName ) ; if ( validName == null ) { if ( tc . isErrorEnabled ( ) ) { Tr . error ( tc , WIMMessageKey . INVALID_UNIQUE_NAME_SYNTAX , WIMMessageHelper . generateMsgParms ( uniqueNa...
Formats the specified entity unique name and also check it using the LDAP DN syntax rule . The formatting including remove
160,796
public static String constructUniqueName ( String [ ] RDNs , Entity entity , String parentDN , boolean throwExc ) throws WIMException { boolean found = false ; String uniqueName = null ; String missingPropName = null ; for ( int i = 0 ; i < RDNs . length ; i ++ ) { String [ ] localRDNs = getRDNs ( RDNs [ i ] ) ; int si...
Returns the unique name based on the input value .
160,797
private static String escapeAttributeValue ( String value ) { final String escapees = ",=+<>#;\"\\" ; char [ ] chars = value . toCharArray ( ) ; StringBuffer buf = new StringBuffer ( 2 * value . length ( ) ) ; int lead ; for ( lead = 0 ; lead < chars . length ; lead ++ ) { if ( ! isWhitespace ( chars [ lead ] ) ) { bre...
Given the value of an attribute returns a string suitable for inclusion in a DN .
160,798
public static String unescapeSpaces ( String in ) { char [ ] chars = in . toCharArray ( ) ; int end = chars . length ; StringBuffer out = new StringBuffer ( in . length ( ) ) ; for ( int i = 0 ; i < end ; i ++ ) { boolean isSlashSpace = ( chars [ i ] == '\\' ) && ( i + 1 < end ) && ( chars [ i + 1 ] == ' ' ) ; if ( isS...
Replace any unnecessary escaped spaces from the input DN .
160,799
public static String getChildText ( Element elem , String childTagName ) { NodeList nodeList = elem . getElementsByTagName ( childTagName ) ; int len = nodeList . getLength ( ) ; if ( len == 0 ) { return null ; } return getElementText ( ( Element ) nodeList . item ( len - 1 ) ) ; }
Return content of child element with given tag name . If more than one children with this name are present the content of the last element is returned .