idx
int64
0
41.2k
question
stringlengths
83
4.15k
target
stringlengths
5
715
40,800
public void setLogHandler ( String id , LogHandler ref ) { if ( id != null && ref != null ) { logHandlerServices . put ( id , ref ) ; } }
Add the LogHandler ref . 1 or more LogHandlers may be set .
40,801
public synchronized void modified ( Properties props ) { for ( Object key : props . keySet ( ) ) { String msgId = ( String ) key ; String logHandlerIds = props . getProperty ( msgId ) ; Set < String > logHandlerIdSet = getOrCreateLogHandlerIdSet ( msgId ) ; for ( String id : split ( logHandlerIds , "," ) ) { id = id . ...
Process the MessageRouter . properties file contents given by the Properties parm .
40,802
protected void addMsgToLogHandler ( String msgId , String handlerId ) { Set < String > logHandlerIdSet = getOrCreateLogHandlerIdSet ( msgId ) ; logHandlerIdSet . add ( handlerId ) ; }
Add the specified log handler to the message ID s routing list .
40,803
protected void removeMsgFromLogHandler ( String msgId , String handlerId ) { Set < String > logHandlerIdSet = getOrCreateLogHandlerIdSet ( msgId ) ; logHandlerIdSet . remove ( handlerId ) ; }
Remove the specified log handler from the message ID s routing list .
40,804
private String [ ] filter ( String [ ] candidateCipherSuites , String [ ] requested , OptionsKey options ) { List < String > candidates = Arrays . asList ( candidateCipherSuites ) ; EnumSet < Options > supports = toOptions ( options . supports , true ) ; EnumSet < Options > requires = toOptions ( options . requires , f...
This method will warn if any requested cipher suites appear to not match the options
40,805
protected void markStepForFailure ( ) { StopLock stopLock = getStopLock ( ) ; synchronized ( stopLock ) { updateStepBatchStatus ( BatchStatus . FAILED ) ; if ( ! issuedFailureMessageToJobLog ) { stepThreadHelper . logFailedMessage ( ) ; issuedFailureMessageToJobLog = true ; } } }
Updates in - memory status and issues message to job log but does not persist final status .
40,806
protected boolean wasStopIssuedOnJob ( ) { StopLock stopLock = getStopLock ( ) ; synchronized ( stopLock ) { if ( runtimeWorkUnitExecution . getBatchStatus ( ) . equals ( BatchStatus . STOPPING ) ) { return true ; } else { return false ; } } }
We need this because the stop can come in at the job level while the step - level constructs are still getting set up .
40,807
protected StepThreadExecutionEntity createStepExecutionIfStepShouldBeExecuted ( ) throws DoNotRestartStepThreadException { StepThreadExecutionEntity newStepExecution = null ; StepThreadInstanceKey stepThreadInstanceKey = getStepThreadInstanceKey ( ) ; stepThreadInstance = getPersistenceManagerService ( ) . getStepThrea...
stepThreadInstance and stepThreadExecution are either retrieved from the DB or if they don t exist yet they re created .
40,808
public Selector parseWholeSelector ( String selector ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . entry ( cclass , "parseWholeSelector" , "selector: " + selector ) ; Identifier ident = new IdentifierImpl ( selector ) ; ident . setFullName ( selector ) ; ident . setSelectorDomain (...
This method retains the behaviour of the first implementation of XPath support where the entire expression is wrapped in a single identifier .
40,809
private void parseSelector ( String selector ) throws InvalidXPathSyntaxException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . entry ( cclass , "parseSelector" , "selector: " + selector ) ; locationStep = - 1 ; int start = 0 ; int posWildCard = selector . indexOf ( "//" , start ) ; ...
Parse the XPath Selector expression .
40,810
private void parseLocationStep ( String selector , int start , int stepEnd ) throws InvalidXPathSyntaxException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . entry ( cclass , "parseLocationStep" , "selector: " + selector + ", start: " + start + ", end: " + stepEnd ) ; int stepStart =...
Break a location step into predicates that can be driven against the MatchParser .
40,811
private IdentifierImpl createIdentifierForSubExpression ( String subExpression , String fullExpression , boolean isLocationStep , boolean isLastStep ) throws InvalidXPathSyntaxException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . entry ( cclass , "createIdentifierForSubExpression" ...
When we ve isolated a subexpression we wrap it in an Identifier .
40,812
private IdentifierImpl createIdentifierForWildExpression ( String selector ) throws InvalidXPathSyntaxException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . entry ( cclass , "createIdentifierForWildExpression" , "selector: " + selector ) ; IdentifierImpl wildIdentifier = new Identif...
Wrap a selector with a multilevel wildcard in an Identifier .
40,813
private void setXPathCharacteristics ( IdentifierImpl identifier ) throws InvalidXPathSyntaxException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . entry ( cclass , "setXPathCharacteristics" , "identifier: " + identifier ) ; identifier . setSelectorDomain ( 2 ) ; identifier . setStep...
Configure the Identifier with appropriate XPath parameters .
40,814
private Selector parsePredicate ( String predicate , String fullPath ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . entry ( cclass , "parsePredicate" , "predicate: " + predicate ) ; Selector parsed = null ; try { String parserInput = preProcessForSpecials ( predicate ) ; predicatePa...
Attempt to parse an isolated predicate using the MatchParser .
40,815
private String preProcessForSpecials ( String predicate ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . entry ( cclass , "preProcessForSpecials" , "predicate: " + predicate ) ; String processed = predicate ; String replace = replaceSpecialsWithSub ( predicate ) ; if ( replace != null...
Locate and replace any special characters that are going to cause problems fr the MatchParser .
40,816
private void postProcessSelectorTree ( Selector parsed , String fullPath ) throws InvalidXPathSyntaxException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . entry ( cclass , "postProcessSelectorTree" , "parsed: " + parsed + ", fullPath: " + fullPath ) ; if ( parsed instanceof Identifi...
Handle special character substitution .
40,817
private void postProcessOperands ( OperatorImpl opImpl , String fullPath ) throws InvalidXPathSyntaxException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . entry ( cclass , "postProcessOperands" , "opImpl: " + opImpl + ", fullPath: " + fullPath ) ; for ( int i = 0 ; i < opImpl . oper...
Traverse an Operator tree handling special character substitution .
40,818
private String replaceSpecialsWithSub ( String inString ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . entry ( cclass , "replaceSpecialsWithSub" , "inString: " + inString ) ; String outString = null ; StringBuffer sb = null ; int posAmpersand = inString . indexOf ( "@" ) ; if ( posA...
Replace special characters in the string with substitutions .
40,819
private String replaceSubForSpecials ( String inString ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . entry ( cclass , "replaceSubForSpecials" , "inString: " + inString ) ; String outString = null ; StringBuffer sb = null ; int posAmpersand = inString . indexOf ( "_$AMP$_" ) ; if ( ...
Replace substitutions in the string with the original special characters .
40,820
private void wrapLocationStep ( String selector , int start , int stepEnd ) throws InvalidXPathSyntaxException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . entry ( cclass , "wrapLocationStep" , "selector: " + selector + ", start: " + start + ", stepEnd: " + stepEnd ) ; String step =...
Wrap a location step in an Identifier .
40,821
private void wrapLastLocationStep ( String selector , int start , boolean bumpLocationStep ) throws InvalidXPathSyntaxException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . entry ( cclass , "wrapLastLocationStep" , "selector: " + selector + ", start: " + start + ", bumpLocationStep:...
Wrap the last location step in an Identifier .
40,822
public void addChain ( ChainData newChain ) throws ChainException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "addChain: " + newChain . getName ( ) ) ; } if ( containsChain ( newChain . getName ( ) ) ) { ChainException e = new ChainException ( "Chain already exists: ...
Adds the input chain to the group . All chain event listeners associated with the group are also added to the chain .
40,823
public void removeChain ( ChainData inputChain ) throws ChainException { String chainname = inputChain . getName ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "removeChain: " + chainname ) ; } if ( ! containsChain ( chainname ) ) { ChainException e = new ChainExcep...
Removes the input chain from the group . All group chain event listeners all also removed from the chain unless the chain is in another group which is associated with the listener .
40,824
public void updateChain ( ChainData inputChain ) { String chainname = inputChain . getName ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "updateChain: " + chainname ) ; } for ( int i = 0 ; i < this . chainArray . length ; i ++ ) { if ( chainname . equals ( this . c...
Search the group for the input chain . If found update it . Otherwise do nothing .
40,825
private void removeListenerFromChain ( ChainEventListener listener , ChainData chainData ) { ChainGroupData [ ] otherGroups = null ; boolean foundOtherGroupWithListener = false ; try { otherGroups = this . framework . getAllChainGroups ( chainData . getName ( ) ) ; foundOtherGroupWithListener = false ; int i = 0 ; for ...
Remove the listener from the chain but only if the chain is not associated with the listener through another group .
40,826
public final void addChainEventListener ( ChainEventListener listener ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "addChainEventListener: " + listener ) ; } if ( ( null != listener ) && ( ! getChainEventListeners ( ) . contains ( listener ) ) ) { getChainEventListe...
Method addChainEventListener . Enables external entities to be notified of chain events on each of the chains in the group described in ChainEventListener interface .
40,827
public final void removeChainEventListener ( ChainEventListener listener ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "removeChainEventListener: " + listener ) ; } if ( null != listener ) { if ( ! getChainEventListeners ( ) . remove ( listener ) ) { if ( TraceCompon...
Method removeChainEventListener . Removes a listener from the list of those being informed of chain events on this chain . The listener is also removed from each chain in the group unless the chain is in another group which is associated with the listener .
40,828
public void addJSONObject ( JSONObject obj ) { if ( logger . isLoggable ( Level . FINER ) ) logger . entering ( className , "addJSONObject(JSONObject)" ) ; Vector vect = ( Vector ) this . jsonObjects . get ( obj . objectName ) ; if ( vect != null ) { vect . add ( obj ) ; } else { vect = new Vector ( ) ; vect . add ( ob...
Method to add a JSON child object to this JSON object .
40,829
public void writeObject ( Writer writer , int indentDepth , boolean contentOnly , boolean compact ) throws IOException { if ( logger . isLoggable ( Level . FINER ) ) logger . entering ( className , "writeObject(Writer, int, boolean, boolean)" ) ; if ( writer != null ) { try { if ( isEmptyObject ( ) ) { writeEmptyObject...
Method to write out the JSON formatted object .
40,830
private void writeIndention ( Writer writer , int indentDepth ) throws IOException { if ( logger . isLoggable ( Level . FINER ) ) logger . entering ( className , "writeIndention(Writer, int)" ) ; try { for ( int i = 0 ; i < indentDepth ; i ++ ) { writer . write ( indent ) ; } } catch ( Exception ex ) { IOException iox ...
Internal method for doing a simple indention write .
40,831
public void setAttributes ( FaceletContext ctx , Object obj ) { DateTimeConverter c = ( DateTimeConverter ) obj ; if ( this . locale != null ) { c . setLocale ( ComponentSupport . getLocale ( ctx , this . locale ) ) ; } if ( this . pattern != null ) { c . setPattern ( this . pattern . getValue ( ctx ) ) ; } else { if (...
Implements tag spec see taglib documentation .
40,832
public void createShellStreamSet ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createShellStreamSet" ) ; StreamSet streamSet = null ; synchronized ( streamSets ) { streamSet = new StreamSet ( null , targetMEUuid , 0 , isLink ? StreamSet . Type . LINK_INTERNAL_OUT...
This method will create a StreamSet with null StreamId .
40,833
public void processAckExpected ( long stamp , int priority , Reliability reliability , SIBUuid12 streamID ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "processAckExpected" , new Object [ ] { Long . valueOf ( stamp ) , Integer . valueOf ( ...
needs to send an AckExpected downstream .
40,834
public void forceFlush ( SIBUuid12 streamID ) throws SIErrorException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "forceFlush" , streamID ) ; StreamSet streamSet = streamSets . get ( streamID ) ; streamSet . dereferenceControlAdapter ( ) ; try { downControl . sendFl...
This method will be called to force flush of streamSet
40,835
public ControlNotFlushed stampNotFlushed ( ControlNotFlushed msg , SIBUuid12 streamID ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "stampNotFlushed" , new Object [ ] { msg } ) ; int count = 0 ; int max = ( SIMPConstants . MSG_HIGH_PRIORIT...
Attach the appropriate completed and duplicate prefixes for the stream stored in this array to a ControlNotFlushed message .
40,836
public StatisticImpl getStatistic ( ) { if ( enabled ) { if ( proxy == null ) { System . out . println ( "[SpdStatisticExternal] null proxy" ) ; return null ; } proxy . updateStatisticOnRequest ( dataId ) ; return onReqStatistic ; } else return null ; }
return a wire level data using given time as snapshotTime
40,837
static String [ ] uniquify ( String [ ] arr , boolean alwaysClone ) { int numUnique = uniquifyCountAndCopy ( arr , null ) ; if ( numUnique == 0 ) return EMPTY_STRING_ARRAY ; if ( numUnique == arr . length ) return alwaysClone ? arr . clone ( ) : arr ; String [ ] out = new String [ numUnique ] ; uniquifyCountAndCopy ( a...
Remove null and duplicate elements from an array .
40,838
private static int uniquifyCountAndCopy ( String [ ] in , String [ ] out ) { int count = 0 ; outer : for ( int i = 0 ; i < in . length ; i ++ ) { if ( in [ i ] != null ) { for ( int j = 0 ; j < i ; j ++ ) if ( in [ i ] . equals ( in [ j ] ) ) continue outer ; if ( out != null ) out [ count ] = in [ i ] ; count ++ ; } }...
Count the number of non - null non - duplicate elements in an array and copy those elements to an output array if provided .
40,839
private Integer findMinimumSafeLevel ( PackageIndex < Integer > index ) { if ( index == null ) { return null ; } Integer minimumLevel = index . find ( name ) ; if ( minimumLevel == null ) { for ( String group : groups ) { minimumLevel = index . find ( group ) ; if ( minimumLevel != null ) { break ; } } } return minimum...
Search by name first and if not found then search by groups .
40,840
private TranLogConfiguration createCustomTranLogConfiguration ( String recoveredServerIdentity , String logDir , boolean isPeerRecoverySupported ) throws URISyntaxException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "createCustomTranLogConfiguration" , new java . lang . Object [ ] { recoveredServerIdentity , lo...
Creates a custom TranLogConfiguration object appropriate for storing transaction logs in an RDBMS or other custom repository .
40,841
private TranLogConfiguration createFileTranLogConfiguration ( String recoveredServerIdentity , FailureScope fs , String logDir , int logSize , boolean isPeerRecoverySupported ) throws URISyntaxException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "createFileTranLogConfiguration" , new java . lang . Object [ ] { ...
Creates a Filesystem TranLogConfiguration object appropriate for storing transaction logs in a filesystem .
40,842
private int getPeerLeaseCheckInterval ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getPeerLeaseCheckInterval" ) ; int intToReturn ; Integer peerLeaseCheckInterval = null ; try { peerLeaseCheckInterval = AccessController . doPrivileged ( new PrivilegedExceptionAction < Integer > ( ) { public Integer run ( ) {...
This method retrieves a system property named com . ibm . tx . jta . impl . PeerLeaseCheckInterval which allows a value to be specified for the time we should wait between peer server status checks .
40,843
private boolean doNotShutdownOnRecoveryFailure ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "doNotShutdownOnRecoveryFailure" ) ; boolean doCheck = true ; Boolean doNotShutdownOnRecoveryFailure = null ; try { doNotShutdownOnRecoveryFailure = AccessController . doPrivileged ( new PrivilegedExceptionAction < Boo...
This method retrieves a system property named com . ibm . ws . recoverylog . spi . DoNotShutdownOnRecoveryFailure which allows the server to start with failed recovery logs - non 2PC work may still be performed by the server .
40,844
private static String getStringKey ( String propertyKey ) { if ( WCCustomProperties . FullyQualifiedPropertiesMap . containsKey ( propertyKey ) ) { return WCCustomProperties . FullyQualifiedPropertiesMap . get ( propertyKey ) . toLowerCase ( ) ; } else { return propertyKey ; } }
propertyKey is lowerCase value
40,845
protected void createLockFile ( String pid , String label ) throws IOException { if ( ! AccessHelper . isDirectory ( repositoryLocation ) ) { AccessHelper . makeDirectories ( repositoryLocation ) ; } for ( File lock : listFiles ( LOCKFILE_FILTER ) ) { AccessHelper . deleteFile ( lock ) ; } StringBuilder sb = new String...
Creates lock file to be used as a pattern for instance repository . Should be called only by parent s manager on start up .
40,846
protected File getLogFile ( File parentLocation , long timestamp ) { if ( timestamp < 0 ) { throw new IllegalArgumentException ( "timestamp cannot be negative" ) ; } StringBuilder sb = new StringBuilder ( ) ; sb . append ( timestamp ) . append ( EXTENSION ) ; return new File ( parentLocation , sb . toString ( ) ) ; }
calculates repository file name .
40,847
public long getLogFileTimestamp ( File file ) { if ( file == null ) { return - 1L ; } String name = file . getName ( ) ; if ( name == null || name . length ( ) == 0 || ! name . endsWith ( EXTENSION ) ) { return - 1L ; } try { return Long . parseLong ( name . substring ( 0 , name . indexOf ( EXTENSION ) ) ) ; } catch ( ...
Retrieves the timestamp from the name of the file .
40,848
public String getLogDirectoryName ( long timestamp , String pid , String label ) { if ( pid == null || pid . isEmpty ( ) ) { throw new IllegalArgumentException ( "pid cannot be empty" ) ; } StringBuilder sb = new StringBuilder ( ) ; if ( timestamp > 0 ) { sb . append ( timestamp ) . append ( TIMESEPARATOR ) ; } sb . ap...
returns sub - directory name to be used for instances and sub - processes
40,849
public static long parseTimeStamp ( String fileName ) { if ( fileName == null || fileName . isEmpty ( ) ) { return - 1L ; } int pidIndex = fileName . indexOf ( TIMESEPARATOR ) ; int labelIndex = fileName . indexOf ( LABELSEPARATOR ) ; if ( pidIndex < 0 || ( labelIndex > 0 && labelIndex < pidIndex ) ) { return - 1L ; } ...
Retrieves the timestamp out of the directory name .
40,850
public static String parsePIDandLabel ( String fileName ) { if ( fileName == null || fileName . isEmpty ( ) ) { return null ; } int pidIndex = fileName . indexOf ( TIMESEPARATOR ) ; int labelIndex = fileName . indexOf ( LABELSEPARATOR ) ; if ( pidIndex < 0 || ( labelIndex > 0 && labelIndex < pidIndex ) ) { return fileN...
Retrieves the PID and label combined out of the directory name .
40,851
public static String getFormattedMessageFromLocalizedMessage ( String localizedMessage , Object [ ] args , boolean quiet ) { return TraceNLSResolver . getInstance ( ) . getFormattedMessage ( localizedMessage , args ) ; }
Return the formatted message obtained by substituting parameters passed into a message
40,852
public void resolveBundles ( BundleContext bContext , List < Bundle > bundlesToResolve ) { if ( bundlesToResolve == null || bundlesToResolve . size ( ) == 0 ) { return ; } FrameworkWiring wiring = adaptSystemBundle ( bContext , FrameworkWiring . class ) ; if ( wiring != null ) { ResolutionReportHelper rrh = null ; if (...
Utility for resolving bundles
40,853
public static String getBundleLocation ( String urlString , String productName ) { String productNameInfo = ( productName != null && ! productName . isEmpty ( ) ) ? ( BUNDLE_LOC_PROD_EXT_TAG + productName + ":" ) : "" ; return BUNDLE_LOC_FEATURE_TAG + productNameInfo + urlString ; }
Gets the bundle location . The location format is consistent with what SchemaBundle and BundleList .
40,854
private String getRegionName ( String productName ) { if ( productName == null || productName . isEmpty ( ) ) { return kernelRegion . getName ( ) ; } return REGION_EXTENSION_PREFIX + INVALID_REGION_CHARS . matcher ( productName ) . replaceAll ( "-" ) ; }
Gets the region name according to the product name .
40,855
public static String getESIDependencies ( Enumeration e1 , Enumeration e2 ) { if ( ( e1 == null || ! e1 . hasMoreElements ( ) ) ) if ( ( e2 == null || ! e2 . hasMoreElements ( ) ) ) return null ; StringBuffer sb = new StringBuffer ( "dependencies=\"" ) ; if ( e1 != null ) while ( e1 . hasMoreElements ( ) ) { sb . appen...
expects an enumeration of data ids and an enumeration of templates
40,856
public E getBy ( String attributeName , String attributeValue ) { String methodName = "get" + Character . toUpperCase ( attributeName . charAt ( 0 ) ) + attributeName . substring ( 1 ) ; for ( E element : this ) if ( element != null ) try { Object value = element . getClass ( ) . getMethod ( methodName ) . invoke ( ele...
Returns the first element in this list with a matching attribute value .
40,857
public E getById ( String id ) { if ( id == null ) { for ( E element : this ) { if ( element != null && element . getId ( ) == null ) { return element ; } } } else { for ( E element : this ) { if ( element != null && id . equals ( element . getId ( ) ) ) { return element ; } } } return null ; }
Returns the first element in this list with a matching identifier
40,858
public E removeById ( String id ) { E element = this . getById ( id ) ; if ( element != null ) { this . remove ( element ) ; } return element ; }
Removes the first element in this list with a matching identifier
40,859
public E getOrCreateById ( String id , Class < E > type ) throws IllegalAccessException , InstantiationException { E element = this . getById ( id ) ; if ( element == null ) { element = type . newInstance ( ) ; element . setId ( id ) ; this . add ( element ) ; } return element ; }
Returns the first element in this list with a matching identifier or adds a new element to the end of this list and sets the identifier
40,860
public final static TrmMessageType getTrmMessageType ( int aValue ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Value = " + aValue ) ; return set [ aValue ] ; }
Returns the corresponding TrmMessageType for a given integer . 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 .
40,861
public V getService ( K key ) { ComponentContext ctx = context ; if ( ctx == null || key == null ) return null ; ConcurrentServiceReferenceElement < V > e = elementMap . get ( key ) ; if ( e == null ) { return null ; } else { return e . getService ( ctx ) ; } }
Retrieve the service associated with key .
40,862
public ServiceReference < V > getReference ( K key ) { if ( key == null ) return null ; ConcurrentServiceReferenceElement < V > e = elementMap . get ( key ) ; if ( e == null ) { return null ; } else { return e . getReference ( ) ; } }
Returns the ServiceReference associated with key
40,863
public static List < ProductExtensionInfo > getProductExtensions ( File installDir ) { ArrayList < ProductExtensionInfo > productList = new ArrayList < ProductExtensionInfo > ( ) ; Set < String > extensionsSoFar = new HashSet < String > ( ) ; HashMap < String , Properties > embedderProductExtensions = getExtraProductEx...
Get a list of configured product extensions .
40,864
public static ProductExtensionInfo getProductExtension ( String extensionName ) throws IOException { ProductExtensionInfo productExtensionInfo = null ; List < ProductExtensionInfo > productExtensionList = getProductExtensions ( Utils . getInstallDir ( ) ) ; for ( ProductExtensionInfo currentProductExtension : productEx...
Find and return a particular configured product extension .
40,865
public void start ( BundleContext context ) { initialContextFactories = initServiceTracker ( context , InitialContextFactory . class , ServiceTrackerCustomizers . ICF_CACHE ) ; objectFactories = initServiceTracker ( context , ObjectFactory . class , ServiceTrackerCustomizers . URL_FACTORY_CACHE ) ; icfBuilders = initSe...
private BundleTracker bt = null ;
40,866
public void initialize ( Map < String , Object > configProps ) throws WIMException { try { reposId = ( String ) configProps . get ( KEY_ID ) ; setCustomProperties ( ( List < Map < String , String > > ) configProps . get ( ConfigConstants . CONFIG_DO_CUSTOM_PROPERTIES ) ) ; setMapping ( ) ; setBaseEntry ( configProps ) ...
Initializes the user registry for use by the adapter .
40,867
private void setBaseEntry ( Map < String , Object > configProps ) throws WIMException { baseEntryName = ( String ) configProps . get ( BASE_ENTRY ) ; if ( baseEntryName == null ) { throw new WIMApplicationException ( WIMMessageKey . MISSING_BASE_ENTRY , Tr . formatMessage ( tc , WIMMessageKey . MISSING_BASE_ENTRY , WIM...
Set the baseEntryname from the configuration . The configuration should have only 1 baseEntry
40,868
private void setCustomProperties ( List < Map < String , String > > propList ) throws WIMException { final String METHODNAME = "setCustomProperties" ; customPropertyMap = new HashMap < String , String > ( ) ; if ( propList == null ) { return ; } Iterator < Map < String , String > > itr = propList . iterator ( ) ; while...
Set Custom UR Bridge properties .
40,869
private void setConfigEntityMapping ( Map < String , Object > configProps ) throws WIMException { List < String > entityTypes = getSupportedEntityTypes ( ) ; String rdnProp ; String type = null ; entityConfigMap = new HashMap < String , String > ( ) ; for ( int i = 0 ; i < entityTypes . size ( ) ; i ++ ) { type = entit...
Set the mapping of RDN properties for each entity type . A map is created with the key as the entity type and the value as the RDN property to be used . This information is taken from the configuration .
40,870
private String validateEntity ( Entity entity ) throws WIMException { String METHODNAME = "validateEntity" ; String type = null ; String secName = null ; String uniqueId = null ; String uniqueName = null ; if ( entity . getIdentifier ( ) . isSet ( SchemaConstants . PROP_UNIQUE_NAME ) ) { uniqueName = entity . getIdenti...
if type is null throw ENFE to be handled by get API .
40,871
private String getSecNameFromUniqueID ( String uniqueId ) throws WIMException { String METHODNAME = "getSecNameFromUniqueID" ; String secName = null ; try { secName = getUserSecurityName ( uniqueId ) ; } catch ( EntryNotFoundException e ) { try { secName = getGroupSecurityName ( uniqueId ) ; } catch ( com . ibm . ws . ...
Since UserRegistry throws CustomRegistryException in case of secName not found modify code to handle CustomRegistryException similar to EntryNotFoundException .
40,872
private String getRDN ( String name ) { if ( name == null ) { return name ; } int indexOfEqual = name . indexOf ( '=' ) ; if ( indexOfEqual < 0 ) { return name ; } String rdnValue = name . substring ( 0 , indexOfEqual ) ; return rdnValue ; }
The method reads the uniqueName of the user and returns the rdn property
40,873
@ FFDCIgnore ( Exception . class ) public boolean isEntityInRealm ( String uniqueName ) { if ( isSafRegistry ( ) ) { try { return userRegistry . isValidUser ( uniqueName ) ; } catch ( Exception e ) { } try { return userRegistry . isValidGroup ( uniqueName ) ; } catch ( Exception e ) { } } else { try { SearchResult resu...
Is the entity in this realm?
40,874
private void setFields ( Connection connection , JFapByteBuffer buffer , int priority , boolean isPooled , boolean isExchange , int segmentType , int conversationId , int requestNumber , Conversation conversation , SendListener sendListener , boolean isTerminal , int size ) { this . connection = connection ; this . buf...
Helper method which sets up fields in this class .
40,875
private void reset ( Connection connection , JFapByteBuffer buffer , int priority , boolean isPooled , boolean isExchange , int segmentType , int conversationId , int requestNumber , Conversation conversation , SendListener sendListener , boolean isTerminal , int size ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( ...
Resets the iterator so it is read for use with a new piece of user data .
40,876
public boolean hasNext ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "hasNext" ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "hasNext" , "" + transmissionsRemaining ) ; return transmissionsRemaining ; }
Returns true if this iterator contains more transmission data objects .
40,877
protected static TransmissionDataIterator allocateFromPool ( Connection connection , JFapByteBuffer buffer , int priority , boolean isPooled , boolean isExchange , int segmentType , int conversationId , int requestNumber , Conversation conversation , SendListener sendListener , boolean isTerminal , int size ) { if ( tc...
Allocates an instance of this class from a pool
40,878
protected void release ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "release" ) ; if ( ! transmissionsRemaining ) { if ( tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "no more transmissions remaining - repooling" ) ; if ( buffer != null ) { buffer . release ( ) ; } connection = null ; conver...
Returns a previously allocated instance of this class to the pool
40,879
protected int getPriority ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getPriority" ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getPriority" , "" + priority ) ; return priority ; }
Returns the priority for data transmissions in this iterator
40,880
protected void setPriority ( int priority ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setPriority" , "" + priority ) ; this . priority = priority ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "setPriority" ) ; }
Sets the priority for data transmissions in this iterator . This is used when data is enqueued to the priority queue with the lowest available option set - and we need to assigne it a hard priority
40,881
protected int getSize ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getSize" ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getSize" , "" + size ) ; return size ; }
Returns the size of the payload data the user requested tranmitted .
40,882
public static boolean isDebugEnabled ( ) { String value = System . getProperty ( DEBUG_PROPERTY ) ; if ( value != null && "true" . equalsIgnoreCase ( value ) ) { return true ; } return false ; }
Since logger is not activated while processing premain the trace data needs to be logged by using System . out .
40,883
private String getDefaultPackageExtension ( ) { if ( "z/OS" . equalsIgnoreCase ( bootProps . get ( "os.name" ) ) ) { return "pax" ; } if ( PackageProcessor . IncludeOption . RUNNABLE . matches ( includeOption ) ) { return "jar" ; } return "zip" ; }
Determine the default package format for the current operating system .
40,884
public static ASN1Set getInstance ( Object obj ) { if ( obj == null || obj instanceof ASN1Set ) { return ( ASN1Set ) obj ; } throw new IllegalArgumentException ( "unknown object in getInstance" ) ; }
return an ASN1Set from the given object .
40,885
public Conduit getConduit ( EndpointInfo endpointInfo , EndpointReferenceType target ) throws IOException { LibertyHTTPConduit conduit = new LibertyHTTPConduit ( bus , endpointInfo , target ) ; String address = conduit . getAddress ( ) ; if ( address != null && address . indexOf ( '?' ) != - 1 ) { address = address . s...
set the auto - redirect to true
40,886
protected static final void setRSAKey ( byte [ ] [ ] key ) { BigInteger [ ] k = new BigInteger [ 8 ] ; for ( int i = 0 ; i < 8 ; i ++ ) { if ( key [ i ] != null ) { k [ i ] = new BigInteger ( 1 , key [ i ] ) ; } } if ( k [ 3 ] . compareTo ( k [ 4 ] ) < 0 ) { BigInteger tmp ; tmp = k [ 3 ] ; k [ 3 ] = k [ 4 ] ; k [ 4 ] ...
Set the key for RSA algorithms .
40,887
protected static final byte [ ] encrypt ( byte [ ] data , byte [ ] key , String cipher ) throws Exception { SecretKey sKey = constructSecretKey ( key , cipher ) ; Cipher ci = createCipher ( Cipher . ENCRYPT_MODE , key , cipher , sKey ) ; return ci . doFinal ( data ) ; }
Encrypt the data .
40,888
protected static final byte [ ] decrypt ( byte [ ] msg , byte [ ] key , String cipher ) throws Exception { SecretKey sKey = constructSecretKey ( key , cipher ) ; Cipher ci = createCipher ( Cipher . DECRYPT_MODE , key , cipher , sKey ) ; return ci . doFinal ( msg ) ; }
Decrypt the specified msg .
40,889
public void populatePrefixTable ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( TRACE , "populatePrefixTable" ) ; } prefixTable = new HashMap < Class , String > ( ) ; prefixTable . put ( Boolean . class , PREFIX_BOOLEAN ) ; prefixTable . put ( Integer . class , PREF...
Populates the prefix table for use when creating a Reference to a ConnFactory . Creates a map between supported data types for properties and the prefix used to store them .
40,890
public Map getMapFromReference ( final Reference ref , final Map defaults ) { if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , "getMapFromReference" , new Object [ ] { ref , defaults } ) ; } Map extractedProps = null ; synchronized ( ref ) { Enumeration prop...
Uses the reference passed in to extract a map of properties which have been stored in this Reference .
40,891
public void populateReference ( final Reference reference , final Map properties , final Map defaults ) { if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , "populateReference" , new Object [ ] { reference , properties , defaults } ) ; } synchronized ( propert...
Dynamically populates the reference that it has been given using the properties currently stored in this ConnectionFactory . Note that this way of doing things automatically handles the adding of extra properties without the need to change this code .
40,892
protected void setCommsConnection ( CommsConnection cc ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setCommsConnection" ) ; validateConversationState ( ) ; sConState . setCommsConnection ( cc ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "setCommsConnection" ) ; }
Sets the CommsConnection associated with this Conversation
40,893
public ConversationReceiveListener acceptConnection ( Conversation cfConversation ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "acceptConnection" ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "acceptConnection" ) ; return genericTransportRecieveListnerInstance ; }
Notified when a new conversation is accepted by a listening socket .
40,894
public static QueuedMessage createSIBQueuedMessage ( SIMPQueuedMessageControllable qmc ) { String id = null ; int jsApproximateLength = 0 ; String name = null ; String state = null ; String transactionId = null ; String type = null ; String busSystemMessageId = null ; id = qmc . getId ( ) ; name = qmc . getName ( ) ; s...
Create a SIBQueuedMessageImpl instance from the supplied SIMPQueuedMessageControllable .
40,895
public static MessagingSubscription createSIBSubscription ( SIMPLocalSubscriptionControllable ls ) { long depth = 0 ; String id = null ; int maxMsgs = 0 ; String name = null ; String selector = null ; String subscriberId = null ; String [ ] topics = null ; depth = ls . getNumberOfQueuedMessages ( ) ; id = ls . getId ( ...
Create a MessagingSubscription instance from the supplied SIMPLocalSubscriptionControllable .
40,896
private static NLS getNLS ( Locale l , String resourceBundle , String statsType ) { boolean bDefaultLocale = false ; if ( l == null || l == Locale . getDefault ( ) ) { bDefaultLocale = true ; l = Locale . getDefault ( ) ; } NLS aNLS = null ; if ( resourceBundle == null ) { int trial = 1 ; do { if ( trial == 1 ) resourc...
in which case we dont cache
40,897
public static PmiModuleConfig getStatsConfig ( String statsType ) { PmiModuleConfig cfg = ( PmiModuleConfig ) rawConfigMap . get ( statsType ) ; if ( cfg == null ) cfg = _getStatsConfig ( statsType , false , null ) ; return cfg ; }
No translation .
40,898
public static PmiModuleConfig getTranslatedStatsConfig ( String statsType , Locale locale ) { PmiModuleConfig aCfg = getConfig ( locale , statsType ) ; if ( aCfg == null ) aCfg = _getStatsConfig ( statsType , true , locale ) ; return aCfg ; }
Translated based on the server locale
40,899
public static void translateAndCache ( PmiModuleConfig cfg , Locale l ) { PmiModuleConfig aCfg = getConfig ( l , cfg . getUID ( ) ) ; if ( aCfg == null ) { aCfg = cfg . copy ( ) ; if ( aCfg != null ) { PmiDataInfo [ ] data = aCfg . listData ( null ) ; for ( int k = data . length - 1 ; k >= 0 ; k -- ) { if ( data [ k ] ...
called by PmiRegistry .