idx
int64
0
41.2k
question
stringlengths
83
4.15k
target
stringlengths
5
715
40,200
private void preRegisterMBeanServerPipelineService ( final BundleContext systemContext ) { PlatformMBeanServerBuilder . addPlatformMBeanServerBuilderListener ( new PlatformMBeanServerBuilderListener ( ) { @ FFDCIgnore ( IllegalStateException . class ) public void platformMBeanServerCreated ( final MBeanServerPipeline p...
Delayed registration of the platform MBeanServerPipeline in the OSGi registry .
40,201
protected Framework startFramework ( BootstrapConfig config ) throws BundleException { config . put ( org . osgi . framework . Constants . FRAMEWORK_BEGINNING_STARTLEVEL , Integer . toString ( KernelStartLevel . OSGI_INIT . getLevel ( ) ) ) ; fwkClassloader = config . getFrameworkClassloader ( ) ; FrameworkFactory fwkF...
Create and start a new instance of an OSGi framework using the provided properties as framework properties .
40,202
private boolean handleEquinoxRuntimeException ( RuntimeException ex ) { Throwable cause = ex . getCause ( ) ; if ( cause != null ) { if ( cause instanceof IOException ) { File osgiDir = config . getWorkareaFile ( OSGI_DIR_NAME ) ; if ( ! osgiDir . exists ( ) || ! osgiDir . isDirectory ( ) || ! osgiDir . canWrite ( ) ) ...
Attempt to diagnose Equinox exceptions and issue a sane error message rather than a massive equinox stack
40,203
public boolean waitForReady ( ) throws InterruptedException { if ( waitForFramework ( ) == null ) { return false ; } frameworkLaunched . await ( ) ; if ( ! frameworkLaunchSuccess ) { return false ; } Collection < ServiceReference < FrameworkReady > > readyServiceRefs ; try { readyServiceRefs = systemBundleCtx . getServ...
Waits for the server to become ready .
40,204
private void addShutdownHook ( boolean isClient ) { if ( shutdownHook == null ) { shutdownHook = new ShutdownHook ( isClient ) ; Runtime . getRuntime ( ) . addShutdownHook ( shutdownHook ) ; } }
Attach a shutdown hook to make sure that the framework is shutdown nicely in most cases . There are ways of shutting a JVM down that don t use the shutdown hook but this catches most cases .
40,205
public void introspectFramework ( String timestamp , Set < JavaDumpAction > javaDumpActions ) { Tr . audit ( tc , "info.introspect.request.received" ) ; File dumpDir = config . getOutputFile ( BootstrapConstants . SERVER_DUMP_FOLDER_PREFIX + timestamp + "/" ) ; if ( ! dumpDir . exists ( ) ) { throw new IllegalStateExce...
Introspect the framework Get all IntrospectableService from OSGi bundle context and dump a running server status from them .
40,206
public final static TrmFirstContactMessageType getTrmFirstContactMessageType ( int aValue ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Value = " + aValue ) ; return set [ aValue ] ; }
Returns the corresponding TrmFirstContactMessageType 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,207
public Socket createSocket ( String host , int port ) throws IOException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "SocketFactory attempting to create socket for host: " + host + " port: " + port ) ; if ( Util . isEncodedHost ( host , HOST_PROTOCOL ) ) { String sslCo...
Create a client socket of the appropriate type using the provided address and port information .
40,208
@ FFDCIgnore ( IOException . class ) public Socket createSelfConnection ( InetAddress address , int port ) throws IOException { try { SocketInfo info = null ; for ( SocketInfo test : socketInfos ) { if ( test . port == port && test . addr . equals ( address ) ) { info = test ; } } if ( info == null ) { throw new IOExce...
Create a loopback connection to the hosting ORB .
40,209
public ServerSocket createServerSocket ( int port , int backlog , InetAddress address , String [ ] params ) throws IOException { try { ServerSocket socket ; String sslConfigName = null ; boolean soReuseAddr = true ; for ( int i = 0 ; i < params . length - 1 ; i ++ ) { String param = params [ i ] ; if ( "--sslConfigName...
Create a server socket for this connection .
40,210
private SSLSocketFactory getSocketFactory ( String id ) throws IOException { SSLSocketFactory socketFactory = socketFactoryMap . get ( id ) ; if ( socketFactory == null ) { if ( id == null ) { socketFactory = ( SSLSocketFactory ) SSLSocketFactory . getDefault ( ) ; } else { try { socketFactory = sslConfig . createSSLFa...
On - demand creation of an SSL socket factory for the ssl alias provided
40,211
private SSLServerSocketFactory getServerSocketFactory ( String id ) throws IOException { SSLServerSocketFactory serverSocketFactory = serverSocketFactoryMap . get ( id ) ; if ( serverSocketFactory == null ) { if ( id == null ) { serverSocketFactory = ( SSLServerSocketFactory ) SSLServerSocketFactory . getDefault ( ) ; ...
On - demand creation of an SSL server socket factory for an ssl alias
40,212
private void configureServerSocket ( SSLServerSocket serverSocket , SSLServerSocketFactory serverSocketFactory , String sslConfigName , OptionsKey options ) throws IOException { try { String [ ] cipherSuites = sslConfig . getCipherSuites ( sslConfigName , serverSocketFactory . getSupportedCipherSuites ( ) ) ; serverSoc...
Set the server socket configuration to our required QOS values .
40,213
private Collection < String > getRolesForSpecialSubject ( String resourceName , String specialSubject ) { int found = 0 ; Collection < String > roles = null ; FeatureAuthorizationTableService featureAuthzTableSvc = featureAuthzTableServiceRef . getService ( ) ; String featureAuthzRoleHeaderValue = null ; if ( featureAu...
Check all of the authorization table services for the resourceName . If no authorization table can be found for the resourceName null is returned . If more than one authorization table can be found for the resourceName null is returned .
40,214
private boolean isSubjectAuthorized ( String resourceName , Collection < String > requiredRoles , Subject subject ) { AccessDecisionService accessDecisionService = accessDecisionServiceRef . getService ( ) ; boolean isGranted = false ; WSCredential wsCred = getWSCredentialFromSubject ( subject ) ; String accessId = get...
Check if the Subject is authorized to the required roles for a given resource . The user is checked first and if it s not authorized then each group is checked .
40,215
private WSCredential getWSCredentialFromSubject ( Subject subject ) { if ( subject != null ) { java . util . Collection < Object > publicCreds = subject . getPublicCredentials ( ) ; if ( publicCreds != null && publicCreds . size ( ) > 0 ) { java . util . Iterator < Object > publicCredIterator = publicCreds . iterator (...
Get the WSCredential from the given Subject
40,216
private String getAccessId ( WSCredential cred ) { String accessId = null ; try { accessId = cred . getAccessId ( ) ; } catch ( CredentialExpiredException e ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Caught exception getting the access id: " + e ) ; } } catch ( C...
Get the access ID from the specified credential .
40,217
@ SuppressWarnings ( "unchecked" ) private String [ ] getGroupIds ( WSCredential cred ) { Collection < String > ids = null ; if ( cred != null ) { try { ids = cred . getGroupIds ( ) ; } catch ( CredentialExpiredException e ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc ...
Get the group IDs from the specified credential .
40,218
protected boolean isAllAuthenticatedGranted ( String resourceName , Collection < String > requiredRoles , Subject subject ) { Collection < String > roles = getRolesForSpecialSubject ( resourceName , AuthorizationTableService . ALL_AUTHENTICATED_USERS ) ; AccessDecisionService accessDecisionService = accessDecisionServi...
Check if the special subject ALL_AUTHENTICATED_USERS is mapped to the requiredRole .
40,219
private boolean isSubjectValid ( Subject subject ) { final WSCredential wsCred = getWSCredentialFromSubject ( subject ) ; if ( wsCred == null ) { return false ; } else { return ! wsCred . isUnauthenticated ( ) && ! wsCred . isBasicAuth ( ) ; } }
Check if the subject has a WScredential is authenticated and is not a basic auth credential .
40,220
private String getRealmName ( WSCredential cred ) { String realmName = null ; if ( cred != null ) { try { realmName = cred . getRealmName ( ) ; } catch ( Exception e ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Caught exception getting the realm name: " + e ) ; } }...
Get the realm name from the specified credential .
40,221
final void init ( ) throws DiagnosticModuleRegistrationFailureException { if ( initialized ) { return ; } initialized = true ; Method [ ] methods = getClass ( ) . getMethods ( ) ; for ( Method method : methods ) { String name = method . getName ( ) . toLowerCase ( ) ; if ( name . startsWith ( FFDC_DUMP_PREFIX ) ) { Cla...
The init method is provided to subclasses to initialize this particular DiagnosticModule . Called when the diagnostic module is registered .
40,222
public final boolean dumpComponentData ( String [ ] input_directives , Throwable ex , IncidentStream ffdcis , Object callerThis , Object [ ] catcherObjects , String sourceId , String [ ] callStack ) { startProcessing ( ) ; try { ffdcis . writeLine ( "==> Performing default dump from " + getClass ( ) . getName ( ) + " "...
This method is invoked to instruct the diagnostic module to capture all relevant information that it has about a particular incident
40,223
public final void getDataForDirectives ( String [ ] directives , Throwable ex , IncidentStream ffdcis , Object callerThis , Object [ ] catcherObjects , String sourceId ) { if ( directives == null || directives . length <= 0 || ! continueProcessing ( ) ) return ; for ( String s : directives ) { String sName = s . toLowe...
Invoke all the ffdcdump methods for a set of directives
40,224
private final void invokeDiagnosticMethod ( Method m , Throwable ex , IncidentStream ffdcis , Object callerThis , Object [ ] catcherObjects , String sourceId ) { try { m . invoke ( this , new Object [ ] { ex , ffdcis , callerThis , catcherObjects , sourceId } ) ; ffdcis . writeLine ( "+ Data for directive [" + m . getN...
Invoke dump method
40,225
public final boolean validate ( ) { if ( makeNoise ( ) ) { System . out . println ( "This method is NOT intended to be called from the runtime" ) ; System . out . println ( "but is provided as part of unit test for diagnostic modules" ) ; ListIterator < Method > im ; try { init ( ) ; System . out . println ( "default d...
Validate whether the diagnostic module is correctly coded . Method can be used as a simple validation of a components diagnostic module . The information printed can be used during the development of the DM .
40,226
private boolean continueProcessing ( ) { Boolean currentValue = _continueProcessing . get ( ) ; if ( currentValue != null ) return currentValue . booleanValue ( ) ; return true ; }
Check the the ThreadLocal to see if we should continue processing this FFDC exception
40,227
public static int [ ] parseSpecStr ( String in ) { if ( in == null ) { return new int [ 0 ] ; } in = in . replaceAll ( " " , "" ) ; in = in . trim ( ) ; if ( in . length ( ) == 0 ) { return new int [ 0 ] ; } String [ ] tokens = in . split ( "," ) ; int [ ] toReturn = new int [ tokens . length ] ; for ( int i = 0 ; i < ...
Helper function to parse the configuration s spec strings .
40,228
public static SelectionCriteriaFactory getInstance ( ) { if ( _instance == null ) { synchronized ( SIDestinationAddressFactory . class ) { try { Class cls = Class . forName ( MESSAGE_SELECTOR_FACTORY_CLASS ) ; _instance = ( SelectionCriteriaFactory ) cls . newInstance ( ) ; } catch ( Exception e ) { FFDCFilter . proces...
Get the singleton SIDestinationAddressFactory which is to be used for creating SIDestinationAddress instances .
40,229
private void setValue ( Object newValue ) { try { if ( this . type == null ) value = newValue ; else if ( this . type . equals ( "java.lang.String" ) ) value = newValue ; else if ( this . type . equals ( "java.lang.Boolean" ) ) value = Boolean . valueOf ( ( String ) newValue ) ; else if ( this . type . equals ( "java.l...
should be identical to version 1 . 3 except newValue is of type Object .
40,230
public void addSelectionCriteria ( SelectionCriteria selCriteria ) throws SIDiscriminatorSyntaxException , SISelectorSyntaxException , SIResourceException { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "addSelectionCriteria" , new Object [ ] { selCriteria } ) ; boolean duplicateCriteria = _consumerDispatcher . g...
Add an additional selection criteria to the to the subscription Duplicate selection criterias are ignored
40,231
public SelectionCriteria [ ] getSelectionCriteria ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getSelectionCriteria" ) ; SelectionCriteria [ ] list = _consumerDispatcher . getConsumerDispatcherState ( ) . getSelectionCriteriaList ( ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getSelectionCriter...
List existing selection criterias registered with the subscription
40,232
public void setUserProperties ( Map userData ) throws SIResourceException { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setUserProperties" , new Object [ ] { userData } ) ; _consumerDispatcher . getConsumerDispatcherState ( ) . setUserData ( userData ) ; Transaction tran = _messageProcessor . getTXManager ( ) ...
Store a map of user properties with a subscription The map provided on this call will replace any existing map stored with the subscription
40,233
public Map getUserProperties ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getUserProperties" ) ; Map map = _consumerDispatcher . getConsumerDispatcherState ( ) . getUserData ( ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getUserProperties" , map ) ; return map ; }
Get the map currently stored with the subscription
40,234
public String getSubscriberId ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getSubscriberId" ) ; String subscriberId = _consumerDispatcher . getConsumerDispatcherState ( ) . getSubscriberID ( ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getSubscriberId" , subscriberId ) ; return subscriberId ; }
Get subscriberID for this subscription
40,235
public String getWPMTopicSpaceName ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getWPMTopicSpaceName" ) ; String tsName = _consumerDispatcher . getConsumerDispatcherState ( ) . getTopicSpaceName ( ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getWPMTopicSpaceName" , tsName ) ; return tsName ; }
Get WPMTopicSpaceName for this subscription
40,236
public String getMEName ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getMEName" ) ; String meName = _messageProcessor . getMessagingEngineName ( ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getMEName" , meName ) ; return meName ; }
Get MEName for this subscription
40,237
public int getLocalId ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getLocalId" ) ; int localId = 0 ; final TransactionImpl tran = ( ( TranManagerSet ) TransactionManagerFactory . getTransactionManager ( ) ) . getTransactionImpl ( ) ; if ( tran != null ) { localId =...
Returns a process - unique identifier for the transaction currently associated with the calling thread . The local - id is valid only within the local process . The local - id is recovered as part of the state of a recovered transaction .
40,238
public static void beforeCompletion ( TransactionImpl tran , int syncLevel ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "beforeCompletion" , new Object [ ] { tran , syncLevel } ) ; if ( syncLevel >= 0 ) { final ArrayList syncs = _syncLevels . get ( syncLevel ) ; if ( ...
Notify all the registered syncs of the begin of the completion phase of the given transaction
40,239
public static void afterCompletion ( TransactionImpl tran , int status , int syncLevel ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "afterCompletion" , new Object [ ] { tran , status , syncLevel } ) ; if ( syncLevel >= 0 ) { final ArrayList syncs = _syncLevels . get (...
Notify all the registered syncs of the end of the completion phase of the given transaction . The completion resulted in the transaction having the given status .
40,240
public static boolean callbacksRegistered ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "callbacksRegistered" ) ; if ( _syncLevel < 0 ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "callbacksRegistered" , Boolean . FAL...
which can still be called otherwise false .
40,241
private static void garbageCollectUnusedLevels ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "garbageCollectUnusedLevels" ) ; final int numLevels = _syncLevels . size ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "...
Null out levels that will never be referenced again . Null entries are candidates to be the next current level .
40,242
private static void setLevel ( ArrayList level ) { _syncLevel = nextLevel ( ) ; if ( _syncLevel == _syncLevels . size ( ) ) { _syncLevels . add ( level ) ; } else { _syncLevels . set ( _syncLevel , level ) ; } }
Utility method to make a list into the new current level
40,243
private void validateParameters ( String filePath , String password , int validity , String subjectDN , int keySize , String sigAlg ) { if ( ! validateFilePath ( filePath ) ) { throw new IllegalArgumentException ( "filePath must be a valid filePath within the file system." ) ; } if ( password == null || password . leng...
Validate the parameters .
40,244
private boolean validateFilePath ( String filePath ) { if ( filePath == null || filePath . isEmpty ( ) ) { throw new IllegalArgumentException ( "filePath must be a valid filePath within the file system." ) ; } File loc = new File ( filePath ) . getAbsoluteFile ( ) ; return ( loc . exists ( ) || loc . getParentFile ( ) ...
The specified filePath must either exist or in the case the file should be created its parent directory .
40,245
public < K2 extends K , E2 extends E > BlockingList < K2 , E2 > make ( ) { @ SuppressWarnings ( "unchecked" ) BlockingListMaker < K2 , E2 > stricterThis = ( BlockingListMaker < K2 , E2 > ) this ; return stricterThis . internalCreateBlockingList ( ) ; }
Construct a list
40,246
public BlockingListMaker < K , E > log ( Logger logger ) { this . logger = logger == null ? NULL_LOGGER : logger ; return this ; }
Define the logger to use to log interesting events within the list
40,247
public BlockingListMaker < K , E > waitFor ( long time , TimeUnit unit ) { this . nanoTimeout = time == 0 ? 1 : NANOSECONDS . convert ( time , unit ) ; return this ; }
Specify the total time to wait for the elements of the list to become available
40,248
public String getSystemMessageId ( ) { if ( uuid != null ) { StringBuilder buff = new StringBuilder ( uuid . toString ( ) ) ; buff . append ( MfpConstants . MESSAGE_HANDLE_SEPARATOR ) ; buff . append ( value ) ; return new String ( buff ) ; } else { return null ; } }
Returns the SIMessageHandles System Message ID .
40,249
private void processExistingWSDL ( String wsdlLocation , Member newMember ) throws InjectionException { if ( wsrInfo . getWsdlLocation ( ) != null && ! "" . equals ( wsrInfo . getWsdlLocation ( ) ) ) { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "For the " + wsrInfo . getJndiName ( ) + " service reference, " + "...
This will compare the wsdlLocation attribute of the various annotations that have refer to the same service reference . If they differ we will throw an exception as the runtime will not be able to determine which WSDL to use . We will only do this checking if there was not a WSDL location specified in the deployment de...
40,250
public int compare ( Object o1 , Object o2 ) { String re1 = ( ( ConnectionStatus ) o1 ) . getRemoteEngineName ( ) ; String re2 = ( ( ConnectionStatus ) o2 ) . getRemoteEngineName ( ) ; return re1 . compareTo ( re2 ) ; }
If o1 comes after o2 return 1
40,251
public synchronized void put ( byte item ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "put" , Byte . valueOf ( item ) ) ; checkValid ( ) ; getCurrentByteBuffer ( 1 ) . put ( item ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) ...
Puts a single byte into the byte buffer .
40,252
public synchronized void putShort ( short item ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "putShort" , Short . valueOf ( item ) ) ; checkValid ( ) ; getCurrentByteBuffer ( 2 ) . putShort ( item ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEn...
Puts a short into the byte buffer .
40,253
public synchronized void putInt ( int item ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "putInt" , Integer . valueOf ( item ) ) ; checkValid ( ) ; getCurrentByteBuffer ( 4 ) . putInt ( item ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEna...
Puts an int into the byte buffer .
40,254
public synchronized void putLong ( long item ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "putLong" , Long . valueOf ( item ) ) ; checkValid ( ) ; getCurrentByteBuffer ( 4 ) . putLong ( item ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEn...
Puts a long into the byte buffer .
40,255
public synchronized void setReadOnly ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setReadOnly" ) ; for ( int x = 0 ; x < dataList . size ( ) ; x ++ ) { WsByteBuffer buff = dataList . get ( x ) ; buff . setReadOnly ( true ) ; } if ( TraceComponent . isAnyT...
This method sets all the byte buffers that we have in the list as read only .
40,256
public synchronized long prepareForTransmission ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "prepareForTransmission" ) ; checkValid ( ) ; valid = false ; if ( dataList . size ( ) > 0 ) { WsByteBuffer buff = dataList . get ( dataList . size ( ) - 1 ) ; buf...
This method prepares the byte buffers wrapped by this class for transmission . In practise this means that all the buffers are flipped and the number of bytes that will be transmitted is returned .
40,257
public synchronized WsByteBuffer [ ] getBuffersForTransmission ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getBufferForTransmission" ) ; checkNotValid ( ) ; WsByteBuffer [ ] bufferArray = new WsByteBuffer [ dataList . size ( ) ] ; for ( int x = 0 ; x < d...
This method is called just before this buffer is due to be transmitted by the JFap channel . When calling this method the underlying byte buffer is prepared by setting the correct limits and the buffer is added to a List that is returned . Once this method is called the buffer may not be used again and any attempt to m...
40,258
protected WsByteBuffer getCurrentByteBuffer ( int sizeNeeded ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getCurrentByteBuffer" , Integer . valueOf ( sizeNeeded ) ) ; WsByteBuffer byteBuffer = null ; if ( dataList . size ( ) == 0 ) { if ( TraceComponent . i...
This method will return a byte buffer that can be written to for the amount of data that needs to be written . If there is no room left in the current byte buffer a new one will be created and added to the list .
40,259
private WsByteBuffer createNewWsByteBuffer ( int sizeNeeded ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "createNewWsByteBuffer" , Integer . valueOf ( sizeNeeded ) ) ; if ( sizeNeeded < DEFAULT_BUFFER_SIZE ) { sizeNeeded = DEFAULT_BUFFER_SIZE ; } if ( TraceC...
This method will create a new WsByteBuffer . By default it will be created to hold 200 bytes but if the size needed is larger than this then the buffer will simply be allocated to hold the exact number of bytes requested .
40,260
public synchronized String getDumpReceivedBytes ( int bytesToDump ) { String dump = null ; if ( receivedBuffer != null ) { dump = getDumpBytes ( receivedBuffer , bytesToDump , false ) ; } return dump ; }
Returns the String that represents a dump of the bytes received in this comms byte buffer . This method is not intended to be used for buffers that are being contructed for outbound use .
40,261
private static String getDumpBytes ( WsByteBuffer buffer , int bytesToDump , boolean rewind ) { int pos = buffer . position ( ) ; if ( rewind ) { buffer . rewind ( ) ; } byte [ ] data = null ; int start ; int count = bytesToDump ; if ( count > buffer . remaining ( ) || count == ENTIRE_BUFFER ) count = buffer . remainin...
Returns a dump of the specified number of bytes of the specified buffer .
40,262
private int getIntKeyForString ( ArrayList < String > uniqueStrings , Object value ) { String stringValue = String . valueOf ( value ) ; int retval = uniqueStrings . indexOf ( stringValue ) ; if ( retval < 0 ) { retval = uniqueStrings . size ( ) ; uniqueStrings . add ( stringValue ) ; } return retval ; }
Helper method to get or assign a unique key to a string from an ArrayList containing the unique keys .
40,263
public static void writeObjectInstanceOutput ( final RESTResponse response , final ObjectInstanceWrapper value , final JSONConverter converter ) { response . setContentType ( APIConstants . MEDIA_TYPE_APPLICATION_JSON ) ; OutputStream outStream = null ; try { outStream = response . getOutputStream ( ) ; converter . wri...
Write ObjectInstanceWrapper to the response
40,264
public static StatsGroup createStatsGroup ( String groupName , String statsTemplate , StatsGroup parentGroup , ObjectName mBean , StatisticActions actionLsnr ) throws StatsFactoryException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , new StringBuffer ( "createStatsGroup:name=" ) . append ( groupName ) . append ( ...
Create a StatsGroup using the Stats template and add to the PMI tree under the specified parent group . This method will associate the MBean provided by the caller to the Stats group .
40,265
public static void removeStatsInstance ( StatsInstance instance ) throws StatsFactoryException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , new StringBuffer ( "removeStatsInstance:name=" ) . append ( instance . getName ( ) ) . toString ( ) ) ; StatsFactoryUtil . unRegisterStats ( ( PmiModule ) instance , instance...
Removes a StatsInstance from the PMI tree . Note that any children under the instance will also be removed . If the instance is associated with a default CustomStats MBean the MBean will be de - activated .
40,266
public static void removeStatsGroup ( StatsGroup group ) throws StatsFactoryException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , new StringBuffer ( "removeStatsGroup:name=" ) . append ( group . getName ( ) ) . toString ( ) ) ; StatsFactoryUtil . unRegisterStats ( ( PmiModule ) group , group . getMBean ( ) ) ; i...
Removes a StatsGroup from the PMI tree . Note that any children under the group will also be removed . If the group is associated with a default CustomStats MBean the MBean will be de - activated .
40,267
protected Validator createValidator ( ) throws JspException { if ( null == _minimum && null == _maximum ) { throw new JspException ( "a minimum and / or a maximum have to be specified" ) ; } ELContext elContext = FacesContext . getCurrentInstance ( ) . getELContext ( ) ; if ( null != _minimum ) { _min = getValue ( _min...
This method returns the Validator you have to cast it to the correct type and apply the min and max values .
40,268
private String incrementAlias ( KeyStore jKeyStore , String alias ) throws KeyStoreException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "incrementAlias: " + alias ) ; int num = 0 ; String base ; int index = alias . lastIndexOf ( '_' ) ; if ( - 1 == index ) { base = al...
Increment the trailing number on the alias value until one is found that does not currently exist in the input store .
40,269
public String getUserName ( boolean notAlternateUser ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getUserName" , new Object [ ] { new Boolean ( notAlternateUser ) } ) ; String userName = null ; if ( ! notAlternateUser && isAlternateUserBased ( ) ) { userName = alternateUser ; } else if ( isSubjectBased ( ) ...
Extract the appropriate username from this security context
40,270
public boolean isSIBServerSubject ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "isSIBServerSubject" ) ; boolean ispriv = false ; if ( isSubjectBased ( ) ) { if ( authorisationUtils != null ) { ispriv = authorisationUtils . isSIBServerSubject ( subject ) ; } } else if ( isMsgBased ( ) ) { if ( authorisation...
Check whether this security context belongs to the privileged SIBServerSubject or not .
40,271
public void complete ( VirtualConnection vc , TCPWriteRequestContext wsc ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "complete() called: vc=" + vc ) ; } HttpInboundServiceContextImpl mySC = ( HttpInboundServiceContextImpl ) vc . getStateMap ( ) . get ( CallbackIDs ...
Called by the channel below us when a write has finished .
40,272
public void error ( VirtualConnection vc , TCPWriteRequestContext wsc , IOException ioe ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "error called: vc=" + vc + " ioe=" + ioe ) ; } HttpInboundServiceContextImpl mySC = ( HttpInboundServiceContextImpl ) vc . getStateMa...
Called by the channel below us when an error occurs during a write .
40,273
protected void deactivate ( int reason ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Deactivating " + this , "reason=" + reason ) ; } this . cachedEncoding = null ; this . cachedLocale = null ; this . localeMap . clear ( ) ; this . converterMap . clear ( ) ; this . ...
DS deactivation method for this component .
40,274
private List < List < String > > processAcceptLanguage ( String acceptLanguage ) { StringTokenizer languageTokenizer = new StringTokenizer ( acceptLanguage , "," ) ; TreeMap < Double , List < String > > map = new TreeMap < Double , List < String > > ( Collections . reverseOrder ( ) ) ; List < String > list ; while ( la...
Processes the accept language header into a sublists based on the qvalue . Each sublist is a list of string values for a given qvalue and the overall list is ordered with preferred languages first .
40,275
private List < Locale > extractLocales ( List < List < String > > allLangs ) { List < Locale > rc = new ArrayList < Locale > ( ) ; for ( List < String > langList : allLangs ) { for ( String language : langList ) { String country = "" ; String variant = "" ; int countryIndex = language . indexOf ( '-' ) ; if ( countryIn...
Extract the locales from a passed in language list .
40,276
public Token getMetaDataToken ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( this , tc , "getMetaDataToken" ) ; SibTr . exit ( this , tc , "getMetaDataToken" , "return=" + _metaDataToken ) ; } return _metaDataToken ; }
startup of the message store
40,277
public void updateMetaDataOnly ( Transaction tran , Persistable persistable ) throws PersistenceException , ObjectManagerException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "updateMetaDataOnly" , new Object [ ] { "Tran=" + tran , "Persistable=" + persistabl...
Only update the persistent copy of the meta data associated with this Persistable . This variant is for a cached persistable in which the lock ID has been cached by the task .
40,278
public java . util . List < DataSlice > getData ( ) throws PersistentDataEncodingException , SevereMessageStoreException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getData" ) ; java . util . List < DataSlice > retval = null ; synchronized ( this ) { if ( _l...
This method is used by the task layer to get hold of data from the cache layer before it is hardened to disk . It should therefore return the data from the Item and not that from the ManagedObject .
40,279
public void setWasSpillingAtAddition ( boolean wasSpillingAtAddition ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setWasSpillingAtAddition" , Boolean . valueOf ( wasSpillingAtAddition ) ) ; _wasSpillingAtAddition = wasSpillingAtAddition ; if ( TraceComponen...
we need to correctly track the value of this flag .
40,280
public void setWriter ( Object sysLogHolder , Object sysErrHolder ) { this . sysOutHolder = ( SystemLogHolder ) sysLogHolder ; this . sysErrHolder = ( SystemLogHolder ) sysErrHolder ; }
Set the writers for SystemOut and SystemErr respectfully
40,281
public static SecurityMetadata getSecurityMetadata ( ) { SecurityMetadata secMetadata = null ; ModuleMetaData mmd = ComponentMetaDataAccessorImpl . getComponentMetaDataAccessor ( ) . getComponentMetaData ( ) . getModuleMetaData ( ) ; if ( mmd instanceof WebModuleMetaData ) { secMetadata = ( SecurityMetadata ) ( ( WebMo...
Get the security metadata
40,282
public CompoundName getFirstInChain ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getFirstInChain" ) ; CompoundName firstInChain = collector . getFirst ( ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getFirstInChain" , firstInChain ) ; return firstInChain ; }
Get the first compound name in any alias chain we re validating .
40,283
public void validate ( String destName , String busName ) throws SINotPossibleInCurrentConfigurationException { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "validate" , new Object [ ] { destName , busName } ) ; if ( collector . contains ( destName , busName ) ) { String chainText = toStringPlus ( destName , bus...
Check that the given destination busname combination has not been seen before when resolving an alias . If it has not been seen we add it to the map for checking next time .
40,284
public String toStringPlus ( String destName , String busName ) { StringBuffer sb = new StringBuffer ( toString ( ) ) ; String compoundName = new CompoundName ( destName , busName ) . toString ( ) ; sb . append ( " -> " ) ; sb . append ( compoundName ) ; return sb . toString ( ) ; }
Return a string representation of the alias chain appended with the destination name given .
40,285
private void initialize ( final File logDirectory , final String aaplName ) { if ( logDirectory == null ) { captureEnabled = false ; return ; } AccessController . doPrivileged ( new PrivilegedAction < Void > ( ) { public Void run ( ) { String captureDirStr = "JPATransform" + "/" + ( ( aaplName != null ) ? aaplName : "u...
Determines the existence of the server log directory and attempts to create a capture directory within the log directory . If this can be accomplished the field captureEnabled is set to true . Otherwise it is left to its default value false if the capture directory cannot be used .
40,286
private static boolean resourceExist ( ExternalContext externalContext , String path ) { if ( "/" . equals ( path ) ) { return true ; } Object ctx = externalContext . getContext ( ) ; if ( ctx instanceof ServletContext ) { ServletContext servletContext = ( ServletContext ) ctx ; InputStream stream = servletContext . ge...
doesnt exist . Otherwise the URL will fail on the first access .
40,287
public synchronized void addSlice ( CommsByteBuffer bufferContainingSlice , boolean last ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "addSlice" , new Object [ ] { bufferContainingSlice , last } ) ; slices . add ( bufferContainingSlice . getDataSlice ( ) ) ;...
This method will add a data slice to the list of slices for this message .
40,288
public void updateArrivalTime ( long messageArrivalTime ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "updateMessageArrivalTime" , messageArrivalTime ) ; this . arrivalTime = messageArrivalTime ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEn...
Used to update the message arrival time for this data .
40,289
public void stop ( int requestNumber , SendListener sendListener ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "stop" , requestNumber ) ; logicallyStarted = false ; super . stop ( requestNumber , sendListener ) ; if ( TraceComponent . isAnyTracingEnabled ( ) ...
Stops the session and marks it as stopped .
40,290
public void close ( int requestNumber ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "close" , requestNumber ) ; if ( asynchReader != null ) { try { mainConsumer . getConsumerSession ( ) . getConnection ( ) . removeConnectionListener ( asynchReader ) ; } catch...
Closes the session . If we are currently doing a receiveWithWait then that will be interrupted and a response will be sent to the client .
40,291
public void setAsynchConsumerCallback ( int requestNumber , int maxActiveMessages , long messageLockExpiry , int batchsize , OrderingContext orderContext ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setAsynchConsumerCallback" , new Object [ ] { requestNumbe...
This will cause the synchronous session to become asynchrnous . As such this class will not handle the session anymore so we inform the main consumer and that will then switch over the delegated class to handle the consumer .
40,292
public void postConstruct ( Object instance , Object creationMetaData ) throws InjectionProviderException { Class clazz = instance . getClass ( ) ; Method [ ] methods = getDeclaredMethods ( clazz ) ; if ( methods == null ) { methods = clazz . getDeclaredMethods ( ) ; Map < Class , Method [ ] > declaredMethodBeansMap = ...
Call postConstruct method on the specified instance .
40,293
private WebSphereCDIDeployment createWebSphereCDIDeployment ( Application application , Set < ExtensionArchive > extensionArchives ) throws CDIException { WebSphereCDIDeployment webSphereCDIDeployment = new WebSphereCDIDeploymentImpl ( application , cdiRuntime ) ; DiscoveredBdas discoveredBdas = new DiscoveredBdas ( we...
This method creates the Deployment structure with all it s BDAs .
40,294
private void addRuntimeExtensions ( WebSphereCDIDeployment webSphereCDIDeployment , DiscoveredBdas discoveredBdas ) throws CDIException { Set < WebSphereBeanDeploymentArchive > extensions = createExtensionBDAs ( webSphereCDIDeployment ) ; webSphereCDIDeployment . addBeanDeploymentArchives ( extensions ) ; for ( WebSphe...
Create a BDA for each runtime extension and add it to the deployment .
40,295
private Set < WebSphereBeanDeploymentArchive > createExtensionBDAs ( WebSphereCDIDeployment applicationContext ) throws CDIException { Set < WebSphereBeanDeploymentArchive > extensionBdas = new HashSet < WebSphereBeanDeploymentArchive > ( ) ; Set < ExtensionArchive > extensions = getExtensionArchives ( ) ; if ( extensi...
Create BDAs for all runtime extensions that cannot see application bdas
40,296
private void processModules ( WebSphereCDIDeployment applicationContext , DiscoveredBdas discoveredBdas , Collection < CDIArchive > moduleArchives ) throws CDIException { List < WebSphereBeanDeploymentArchive > moduleBDAs = new ArrayList < WebSphereBeanDeploymentArchive > ( ) ; for ( CDIArchive archive : moduleArchives...
Create BDAs for either the EJB Web or Client modules and any libraries they reference on their classpath .
40,297
private synchronized Set < ExtensionArchive > getExtensionArchives ( ) throws CDIException { if ( runtimeExtensionSet == null ) { runtimeExtensionSet = new HashSet < ExtensionArchive > ( ) ; Iterator < ServiceAndServiceReferencePair < WebSphereCDIExtension > > extensions = cdiRuntime . getExtensionServices ( ) ; while ...
Returns the extension container info with ContainerInfo classloader and container name
40,298
public int compareEntitysWithRespectToProperties ( Entity entity1 , Entity entity2 ) { List < SortKeyType > sortKeys = sortControl . getSortKeys ( ) ; int temp = 0 ; for ( int i = 0 ; i < sortKeys . size ( ) && temp == 0 ; i ++ ) { SortKeyType sortKey = ( SortKeyType ) sortKeys . get ( i ) ; String propName = sortKey ....
Compares the two entity data objects .
40,299
public List < Entity > sortEntities ( List < Entity > entities ) { if ( entities != null && entities . size ( ) > 0 ) { Entity [ ] ents = ( Entity [ ] ) entities . toArray ( new Entity [ entities . size ( ) ] ) ; WIMSortCompare < Entity > wimSortComparator = new WIMSortCompare < Entity > ( sortControl ) ; Arrays . sort...
Sorts the set of Member Objects