idx
int64
0
165k
question
stringlengths
73
4.15k
target
stringlengths
5
918
len_question
int64
21
890
len_target
int64
3
255
160,800
public SIBusMessage receiveNoWait ( final SITransaction tran ) throws SISessionDroppedException , SIConnectionDroppedException , SISessionUnavailableException , SIConnectionUnavailableException , SIConnectionLostException , SILimitExceededException , SINotAuthorizedException , SIResourceException , SIErrorException , S...
Receives a message . Checks that the session is valid . Maps the transaction parameter before delegating .
220
21
160,801
public void start ( boolean deliverImmediately ) throws SIConnectionDroppedException , SISessionUnavailableException , SIConnectionUnavailableException , SIConnectionLostException , SIResourceException , SIErrorException , SIErrorException { final String methodName = "start" ; if ( TraceComponent . isAnyTracingEnabled ...
Starts message delivery . Checks that the session is valid then delegates .
171
14
160,802
public void stop ( ) throws SISessionDroppedException , SIConnectionDroppedException , SISessionUnavailableException , SIConnectionUnavailableException , SIConnectionLostException , SIResourceException , SIErrorException { final String methodName = "stop" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEnt...
Stops message delivery . Checks that the session is valid then delegates .
157
14
160,803
@ Override public void unlockAll ( boolean incrementUnlockCount ) throws SISessionUnavailableException , SISessionDroppedException , SIConnectionUnavailableException , SIConnectionDroppedException , SIResourceException , SIConnectionLostException , SIIncorrectCallException { throw new SibRaNotSupportedException ( NLS ....
Unlocking of messages is not supported .
101
8
160,804
public void setConnectionObjectID ( int i ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setConnectionObjectID" , "" + i ) ; connectionObjectID = i ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "setCon...
Sets the Connection ID referring to the SIMPConnection Object on the server .
100
16
160,805
public ProxyQueueConversationGroup getProxyQueueConversationGroup ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getProxyQueueConversationGroup" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getPr...
Gets the proxy queue group associated with this conversation .
109
11
160,806
public CatConnectionListenerGroup getCatConnectionListeners ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getCatConnectionListeners" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getCatConnection...
Gets the connection listener group associated with thisconversation
103
12
160,807
public SICoreConnection getSICoreConnection ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getSICoreConnection" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getSICoreConnection" , siCoreConnectio...
Returns the SICoreConnection in use with this conversation
103
11
160,808
public final boolean unlink ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "unlink" , _positionString ( ) ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "cursor count = " + _cursorCount ) ; boolean ...
Request that the receiver be unlinked from the list . If the receiver is linked it will be marked as logically unlinked . Note that this will perform a logical unlink which may result in a physical unlink
270
42
160,809
private boolean isRequestForbidden ( StringBuffer path ) { boolean requestIsForbidden = false ; String matchString = path . toString ( ) ; //PM82876 Start // The fileName or dirName can have .. , check and fail for ".." in path only which can allow to serve from different location. if ( WCCustomProperties . ALLOW_DOTS_...
returns true if request is forbidden because it contains .. etc .
600
13
160,810
private boolean isDirectoryTraverse ( StringBuffer path ) { boolean directoryTraverse = false ; String matchString = path . toString ( ) ; //PM82876 Start if ( WCCustomProperties . ALLOW_DOTS_IN_NAME ) { // The fileName can have .. , check for the failing conditions only. if ( matchString . indexOf ( ".." ) > - 1 ) { i...
542155 Add isDirectoryTraverse method - reduced version of isRequestForbidden
445
17
160,811
public ServiceRegistration < FileMonitor > monitorFiles ( Collection < String > paths , long monitorInterval ) { BundleContext bundleContext = actionable . getBundleContext ( ) ; final Hashtable < String , Object > fileMonitorProps = new Hashtable < String , Object > ( ) ; fileMonitorProps . put ( FileMonitor . MONITOR...
Registers this file monitor to start monitoring the specified files at the specified interval .
124
16
160,812
public ServiceRegistration < FileMonitor > monitorFiles ( String ID , Collection < String > paths , long pollingRate , String trigger ) { BundleContext bundleContext = actionable . getBundleContext ( ) ; final Hashtable < String , Object > fileMonitorProps = new Hashtable < String , Object > ( ) ; fileMonitorProps . pu...
Registers this file monitor to start monitoring the specified files either by mbean notification or polling rate .
398
20
160,813
private Boolean isActionNeeded ( Collection < File > createdFiles , Collection < File > modifiedFiles ) { boolean actionNeeded = false ; for ( File createdFile : createdFiles ) { if ( currentlyDeletedFiles . contains ( createdFile ) ) { currentlyDeletedFiles . remove ( createdFile ) ; actionNeeded = true ; } } if ( mod...
Action is needed if a file is modified or if it is recreated after it was deleted .
98
19
160,814
public QueuedMessage [ ] getQueuedMessages ( java . lang . Integer fromIndexInteger , java . lang . Integer toIndexInteger , java . lang . Integer totalMessagesPerpageInteger ) throws Exception { int fromIndex = fromIndexInteger . intValue ( ) ; int toIndex = toIndexInteger . intValue ( ) ; int totalMessagesPerpage = t...
673411 - start
431
5
160,815
private void initializeCacheData ( int cacheSize ) { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && ( tc . isEntryEnabled ( ) || tcOOM . isEntryEnabled ( ) ) ) Tr . entry ( tc . isEntryEnabled ( ) ? tc : tcOOM , "initializeCacheData : " + ivCache . getName ( ) + " preferred size ...
Initialize various optimization values used by the eviction strategy that depend on the cache size .
377
17
160,816
private void initializeSweepInterval ( long sweepInterval ) { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && ( tc . isEntryEnabled ( ) || tcOOM . isEntryEnabled ( ) ) ) Tr . entry ( tc . isEntryEnabled ( ) ? tc : tcOOM , "initializeSweepInterval : " + ivCache . getName ( ) + " pr...
Initialize all of the intervals that are derived from the configurable sweep interval . Can be called at any time during runtime .
481
25
160,817
private boolean isTraceEnabled ( boolean debug ) // d581579 { if ( debug ? tc . isDebugEnabled ( ) : tc . isEntryEnabled ( ) ) { return true ; } if ( ivCache . numSweeps % NUM_SWEEPS_PER_OOMTRACE == 1 && ( debug ? tcOOM . isDebugEnabled ( ) : tcOOM . isEntryEnabled ( ) ) ) { return true ; } return false ; }
Returns true if trace should be printed .
98
8
160,818
protected NetworkConnection getNetworkConnectionInstance ( VirtualConnection vc ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getNetworkConnectionInstance" , vc ) ; NetworkConnection retConn = null ; if ( vc != null ) { // Default to the connection that we were created from retConn = conn ; if ( vc !=...
This method tries to avoid creating a new instance of a CFWNetworkConnection object by seeing if the specified virtual connection is the one that we are wrapping in the CFWNetworkConnection instance that created this context . If it is we simply return that . Otherwise we must create a new instance .
163
58
160,819
private void setChoices ( BigInteger multiChoice , JSchema schema ) { JSType topType = ( JSType ) schema . getJMFType ( ) ; if ( topType instanceof JSVariant ) setChoices ( multiChoice , schema , ( JSVariant ) topType ) ; else if ( topType instanceof JSTuple ) setChoices ( multiChoice , topType . getMultiChoiceCount ( ...
multichoice code .
153
5
160,820
private void setChoices ( BigInteger multiChoice , JSchema schema , JSVariant var ) { for ( int i = 0 ; i < var . getCaseCount ( ) ; i ++ ) { BigInteger count = ( ( JSType ) var . getCase ( i ) ) . getMultiChoiceCount ( ) ; if ( multiChoice . compareTo ( count ) >= 0 ) multiChoice = multiChoice . subtract ( count ) ; e...
Set the choices implied by the multiChoice code or contribution to a single JSVariant
203
17
160,821
private void setChoices ( BigInteger multiChoice , BigInteger radix , JSchema schema , JSVariant [ ] vars ) { for ( int j = 0 ; j < vars . length ; j ++ ) { radix = radix . divide ( vars [ j ] . getMultiChoiceCount ( ) ) ; BigInteger contrib = multiChoice . divide ( radix ) ; multiChoice = multiChoice . remainder ( rad...
JSVariant whose choices are being set .
114
9
160,822
private static BigInteger getMultiChoice ( int [ ] choices , JSchema schema , JSVariant var ) throws JMFUninitializedAccessException { int choice = choices [ var . getIndex ( ) ] ; if ( choice == - 1 ) throw new JMFUninitializedAccessException ( schema . getPathName ( var ) ) ; BigInteger ans = BigInteger . ZERO ; // F...
Compute the multiChoice code or contribution for an individual variant
222
12
160,823
private static BigInteger getMultiChoice ( int [ ] choices , JSchema schema , JSVariant [ ] vars ) throws JMFUninitializedAccessException { // Mixed-radix-encode the contribution from all the subvariants BigInteger base = BigInteger . ZERO ; for ( int i = 0 ; i < vars . length ; i ++ ) base = base . multiply ( vars [ i...
being calculate .
118
3
160,824
protected String getStyle ( FacesContext facesContext , UIComponent link ) { if ( link instanceof HtmlCommandLink ) { return ( ( HtmlCommandLink ) link ) . getStyle ( ) ; } return ( String ) link . getAttributes ( ) . get ( HTML . STYLE_ATTR ) ; }
Can be overwritten by derived classes to overrule the style to be used .
69
16
160,825
protected String getStyleClass ( FacesContext facesContext , UIComponent link ) { if ( link instanceof HtmlCommandLink ) { return ( ( HtmlCommandLink ) link ) . getStyleClass ( ) ; } return ( String ) link . getAttributes ( ) . get ( HTML . STYLE_CLASS_ATTR ) ; }
Can be overwritten by derived classes to overrule the style class to be used .
73
17
160,826
protected void completeConnectionPreface ( ) throws Http2Exception { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "completeConnectionPreface entry: about to send preface SETTINGS frame" ) ; } FrameSettings settings ; // send out a settings frame with any HTTP2 settings ...
Complete the connection preface . At this point we should have received the client connection preface string . Now we need to make sure that the client sent a settings frame along with the preface update our settings and send an empty settings frame in response to the client preface .
356
55
160,827
private void readWriteTransitionState ( Constants . Direction direction ) throws Http2Exception { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "readWriteTransitionState: entry: frame type: " + currentFrame . getFrameType ( ) + " state: " + state ) ; } if ( currentFrame ...
Transitions the stream state give the previous state and current frame . Handles writes and error processing as needed .
395
22
160,828
private void updateStreamState ( StreamState state ) { this . state = state ; if ( StreamState . CLOSED . equals ( state ) ) { setCloseTime ( System . currentTimeMillis ( ) ) ; muxLink . closeStream ( this ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "current stre...
Update the stream state and provide logging if enabled
108
9
160,829
private void processSETTINGSFrame ( ) throws FlowControlException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "processSETTINGSFrame entry:\n" + currentFrame . toString ( ) ) ; } // check if this is the first non-ACK settings frame received; if so, update connection i...
Helper method to process a SETTINGS frame received from the client . Since the protocol utilizes SETTINGS frames for initialization some special logic is needed .
731
30
160,830
private void updateStreamReadWindow ( ) throws Http2Exception { if ( currentFrame instanceof FrameData ) { long frameSize = currentFrame . getPayloadLength ( ) ; streamReadWindowSize -= frameSize ; // decrement stream read window muxLink . connectionReadWindowSize -= frameSize ; // decrement connection read window // i...
If this stream is receiving a DATA frame the local read window needs to be updated . If the read window drops below a threshold a WINDOW_UPDATE frame will be sent for both the connection and stream to update the windows .
306
46
160,831
protected void updateInitialWindowsUpdateSize ( int newSize ) throws FlowControlException { // this method should only be called by the thread that came in on processNewFrame. // newSize should be treated as an unsigned 32-bit int if ( myID == 0 ) { // the control stream doesn't care about initial window size updates r...
Updates the initial window size for this stream . If any data frames are waiting for an increased window size write them out if the new window size allows it .
257
32
160,832
private void processIdle ( Constants . Direction direction ) throws Http2Exception { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "processIdle entry: stream " + myID ) ; } // Can only receive HEADERS or PRIORITY frame in Idle state if ( direction == Constants . Directio...
Perform operations to transition into IDLE state
395
9
160,833
private boolean isWindowLimitExceeded ( FrameData dataFrame ) { if ( streamWindowUpdateWriteLimit - dataFrame . getPayloadLength ( ) < 0 || muxLink . getWorkQ ( ) . getConnectionWriteLimit ( ) - dataFrame . getPayloadLength ( ) < 0 ) { // would exceed window update limit String s = "Cannot write Data Frame because it w...
Check to see if a writing out a frame will cause the stream or connection window to go exceeded
206
19
160,834
public void sendRequestToWc ( FramePPHeaders frame ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "H2StreamProcessor.sendRequestToWc()" ) ; } if ( null == frame ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "H2Strea...
Send an artificially created H2 request from a push_promise up to the WebContainer
354
18
160,835
private void setHeadersComplete ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "completed headers have been received stream " + myID ) ; } headersCompleted = true ; muxLink . setContinuationExpected ( false ) ; }
Call when all header block fragments for a header block have been received
71
13
160,836
private void getHeadersFromFrame ( ) { byte [ ] hbf = null ; if ( currentFrame . getFrameType ( ) == FrameTypes . HEADERS || currentFrame . getFrameType ( ) == FrameTypes . PUSHPROMISEHEADERS ) { hbf = ( ( FrameHeaders ) currentFrame ) . getHeaderBlockFragment ( ) ; } else if ( currentFrame . getFrameType ( ) == FrameT...
Appends the header block fragment in the current header frame to this stream s incomplete header block
162
18
160,837
private void getBodyFromFrame ( ) { if ( dataPayload == null ) { dataPayload = new ArrayList < byte [ ] > ( ) ; } if ( currentFrame . getFrameType ( ) == FrameTypes . DATA ) { dataPayload . add ( ( ( FrameData ) currentFrame ) . getData ( ) ) ; } }
Grab the data from the current frame
74
7
160,838
private void processCompleteData ( ) throws ProtocolException { WsByteBufferPoolManager bufManager = HttpDispatcher . getBufferManager ( ) ; WsByteBuffer buf = bufManager . allocate ( getByteCount ( dataPayload ) ) ; for ( byte [ ] bytes : dataPayload ) { buf . put ( bytes ) ; } buf . flip ( ) ; if ( expectedContentLen...
Put the data payload for this stream into the read buffer that will be passed to the webcontainer . This should only be called when this stream has received an end of stream flag .
200
36
160,839
private void setReadyForRead ( ) throws ProtocolException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "setReadyForRead entry: stream id:" + myID ) ; } muxLink . updateHighestStreamId ( myID ) ; if ( headersCompleted ) { ExecutorService executorService = CHFWBundle . ...
Tell the HTTP inbound link that we have data ready for it to read
130
15
160,840
private void moveDataIntoReadBufferArray ( WsByteBuffer newReadBuffer ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "moveDataIntoReadBufferArray entry: stream " + myID + " buffer: " + newReadBuffer ) ; } // move the data that is to be sent up the channel into the cur...
Add a buffer to the list of buffers that will be sent to the WebContainer when a read is requested
162
21
160,841
@ SuppressWarnings ( "unchecked" ) public VirtualConnection read ( long numBytes , WsByteBuffer [ ] requestBuffers ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "read entry: stream " + myID + " request: " + requestBuffers + " num bytes requested: " + numBytes ) ; } l...
Read the HTTP header and data bytes for this stream
650
10
160,842
public boolean isStreamClosed ( ) { if ( this . myID == 0 && ! endStream ) { return false ; } if ( state == StreamState . CLOSED ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "isStreamClosed stream closed; " + streamId ( ) ) ; } return true ; } boolean rc = muxLink ....
Check if the current stream should be closed
169
8
160,843
private int getByteCount ( ArrayList < byte [ ] > listOfByteArrays ) { int count = 0 ; for ( byte [ ] byteArray : listOfByteArrays ) { if ( byteArray != null ) { count += byteArray . length ; } } return count ; }
Get the number of bytes in this list of byte arrays
61
11
160,844
public static String generateIncUuid ( Object caller ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "generateIncUuid" , "Caller=" + caller ) ; java . util . Date time = new java . util . Date ( ) ; int hash = caller . hashCode ( ) ; long millis = time . getTime ( ) ;...
The UUID for this incarnation of ME is generated using the hashcode of this object and the least significant four bytes of the current time in milliseconds .
323
30
160,845
public static String getMEName ( Object o ) { String meName ; if ( ! threadLocalStack . isEmpty ( ) ) { meName = threadLocalStack . peek ( ) ; } else { meName = DEFAULT_ME_NAME ; } String str = "" ; if ( o != null ) { str = "/" + Integer . toHexString ( System . identityHashCode ( o ) ) ; } // Defect 91793 to avoid SIB...
Get Jetstream ME name to be printed in trace message
112
11
160,846
void setSICoreConnection ( final SICoreConnection connection ) { if ( TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , "setSICoreConnection" , connection ) ; } _coreConnection = connection ; if ( TRACE . isEntryEnabled ( ) ) { SibTr . exit ( this , TRACE , "setSICoreConnection" ) ; //412795 } }
Sets the connection that was created as a result of this request .
93
14
160,847
@ Override @ Trivial public ZipFile open ( ) throws IOException { String methodName = "open" ; synchronized ( zipFileLock ) { if ( zipFile == null ) { debug ( methodName , "Opening" ) ; if ( zipFileReaper == null ) { zipFile = ZipFileUtils . openZipFile ( file ) ; // throws IOException } else { zipFile = zipFileReaper ...
Open the zip file . Create and assign the zip file if this is the first open . Increase the open count by one .
118
25
160,848
@ Override @ Trivial public InputStream getInputStream ( ZipFile useZipFile , ZipEntry zipEntry ) throws IOException { String methodName = "getInputStream" ; String entryName = zipEntry . getName ( ) ; if ( zipEntry . isDirectory ( ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { debug...
Answer an input stream for an entry of a zip file . When the entry is a class entry which has 8K or fewer bytes read all of the entry bytes immediately and cache the bytes in this handle . Subsequent input stream requests which locate cached bytes will answer a stream on those bytes .
814
58
160,849
@ Trivial private static byte [ ] read ( InputStream inputStream , int expectedRead , String name ) throws IOException { byte [ ] bytes = new byte [ expectedRead ] ; int remainingRead = expectedRead ; int totalRead = 0 ; while ( remainingRead > 0 ) { int nextRead = inputStream . read ( bytes , totalRead , remainingRead...
Read an exact count of bytes from an input stream .
223
11
160,850
private String findVersion ( ) { WlpInformation wlp = _asset . getWlpInformation ( ) ; if ( wlp == null ) { return null ; } Collection < AppliesToFilterInfo > filterInfo = wlp . getAppliesToFilterInfo ( ) ; if ( filterInfo == null ) { return null ; } for ( AppliesToFilterInfo filter : filterInfo ) { if ( filter . getMi...
Uses the filter information to return the first version number
117
11
160,851
private void addVersionDisplayString ( ) { WlpInformation wlp = _asset . getWlpInformation ( ) ; JavaSEVersionRequirements reqs = wlp . getJavaSEVersionRequirements ( ) ; if ( reqs == null ) { return ; } String minVersion = reqs . getMinVersion ( ) ; // Null means no requirements specified which is fine if ( minVersion...
This generates the string that should be displayed on the website to indicate the supported Java versions . The requirements come from the bundle manifests . The mapping between the two is non - obvious as it is the intersection between the Java EE requirement and the versions of Java that Liberty supports .
493
54
160,852
private void removeRequireFeatureWithToleratesIfExists ( String feature ) { Collection < RequireFeatureWithTolerates > rfwt = _asset . getWlpInformation ( ) . getRequireFeatureWithTolerates ( ) ; if ( rfwt != null ) { for ( RequireFeatureWithTolerates toCheck : rfwt ) { if ( toCheck . getFeature ( ) . equals ( feature ...
Looks in the underlying asset to see if there is a requireFeatureWithTolerates entry for the supplied feature and if there is removes it .
112
29
160,853
private void copyRequireFeatureToRequireFeatureWithTolerates ( ) { Collection < RequireFeatureWithTolerates > rfwt = _asset . getWlpInformation ( ) . getRequireFeatureWithTolerates ( ) ; if ( rfwt != null ) { // Both fields (with and without tolerates) should exist, as // rfwt should not be created unless the other fie...
requireFeature was the old field in the asset which didn t contain tolerates information . The new field is requireFeatureWithTolerates and for the moment both fields are being maintained as older assets in the repository will only have the older field . When older assets are being written to the data from the older fi...
301
84
160,854
public static boolean isClassVetoed ( Class < ? > type ) { if ( type . isAnnotationPresent ( Vetoed . class ) ) { return true ; } return isPackageVetoed ( type . getPackage ( ) ) ; }
Return true if the class is vetoed or the package is vetoed
53
12
160,855
private Map < String , String > populateCommonAuthzHeaderParams ( ) { Map < String , String > parameters = new HashMap < String , String > ( ) ; parameters . put ( TwitterConstants . PARAM_OAUTH_CONSUMER_KEY , consumerKey ) ; parameters . put ( TwitterConstants . PARAM_OAUTH_NONCE , Utils . generateNonce ( ) ) ; parame...
Creates a map of parameters and values that are common to all requests that require an Authorization header .
180
20
160,856
private String signAndCreateAuthzHeader ( String endpointUrl , Map < String , String > parameters ) { String signature = computeSignature ( requestMethod , endpointUrl , parameters ) ; parameters . put ( TwitterConstants . PARAM_OAUTH_SIGNATURE , signature ) ; String authzHeaderString = createAuthorizationHeaderString ...
Generates the Authorization header with all the requisite content for the specified endpoint request by computing the signature adding it to the parameters and generating the Authorization header string .
80
31
160,857
public Map < String , Object > populateJsonResponse ( String responseBody ) throws JoseException { if ( responseBody == null || responseBody . isEmpty ( ) ) { return null ; } return JsonUtil . parseJson ( responseBody ) ; }
Populates a Map from the response body . This method expects the responseBody value to be in JSON format .
55
22
160,858
@ FFDCIgnore ( SocialLoginException . class ) @ Sensitive public Map < String , Object > executeRequest ( SocialLoginConfig config , String requestMethod , String authzHeaderString , String url , String endpointType , String verifierValue ) { if ( endpointType == null ) { endpointType = TwitterConstants . TWITTER_ENDPO...
Sends a request to the specified Twitter endpoint and returns a Map object containing the evaluated response .
433
19
160,859
@ FFDCIgnore ( IllegalStateException . class ) private void updateMonitorService ( ) { if ( ! coveringPaths . isEmpty ( ) ) { if ( service == null ) { try { // If we are shutting down, we want to generate the exception quickly. BundleContext bundleContext = getContainerFactoryHolder ( ) . getBundleContext ( ) ; // thro...
Update the monitor service according to whether any listeners are registered . That is if any covering paths are present .
230
21
160,860
private void updateEnclosingMonitor ( ) { if ( ! coveringPaths . isEmpty ( ) ) { if ( ! listenerRegistered ) { // This container is not yet registered to the enclosing container. // Register this container. ArtifactContainer enclosingRootContainer = entryInEnclosingContainer . getRoot ( ) ; // The path to register is t...
Update the enclosing monitor according to whether any listeners are registered . That is if any covering paths are present .
410
22
160,861
private boolean registerListener ( String newPath , ArtifactListenerSelector newListener ) { boolean updatedCoveringPaths = addCoveringPath ( newPath ) ; Collection < ArtifactListenerSelector > listenersForPath = listeners . get ( newPath ) ; if ( listenersForPath == null ) { // Each listeners collection is expected to...
Register a listener to a specified path .
121
8
160,862
private boolean addCoveringPath ( String newPath ) { int newLen = newPath . length ( ) ; Iterator < String > useCoveringPaths = coveringPaths . iterator ( ) ; boolean isCovered = false ; boolean isCovering = false ; while ( ! isCovered && useCoveringPaths . hasNext ( ) ) { String coveringPath = useCoveringPaths . next ...
Add a path to the covering paths collection .
517
9
160,863
@ Trivial private String validateNotification ( Collection < ? > added , Collection < ? > removed , Collection < ? > updated ) { boolean isAddition = ! added . isEmpty ( ) ; boolean isRemoval = ! removed . isEmpty ( ) ; boolean isUpdate = ! updated . isEmpty ( ) ; if ( ! isAddition && ! isRemoval && ! isUpdate ) { // S...
Validate change data which is expected to be collections of files or collections of entry paths .
197
18
160,864
private void notifyAllListeners ( boolean isUpdate , String filter ) { // Can't reuse the registered paths collection across the loop // because the listener notification can do processing in a new // thread. Reusing the registered paths could cause a collision // between the listener thread with this notification proc...
A notification which was either an update to the entire zip or was the removal of the entire zip file was received . For each listener that is registered collect the paths for that listener and forward the notification .
438
40
160,865
public AuthenticationService getAuthenticationService ( SecurityService securityService ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , CLASS_NAME + "getAuthenticationService" , securityService ) ; } if ( _authenticationService == null ) { if ( securityService != nu...
Get Authentication Service from the Liberty Security component It will get the AuthenticationService only if the SecurityService is activated
148
21
160,866
protected Subject login ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , CLASS_NAME + "login" ) ; } Subject subject = null ; try { /* * Only if we have the AuthenticationService running, we can do * Authentication. If it is not present we cannot do any * authentica...
The method to authenticate a User
281
7
160,867
private void rejectHandshake ( Conversation conversation , int requestNumber , String rejectedField ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "rejectHandshake" , new Object [ ] { conversation , requestNumber , rejectedField } ) ; SIConnectionLostException...
This method is used to inform the client that we are rejecting their handshake . Typically this will never happen unless a third party client is written or an internal error occurs . However we should check for an inproperly formatted handshake and inform the client if such an error occurs .
318
55
160,868
void register ( CloudantService svc , ConcurrentMap < ClientKey , Object > clients ) { registrations . put ( svc , clients ) ; }
Lazily registers a CloudantService to have its client cache purged of entries related to a stopped application .
32
23
160,869
@ FFDCIgnore ( NoSuchMethodException . class ) private void setRRSTransactional ( ) { try { ivRRSTransactional = ( Boolean ) activationSpec . getClass ( ) . getMethod ( "getRRSTransactional" ) . invoke ( activationSpec ) ; } catch ( NoSuchMethodException x ) { ivRRSTransactional = false ; } catch ( Exception x ) { ivRR...
If an RA wants to enable RRS Transactions it should return true for the method getRRSTransactional .
122
23
160,870
@ Override public void setJCAVersion ( int majorJCAVer , int minorJCAVer ) { majorJCAVersion = majorJCAVer ; minorJCAVersion = minorJCAVer ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "MessageEndpointFactoryImpl.setJCAVersionJCA: Version " + majorJCAVersion + "." + mi...
Indicates what version of JCA specification the RA using this MessageEndpointFactory requires compliance with .
109
20
160,871
private void setup ( BeanMetaData bmd ) { if ( ! ivSetup ) { int slotSize = bmd . container . getEJBRuntime ( ) . getMetaDataSlotSize ( MethodMetaData . class ) ; for ( int i = 0 ; i < capacity ; ++ i ) { EJBMethodInfoImpl methodInfo = bmd . createEJBMethodInfoImpl ( slotSize ) ; methodInfo . initializeInstanceData ( n...
Construct capacity sized stack
120
4
160,872
public final void done ( EJBMethodInfoImpl mi ) { //d151861 if ( orig || ( mi == null ) || ( topOfStack == 0 ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "In orig mode returning:" + " orig: " + orig + " top: " + topOfStack + " mi: " + mi ) ; orig = true ; elements =...
Indicate that the caller is finished with the instance that was last obtained .
268
15
160,873
final public EJBMethodInfoImpl get ( String methodSignature , String methodNameOnly , EJSWrapperBase wrapper , MethodInterface methodInterface , // d164221 TransactionAttribute txAttr ) // 199625 { EJBMethodInfoImpl retVal = null ; BeanMetaData bmd = wrapper . bmd ; setup ( bmd ) ; // delay initting array so we can get...
Get an instance of EJBMethodInfoImpl . Either return EJBMethod off the stack or new up a new instance after stack capacity is exhausted returns EJBMethodInfoImpl
326
35
160,874
Class < ? > loadClass ( String name ) throws ClassNotFoundException { // First, try to find the class by name. ServiceReference < DeserializationClassProvider > provider = classProviders . getReference ( name ) ; if ( provider != null ) { return loadClass ( provider , name ) ; } // Next, try to find the class by packag...
Attempts to resolve a class from registered class providers .
146
10
160,875
private void serializeRealObject ( ) throws ObjectFailedToSerializeException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "serializeRealObject" ) ; if ( hasRealObject ) { // If the realObject isn't null, we need to serialize it & set it into the message if ( r...
Private method to serialize the real object into the payload .
502
12
160,876
private Serializable deserializeToRealObject ( ) throws IOException , ClassNotFoundException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "deserializeToRealObject" ) ; Serializable obj = null ; ObjectInputStream ois = null ; byte [ ] bytes = getDataFromPayload...
Private method to deserialize the real object from the payload .
529
13
160,877
public SICoreConnection getConnection ( ) throws SISessionUnavailableException { if ( TraceComponent . isAnyTracingEnabled ( ) && CoreSPIProducerSession . tc . isEntryEnabled ( ) ) { SibTr . entry ( CoreSPIProducerSession . tc , "getConnection" , this ) ; SibTr . exit ( CoreSPIProducerSession . tc , "getConnection" , _...
Returns this sessions connection
106
4
160,878
void disableDiscriminatorAccessCheckAtSend ( String discriminatorAtCreate ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "disableDiscriminatorAccessCheckAtSend" ) ; _checkDiscriminatorAccessAtSend = false ; this . _discriminatorAtCreate = discriminatorAtCreate ; if (...
Disable discriminator access checks at send time
125
8
160,879
public void addEntry ( TimerWorkItem addItem , long curTime ) { // this routine assumes the slot is not full this . mostRecentlyAccessedTime = curTime ; this . lastEntryIndex ++ ; this . entries [ lastEntryIndex ] = addItem ; }
Add a timer item .
57
5
160,880
@ Generated ( value = "com.ibm.jtc.jax.tools.xjc.Driver" , date = "2014-06-11T05:49:00-04:00" , comments = "JAXB RI v2.2.3-11/28/2011 06:21 AM(foreman)-" ) public List < Flow > getFlows ( ) { if ( flows == null ) { flows = new ArrayList < Flow > ( ) ; } return this . flows ; }
Gets the value of the flows property .
111
9
160,881
public JMFMessage decode ( JSchema schema , byte [ ] contents , int offset , int length ) throws JMFMessageCorruptionException { return new JSMessageImpl ( schema , contents , offset , length , true ) ; }
Implementation of decode
49
4
160,882
protected String read ( SocketChannel sc ) throws IOException { sc . read ( buffer ) ; buffer . flip ( ) ; decoder . decode ( buffer , charBuffer , true ) ; charBuffer . flip ( ) ; String result = charBuffer . toString ( ) ; // Clear out buffers buffer . clear ( ) ; charBuffer . clear ( ) ; decoder . reset ( ) ; return...
Reads a command or command response from a socket channel .
84
12
160,883
protected void write ( SocketChannel sc , String s ) throws IOException { sc . write ( encoder . encode ( CharBuffer . wrap ( s ) ) ) ; }
Writes a command or command response to a socket channel .
35
12
160,884
@ Test public void MPJwtBadMPConfigAsEnvVars_GoodMpJwtConfigSpecifiedInServerXml ( ) throws Exception { resourceServer . reconfigureServerUsingExpandedConfiguration ( _testName , "rs_server_AltConfigNotInApp_goodServerXmlConfig.xml" ) ; standardTestFlow ( resourceServer , MpJwtFatConstants . NO_MP_CONFIG_IN_APP_ROOT_CO...
The server will be started with all mp - config properties set to bad values in environment variables . The server . xml has a valid mp_jwt config specified . The config settings should come from server . xml . The test should run successfully .
150
49
160,885
@ Test public void MPJwtBadMPConfigAsEnvVars_MpJwtConfigNotSpecifiedInServerXml ( ) throws Exception { standardTestFlow ( resourceServer , MpJwtFatConstants . NO_MP_CONFIG_IN_APP_ROOT_CONTEXT , MpJwtFatConstants . NO_MP_CONFIG_IN_APP_APP , MpJwtFatConstants . MPJWT_APP_CLASS_NO_MP_CONFIG_IN_APP , setBadIssuerExpectatio...
The server will be started with all mp - config properties set to bad values in environment variables . The server . xml has NO mp_jwt config specified . The config settings should come from the env vars . The test should fail
126
47
160,886
private boolean doRead ( int amountToRead ) throws IOException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "doRead, Current buffer, " + _buffer + ", reading from the TCP Channel, readLine : " + _isReadLine ) ; } try { if ( _tcpChannelCallback != null && ! _isReadLine...
This method will call the synchronous or asynchronous method depending on how everything is set up
195
17
160,887
private boolean syncRead ( int amountToRead ) throws IOException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "syncRead, Executing a synchronous read" ) ; } // Allocate the buffer and set it on the TCP Channel setAndAllocateBuffer ( amountToRead ) ; try { long bytesRe...
Issues a synchronous read to the TCP Channel .
327
11
160,888
private boolean immediateRead ( int amountToRead ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "immediateRead, Executing a read" ) ; } if ( amountToRead > 1 ) { //Allocate a new temp buffer, then set the position to 0 and limit to the amount we want to read //Copy in...
This method will execute an immediate read The immediate read will issue a read to the TCP Channel and immediately return with whatever can fit in the buffers This will only ever be called after we had read the 1 byte from the isReady or initialRead methods . As such we will allocate a buffer and add in the 1 byte . Th...
514
85
160,889
public int read ( ) throws IOException { validate ( ) ; int rc = - 1 ; if ( doRead ( 1 ) ) { rc = _buffer . get ( ) & 0x000000FF ; } _buffer . release ( ) ; _buffer = null ; return rc ; }
Read the first available byte
59
5
160,890
public int read ( byte [ ] output , int offset , int length ) throws IOException { int size = - 1 ; validate ( ) ; if ( 0 == length ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "read(byte[],int,int), Target length was 0" ) ; } return length ; } if ( doRead ( length ...
Read into the provided byte array with the length and offset provided
189
12
160,891
private void setAndAllocateBuffer ( int sizeToAllocate ) { if ( _buffer == null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "setAndAllocateBuffer, Buffer is null, size to allocate is : " + sizeToAllocate ) ; } _buffer = allocateBuffer ( sizeToAllocate ) ; } configu...
Allocate the buffer size we need and then pre - configure the buffer to prepare it to be read into Once it has been prepared set the buffer to the TCP Channel
165
33
160,892
private void validate ( ) throws IOException { if ( null != _error ) { throw _error ; } if ( ! _isReadLine && ! _isReady ) { //If there is no data available then isReady will have returned false and this throw an IllegalStateException if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isErrorEnabled ( ) ) Tr . error...
This checks if we have already had an exception thrown . If so it just rethrows that exception This check is done before any reads are done
124
29
160,893
public void setupReadListener ( ReadListener readListenerl , SRTUpgradeInputStream31 srtUpgradeStream ) { if ( readListenerl == null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isErrorEnabled ( ) ) Tr . error ( tc , "readlistener.is.null" ) ; throw new NullPointerException ( Tr . formatMessage ( tc , "rea...
Sets the ReadListener provided by the application to this stream Once the ReadListener is set we will kick off the initial read
372
25
160,894
public void initialRead ( ) { _isInitialRead = true ; if ( _buffer != null ) { _buffer . release ( ) ; _buffer = null ; } setAndAllocateBuffer ( 1 ) ; configurePreReadBuffer ( 1 ) ; //This if the first read of the ReadListener, which means force the read to go async //We won't get an actual response from this read as i...
This method triggers the initial read on the connection or the read for after the ReadListener . onDataAvailable has run The read done in this method is a forced async read meaning it will always return on another thread The provided callback will be called when the read is completed and that callback will invoke the R...
151
63
160,895
public void configurePostInitialReadBuffer ( ) { _isInitialRead = false ; _isFirstRead = false ; _buffer = _tcpContext . getReadInterface ( ) . getBuffer ( ) ; configurePostReadBuffer ( ) ; }
Called after the initial read is completed . This will set the first read flag to false get the buffer from the TCP Channel and post configure the buffer . Without this method we would lose the first byte we are reading
51
43
160,896
public Boolean close ( ) { _isClosing = true ; boolean closeResult = true ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "close, Initial read outstanding : " + _isInitialRead ) ; } if ( _isInitialRead ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnab...
Close the connection down by immediately timing out any existing read
570
11
160,897
public synchronized int getDurableSubscriptions ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getDurableSubscriptions" ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getDurableSubscriptions" , new Integer ( durableSubscriptions ) ) ; return durableSubscriptions ; }
Get number of durable subscriptions .
84
6
160,898
public synchronized int getNonDurableSubscriptions ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getNonDurableSubscriptions" ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getNonDurableSubscriptions" , new Integer ( nonDurableSubscriptions ) ) ; return nonDurableSubscriptions ; }
Get number of non - durable subscriptions .
91
8
160,899
public synchronized int getTotalSubscriptions ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getTotalSubscriptions" ) ; int totalSubscriptions = durableSubscriptions + nonDurableSubscriptions ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getTotalSubscriptions" , new Integer ( totalSubscriptions ) ) ...
Get total number of subscriptions .
99
6