idx
int64 0
41.2k
| question
stringlengths 83
4.15k
| target
stringlengths 5
715
|
|---|---|---|
35,500
|
private void shutdownDerbyEmbedded ( ) { final boolean trace = TraceComponent . isAnyTracingEnabled ( ) ; if ( trace && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "shutdownDerbyEmbedded" , classloader , embDerbyRefCount ) ; if ( embDerbyRefCount . remove ( classloader ) && ! embDerbyRefCount . contains ( classloader ) ) try { Class < ? > EmbDS = AdapterUtil . forNameWithPriv ( "org.apache.derby.jdbc.EmbeddedDataSource40" , true , classloader ) ; DataSource ds = ( DataSource ) EmbDS . newInstance ( ) ; EmbDS . getMethod ( "setShutdownDatabase" , String . class ) . invoke ( ds , "shutdown" ) ; ds . getConnection ( ) . close ( ) ; if ( trace && tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "shutdownDerbyEmbedded" ) ; } catch ( SQLException x ) { if ( trace && tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "shutdownDerbyEmbedded" , x . getSQLState ( ) + ' ' + x . getErrorCode ( ) + ':' + x . getMessage ( ) ) ; } catch ( Throwable x ) { if ( trace && tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "shutdownDerbyEmbedded" , x ) ; } else if ( trace && tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "shutdownDerbyEmbedded" , false ) ; }
|
Shut down the Derby system if the reference count for the class loader drops to 0 .
|
35,501
|
protected void unsetSharedLib ( Library lib ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "unsetSharedLib" , lib ) ; modified ( null , false ) ; }
|
Declarative Services method for unsetting the SharedLibrary service
|
35,502
|
private static void retrieveManifestData ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "retrieveManifestData" ) ; try { JmsMetaDataImpl . setProblemDefaults ( ) ; Package thisPackage = Package . getPackage ( packageName ) ; if ( thisPackage != null ) { String tempProv = thisPackage . getImplementationVendor ( ) ; if ( tempProv != null ) { JmsMetaDataImpl . provName = tempProv ; } String version = thisPackage . getImplementationVersion ( ) ; if ( version != null ) { Matcher m = sibOldVersionPattern . matcher ( version ) ; if ( ! ( m . matches ( ) ) ) { version = "1.0.0" ; m = sibBuildLevelPattern . matcher ( version ) ; } if ( m . matches ( ) ) { JmsMetaDataImpl . provVersion = m . group ( 1 ) ; try { JmsMetaDataImpl . provMajorVersion = Integer . valueOf ( m . group ( 2 ) ) . intValue ( ) ; JmsMetaDataImpl . provMinorVersion = Integer . valueOf ( m . group ( 3 ) ) . intValue ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "provMajorVersion=" + JmsMetaDataImpl . provMajorVersion + "provMinorVersion=" + JmsMetaDataImpl . provMinorVersion ) ; } catch ( RuntimeException e2 ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Unable to convert major or minor version number from build level " + version + " to int" , e2 ) ; } } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Unable to find a valid build level in " + version ) ; } } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Implementation version from manifest was null" ) ; } } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "The package was null - unable to retrieve information" ) ; } } catch ( RuntimeException e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.api.jms.impl.JmsMetaDataImpl" , "retrieveManifestData#1" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Error retrieving manifest information" , e ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "retrieveManifestData" ) ; }
|
This method retrieves the information stored in the jar manifest and uses it to populate the implementation information to be returned to the user .
|
35,503
|
public SIBusMessage nextLocked ( ) throws SISessionUnavailableException , SISessionDroppedException , SIConnectionUnavailableException , SIConnectionDroppedException , SIResourceException , SIConnectionLostException , SIErrorException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "nextLocked" ) ; JsMessage retMsg = null ; synchronized ( lmeOperationMonitor ) { checkValid ( ) ; while ( nextIndex != messages . length ) { retMsg = messages [ nextIndex ] ; nextIndex ++ ; if ( retMsg != null ) break ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "nextLocked" , retMsg ) ; return retMsg ; }
|
Returns the next available locked message in the enumeration . A value of null is returned if there is no next message .
|
35,504
|
public void unlockCurrent ( ) throws SISessionUnavailableException , SISessionDroppedException , SIConnectionUnavailableException , SIConnectionDroppedException , SIResourceException , SIConnectionLostException , SIIncorrectCallException , SIMessageNotLockedException , SIErrorException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "unlockCurrent" ) ; synchronized ( lmeOperationMonitor ) { checkValid ( ) ; if ( ( nextIndex == 0 ) || ( messages [ nextIndex - 1 ] == null ) ) { throw new SIIncorrectCallException ( nls . getFormattedMessage ( "LME_UNLOCK_INVALID_MSG_SICO1017" , null , null ) ) ; } JsMessage retMsg = messages [ nextIndex - 1 ] ; if ( CommsUtils . isRecoverable ( retMsg , consumerSession . getUnrecoverableReliability ( ) ) ) { convHelper . unlockSet ( new SIMessageHandle [ ] { retMsg . getMessageHandle ( ) } ) ; } messages [ nextIndex - 1 ] = null ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "unlockCurrent" ) ; }
|
Unlocks the current message .
|
35,505
|
public void deleteCurrent ( SITransaction transaction ) throws SISessionUnavailableException , SISessionDroppedException , SIConnectionUnavailableException , SIConnectionDroppedException , SIResourceException , SIConnectionLostException , SILimitExceededException , SIIncorrectCallException , SIMessageNotLockedException , SIErrorException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "deleteCurrent" , transaction ) ; synchronized ( lmeOperationMonitor ) { checkValid ( ) ; if ( ( nextIndex == 0 ) || ( messages [ nextIndex - 1 ] == null ) ) { throw new SIIncorrectCallException ( nls . getFormattedMessage ( "LME_DELETE_INVALID_MSG_SICO1018" , null , null ) ) ; } JsMessage retMsg = messages [ nextIndex - 1 ] ; if ( CommsUtils . isRecoverable ( retMsg , consumerSession . getUnrecoverableReliability ( ) ) ) { JsMessage [ ] msgs = new JsMessage [ ] { retMsg } ; if ( transaction != null ) { synchronized ( transaction ) { if ( ! ( ( Transaction ) transaction ) . isValid ( ) ) { throw new SIIncorrectCallException ( nls . getFormattedMessage ( "TRANSACTION_COMPLETE_SICO1022" , null , null ) ) ; } deleteMessages ( msgs , transaction ) ; } } else { deleteMessages ( msgs , null ) ; } } messages [ nextIndex - 1 ] = null ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "deleteCurrent" ) ; }
|
Deletes the current message .
|
35,506
|
public void deleteSeen ( SITransaction transaction ) throws SISessionUnavailableException , SISessionDroppedException , SIConnectionUnavailableException , SIConnectionDroppedException , SIResourceException , SIConnectionLostException , SILimitExceededException , SIIncorrectCallException , SIMessageNotLockedException , SIErrorException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "deleteSeen" , transaction ) ; synchronized ( lmeOperationMonitor ) { checkValid ( ) ; int numSeenMsgs = getSeenMessageCount ( ) ; if ( numSeenMsgs > 0 ) { JsMessage [ ] seenRecoverableMessages = new JsMessage [ numSeenMsgs ] ; int numOfMessagesNeedingDeleting = 0 ; for ( int i = 0 ; i < nextIndex ; ++ i ) { if ( messages [ i ] != null ) { if ( CommsUtils . isRecoverable ( messages [ i ] , consumerSession . getUnrecoverableReliability ( ) ) ) { seenRecoverableMessages [ numOfMessagesNeedingDeleting ] = messages [ i ] ; ++ numOfMessagesNeedingDeleting ; } messages [ i ] = null ; } } if ( numOfMessagesNeedingDeleting > 0 ) { if ( transaction != null ) { synchronized ( transaction ) { if ( ! ( ( Transaction ) transaction ) . isValid ( ) ) { throw new SIIncorrectCallException ( nls . getFormattedMessage ( "TRANSACTION_COMPLETE_SICO1022" , null , null ) ) ; } deleteMessages ( seenRecoverableMessages , transaction ) ; } } else { deleteMessages ( seenRecoverableMessages , null ) ; } } } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "deleteSeen" ) ; }
|
Deletes all messages seen so far .
|
35,507
|
private void deleteMessages ( JsMessage [ ] messagesToDelete , SITransaction transaction ) throws SISessionUnavailableException , SISessionDroppedException , SIConnectionUnavailableException , SIConnectionDroppedException , SIResourceException , SIConnectionLostException , SILimitExceededException , SIIncorrectCallException , SIMessageNotLockedException , SIErrorException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "deleteMessages" ) ; int priority = JFapChannelConstants . PRIORITY_MEDIUM ; if ( transaction != null ) { Transaction commsTransaction = ( Transaction ) transaction ; priority = commsTransaction . getLowestMessagePriority ( ) ; commsTransaction . associateConsumer ( consumerSession ) ; } SIMessageHandle [ ] messageHandles = new SIMessageHandle [ messagesToDelete . length ] ; for ( int x = 0 ; x < messagesToDelete . length ; x ++ ) { if ( messagesToDelete [ x ] != null ) { messageHandles [ x ] = messagesToDelete [ x ] . getMessageHandle ( ) ; } } convHelper . deleteMessages ( messageHandles , transaction , priority ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "deleteMessages" ) ; }
|
This private method actually performs the delete by asking the conversation helper to flow the request across the wire . However this method does not obtain any locks required to perform this operation and as such should be called by a method that does do this .
|
35,508
|
public void resetCursor ( ) throws SISessionUnavailableException , SISessionDroppedException , SIConnectionUnavailableException , SIConnectionDroppedException , SIResourceException , SIConnectionLostException , SIErrorException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "resetCursor" ) ; nextIndex = 0 ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "resetCursor" ) ; }
|
This method will reset the cursor and allow the LME to be traversed again . Note that any messages that were deleted or unlocked will not be available again .
|
35,509
|
public int getRemainingMessageCount ( ) throws SISessionUnavailableException , SISessionDroppedException , SIConnectionUnavailableException , SIConnectionDroppedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getRemainingMessageCount" ) ; checkValid ( ) ; int remain = getUnSeenMessageCount ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getRemainingMessageCount" , "" + remain ) ; return remain ; }
|
Returns the amount of messages left in the locked message enumeration .
|
35,510
|
private int getUnSeenMessageCount ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getUnseenMessageCount" ) ; int remain = 0 ; for ( int x = nextIndex ; x < messages . length ; x ++ ) { if ( messages [ x ] != null ) remain ++ ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getUnseenMessageCount" , "" + remain ) ; return remain ; }
|
Private method to determine how many messages have not been seen as yet . It does this by looking at the number of non - null elements from the current item to the end of the array .
|
35,511
|
public void unlockUnseen ( ) throws SIResourceException , SIConnectionDroppedException , SIConnectionLostException , SIIncorrectCallException , SIMessageNotLockedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "unlockUnseen" ) ; SIMessageHandle [ ] idsToUnlock = new SIMessageHandle [ getUnSeenMessageCount ( ) ] ; int arrayPos = 0 ; for ( int startingIndex = nextIndex ; startingIndex < messages . length ; startingIndex ++ ) { if ( messages [ startingIndex ] != null ) { if ( CommsUtils . isRecoverable ( messages [ startingIndex ] , consumerSession . getUnrecoverableReliability ( ) ) ) { idsToUnlock [ arrayPos ] = messages [ startingIndex ] . getMessageHandle ( ) ; arrayPos ++ ; } messages [ startingIndex ] = null ; } } if ( idsToUnlock . length != arrayPos ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "compacting array" ) ; final SIMessageHandle [ ] tempArray = new SIMessageHandle [ arrayPos ] ; System . arraycopy ( idsToUnlock , 0 , tempArray , 0 , arrayPos ) ; idsToUnlock = tempArray ; } convHelper . unlockSet ( idsToUnlock ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "unlockUnseen" ) ; }
|
begin F219476 . 2
|
35,512
|
public ConsumerSession getConsumerSession ( ) throws SISessionUnavailableException , SISessionDroppedException , SIConnectionUnavailableException , SIConnectionDroppedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getConsumerSession" ) ; checkValid ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getConsumerSession" ) ; return consumerSession ; }
|
Returns the consumer session this enumeration contains messages delivered to .
|
35,513
|
protected void markInvalid ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "markInvalid" ) ; invalid = true ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "markInvalid" ) ; }
|
Marks the enumeration as invalid . This is called once the asynchronous consumer callback returns to ensure that this locked message enumeration cannot be used from outside the callback .
|
35,514
|
public boolean shouldRedirectToHttps ( WebRequest webRequest ) { HttpServletRequest req = webRequest . getHttpServletRequest ( ) ; return ! req . isSecure ( ) && webRequest . isSSLRequired ( ) ; }
|
Determines if HTTPS redirect is required for this request .
|
35,515
|
public WebReply getHTTPSRedirectWebReply ( HttpServletRequest req ) { Integer httpsPort = ( Integer ) SRTServletRequestUtils . getPrivateAttribute ( req , "SecurityRedirectPort" ) ; if ( httpsPort == null ) { Tr . error ( tc , "SSL_PORT_IS_NULL" ) ; return new DenyReply ( "Resource must be accessed with a secure connection try again using an HTTPS connection." ) ; } URL originalURL = null ; String urlString = null ; try { urlString = req . getRequestURL ( ) . toString ( ) ; originalURL = new URL ( urlString ) ; } catch ( MalformedURLException e ) { Tr . error ( tc , "SSL_REQ_URL_MALFORMED_EXCEPTION" , urlString ) ; return new DenyReply ( "Resource must be accessed with a secure connection try again using an HTTPS connection." ) ; } String queryString = req . getQueryString ( ) ; try { URL redirectURL = new URL ( "https" , originalURL . getHost ( ) , httpsPort , originalURL . getPath ( ) + ( queryString == null ? "" : "?" + queryString ) ) ; return new RedirectReply ( redirectURL . toString ( ) , null ) ; } catch ( MalformedURLException e ) { Tr . error ( tc , "SSL_REQ_URL_MALFORMED_EXCEPTION" , "https" + originalURL . getHost ( ) + httpsPort + originalURL . getPath ( ) + ( queryString == null ? "" : "?" + queryString ) ) ; return new DenyReply ( "Resource must be accessed with a secure connection try again using an HTTPS connection." ) ; } }
|
Get the new URL for the redirect which contains the https port .
|
35,516
|
public void receive ( int requestNumber , int tran , long timeout ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "receive" , new Object [ ] { requestNumber , tran , timeout } ) ; if ( subConsumer == null ) { subConsumer = new CATSessSynchConsumer ( this ) ; } subConsumer . receive ( requestNumber , tran , timeout ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "receive" ) ; }
|
Performs a receive on this consumer . This is only a valid operation when the consumer is in synchronous mode . If the sub consumer has not been set up then this has to be created here .
|
35,517
|
public void unsetAsynchConsumerCallback ( int requestNumber , boolean stoppable ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "unsetAsynchConsumerCallback" , "requestNumber=" + requestNumber + ",stoppable=" + stoppable ) ; checkNotBrowserSession ( ) ; if ( subConsumer != null ) { subConsumer . unsetAsynchConsumerCallback ( requestNumber , stoppable ) ; } subConsumer = null ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "unsetAsynchConsumerCallback" ) ; }
|
This method will unset the asynch consumer callback . This means that the client has requested that the session should be converted from asynchronous to synchronous and so the sub consumer must be changed
|
35,518
|
public void start ( int requestNumber , boolean deliverImmediately , boolean sendReply , SendListener sendListener ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "start" , new Object [ ] { requestNumber , deliverImmediately , sendReply , sendListener } ) ; start ( requestNumber , deliverImmediately , sendReply , sendListener , false ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "start" ) ; }
|
Start the consumer
|
35,519
|
public void setBifurcatedSession ( BifurcatedConsumerSession sess ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setBifurcatedSession" , sess ) ; subConsumer = new CATBifurcatedConsumer ( this , sess ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "setBifurcatedSession" ) ; }
|
This method will put the main consumer into bifurcated mode .
|
35,520
|
private void tryRunNext ( ) { while ( runningSemaphore . tryAcquire ( ) ) { ExecutionTask execution = queue . poll ( ) ; if ( execution != null ) { try { execution . submit ( ) ; } catch ( Throwable e ) { runningSemaphore . release ( ) ; execution . exceptionHandler . handle ( e ) ; } } else { runningSemaphore . release ( ) ; break ; } } }
|
Attempt to run any queued executions
|
35,521
|
public final boolean removeExpirable ( Expirable expirable ) throws SevereMessageStoreException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "removeExpirable" , "objId=" + ( expirable == null ? "null" : String . valueOf ( expirable . expirableGetID ( ) ) ) + " ET=" + ( expirable == null ? "null" : String . valueOf ( expirable . expirableGetExpiryTime ( ) ) ) + " addEnabled=" + addEnabled ) ; } boolean reply = false ; boolean cancelled = false ; synchronized ( lockObject ) { if ( addEnabled && expirable != null ) { long expiryTime = expirable . expirableGetExpiryTime ( ) ; ExpirableReference expirableRef = new ExpirableReference ( expirable ) ; expirableRef . setExpiryTime ( expiryTime ) ; reply = expiryIndex . remove ( expirableRef ) ; if ( reply && expiryIndex . size ( ) <= 0 ) { if ( expiryAlarm != null ) { expiryAlarm . cancel ( ) ; alarmScheduled = false ; cancelled = true ; } } } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "removeExpirable" , "reply=" + reply + " cancelled=" + cancelled ) ; return reply ; }
|
Remove an Expirable reference for an item from the expiry index .
|
35,522
|
public final void start ( long expiryInterval , JsMessagingEngine jsme ) throws SevereMessageStoreException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "start" , "interval=" + expiryInterval + " indexSize=" + expiryIndex . size ( ) ) ; messagingEngine = jsme ; if ( expiryInterval >= 0 ) { interval = expiryInterval ; } else { String value = messageStore . getProperty ( MessageStoreConstants . PROP_EXPIRY_INTERVAL , MessageStoreConstants . PROP_EXPIRY_INTERVAL_DEFAULT ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "start" , "Value from property=<" + value + ">" ) ; try { this . interval = Long . parseLong ( value . trim ( ) ) ; } catch ( NumberFormatException e ) { lastException = e ; lastExceptionTime = timeNow ( ) ; SibTr . debug ( this , tc , "start" , "Unable to parse property: " + e ) ; this . interval = 1000 ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "start" , "expiryInterval=" + this . interval ) ; synchronized ( lockObject ) { if ( interval < 1 ) { runEnabled = false ; addEnabled = false ; } else { if ( expiryAlarm == null ) { runEnabled = true ; addEnabled = true ; expirerStartTime = timeNow ( ) ; if ( expiryIndex . size ( ) > 0 ) { scheduleAlarm ( interval ) ; } } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Expiry already started" ) ; SevereMessageStoreException e = new SevereMessageStoreException ( "EXPIRY_THREAD_ALREADY_RUNNING_SIMS2004" ) ; lastException = e ; lastExceptionTime = timeNow ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "start" ) ; throw e ; } } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "start" , "runEnabled=" + runEnabled + " addEnabled=" + addEnabled + " interval=" + interval ) ; }
|
Start the expiry daemon .
|
35,523
|
public final void stop ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "stop" ) ; synchronized ( lockObject ) { addEnabled = false ; if ( runEnabled ) { runEnabled = false ; expirerStopTime = timeNow ( ) ; } if ( expiryAlarm != null ) { expiryAlarm . cancel ( ) ; expiryAlarm = null ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "stop" ) ; }
|
Stop the expiry daemon .
|
35,524
|
private final boolean remove ( ExpirableReference expirableRef , boolean expired ) { boolean reply = expiryIndex . remove ( ) ; if ( reply ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Removed (" + ( expired ? "expired" : "gone" ) + ")" + " ET=" + expirableRef . getExpiryTime ( ) + " objId=" + expirableRef . getID ( ) ) ; } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Unable to remove from index: " + " ET=" + expirableRef . getExpiryTime ( ) + " objId=" + expirableRef . getID ( ) ) ; } return reply ; }
|
Remove the expirable reference from the expiry index . This will remove the current entry pointed - to by the iterator .
|
35,525
|
private int saveStartTime ( long time ) { int indexUsed = diagIndex ; alarmTime [ diagIndex ++ ] = time ; if ( diagIndex >= MAX_DIAG_LOG ) { diagIndex = 0 ; } return indexUsed ; }
|
Keep last n expiry cycle start times for diagnostic dump .
|
35,526
|
private void scheduleAlarm ( long timeOut ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "scheduleAlarm timeOut=" + timeOut ) ; synchronized ( lockObject ) { if ( ! alarmScheduled && ! alarming ) { expiryAlarm = AlarmManager . createNonDeferrable ( timeOut , this ) ; alarmScheduled = true ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "scheduleAlarm" , alarmScheduled ) ; }
|
Schedule the next alarm . Callers of this method would typically hold lockObject already .
|
35,527
|
public void reset ( ) { expirationTimeFlag = UNSET ; inactivityFlag = UNSET ; idFlag = UNSET ; priorityFlag = UNSET ; sharingPolicyFlag = UNSET ; lock = UNSET ; id = null ; timeLimit = - 1 ; inactivity = - 1 ; expirationTime = - 1 ; validatorExpirationTime = - 1 ; priority = - 1 ; sharingPolicy = NOT_SHARED ; persistToDisk = true ; templates . clear ( ) ; template = null ; dataIds . clear ( ) ; aliasList . clear ( ) ; userMetaData = null ; entryInfoPool = null ; cacheType = CacheEntry . CACHE_TYPE_DEFAULT ; externalCacheGroupId = null ; }
|
resets this EntryInfo for reuse
|
35,528
|
public void setId ( Object id ) { if ( lock == SET ) { throw new IllegalStateException ( "EntryInfo is locked" ) ; } idFlag = SET ; this . id = id ; if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "set id=" + id ) ; }
|
This sets the id variable .
|
35,529
|
public void setSharingPolicy ( int sharingPolicy ) { if ( lock == SET ) { throw new IllegalStateException ( "EntryInfo is locked" ) ; } sharingPolicyFlag = SET ; this . sharingPolicy = sharingPolicy ; if ( ( sharingPolicy != NOT_SHARED ) && ( sharingPolicy != SHARED_PUSH ) && ( sharingPolicy != SHARED_PULL ) && ( sharingPolicy != SHARED_PUSH_PULL ) ) { throw new IllegalArgumentException ( "Illegal sharing policy: " + sharingPolicy ) ; } }
|
This sets the sharing policy in the sharingPolicy variable . Included for forward compatibility with distributed caches .
|
35,530
|
public void setTimeLimit ( int timeLimit ) { if ( lock == SET ) { throw new IllegalStateException ( "EntryInfo is locked" ) ; } expirationTimeFlag = SET ; this . timeLimit = timeLimit ; if ( timeLimit > 0 ) { long ttlmsec = ( ( long ) timeLimit ) * 1000 ; expirationTime = ttlmsec + System . currentTimeMillis ( ) ; } }
|
This sets the time limit in the timeLimit variable . Once an entry is cached it will remain in the cache for this many seconds
|
35,531
|
public int getInactivity ( ) { if ( com . ibm . ws . cache . TimeLimitDaemon . UNIT_TEST_INACTIVITY ) { System . out . println ( "EntryInfo.getInactivity() " + inactivity ) ; } return inactivity ; }
|
This gets the inactivity timer for this cache entry .
|
35,532
|
public void setInactivity ( int inactivity ) { if ( lock == SET ) { throw new IllegalStateException ( "EntryInfo is locked" ) ; } inactivityFlag = SET ; this . inactivity = inactivity ; if ( com . ibm . ws . cache . TimeLimitDaemon . UNIT_TEST_INACTIVITY ) { System . out . println ( "EntryInfo.setInactivity() " + inactivity ) ; } }
|
This sets the inactivity timer variable . Once an entry is cached it will remain in the cache for this many seconds if not accessed .
|
35,533
|
public void setExpirationTime ( long expirationTime ) { if ( lock == SET ) { throw new IllegalStateException ( "EntryInfo is locked" ) ; } expirationTimeFlag = SET ; this . expirationTime = expirationTime ; this . timeLimit = ( int ) ( ( expirationTime - System . currentTimeMillis ( ) ) / 1000L ) ; }
|
This sets the expirationTime variable .
|
35,534
|
public void addTemplate ( String template ) { if ( lock == SET ) { throw new IllegalStateException ( "EntryInfo is locked" ) ; } if ( template != null && ! template . equals ( "" ) ) { templates . add ( template ) ; } }
|
This adds a template name to the templates variable .
|
35,535
|
public void addDataId ( Object dataId ) { if ( lock == SET ) { throw new IllegalStateException ( "EntryInfo is locked" ) ; } if ( dataId != null && ! dataId . equals ( "" ) ) { dataIds . add ( dataId ) ; } }
|
This unions a new data id into the dataIds variable .
|
35,536
|
public void addAlias ( Object alias ) { if ( lock == SET ) { throw new IllegalStateException ( "EntryInfo is locked" ) ; } if ( alias != null && ! alias . equals ( "" ) ) { aliasList . add ( alias ) ; } }
|
This unions a new alias into the aliasList variable .
|
35,537
|
@ FFDCIgnore ( Exception . class ) protected final void shutdownFramework ( ) { try { Bundle bundle = context . getBundle ( Constants . SYSTEM_BUNDLE_LOCATION ) ; if ( bundle != null ) bundle . stop ( ) ; } catch ( Exception e ) { } }
|
When an error occurs during startup then this method is used to stop the root bundle thus bringing down the OSGi framework .
|
35,538
|
List < String > getNames ( ) { if ( addrList == null ) return jmfNames ; return new AbstractList < String > ( ) { public int size ( ) { return addrList . size ( ) ; } public String get ( int index ) { return ( ( JsDestinationAddress ) addrList . get ( index ) ) . getDestinationName ( ) ; } } ; }
|
measurements may show otherwise .
|
35,539
|
public int readInt ( InputStream in ) throws ConversionException , IOException { JSONArray json = parseArray ( in ) ; if ( json . size ( ) != 1 ) { throwConversionException ( "readInt() expects one item in the array: [ Integer ]." , json ) ; } return readIntInternal ( json . get ( 0 ) ) ; }
|
Decode a JSON document to retrieve an integer value .
|
35,540
|
public boolean readBoolean ( InputStream in ) throws ConversionException , IOException { JSONArray json = parseArray ( in ) ; if ( json . size ( ) != 1 ) { throwConversionException ( "readBoolean() expects one item in the array: [ true | false ]." , json ) ; } return readBooleanInternal ( json . get ( 0 ) ) ; }
|
Decode a JSON document to retrieve an boolean value .
|
35,541
|
public String readString ( InputStream in ) throws ConversionException , IOException { JSONArray json = parseArray ( in ) ; if ( json . size ( ) != 1 ) { throwConversionException ( "readString() expects one item in the array: [ String ]." , json ) ; } return readStringInternal ( json . get ( 0 ) ) ; }
|
Decode a JSON document to retrieve a String value .
|
35,542
|
public Object readPOJO ( InputStream in ) throws ConversionException , IOException , ClassNotFoundException { return readPOJOInternal ( parse ( in ) ) ; }
|
Decode a JSON document to retrieve an Object .
|
35,543
|
public JMXServerInfo readJMX ( InputStream in ) throws ConversionException , IOException { JSONObject json = parseObject ( in ) ; JMXServerInfo ret = new JMXServerInfo ( ) ; ret . version = readIntInternal ( json . get ( N_VERSION ) ) ; ret . mbeansURL = readStringInternal ( json . get ( N_MBEANS ) ) ; ret . createMBeanURL = readStringInternal ( json . get ( N_CREATEMBEAN ) ) ; ret . mbeanCountURL = readStringInternal ( json . get ( N_MBEANCOUNT ) ) ; ret . defaultDomainURL = readStringInternal ( json . get ( N_DEFAULTDOMAIN ) ) ; ret . domainsURL = readStringInternal ( json . get ( N_DOMAINS ) ) ; ret . notificationsURL = readStringInternal ( json . get ( N_NOTIFICATIONS ) ) ; ret . instanceOfURL = readStringInternal ( json . get ( N_INSTANCEOF ) ) ; ret . fileTransferURL = readStringInternal ( json . get ( N_FILE_TRANSFER ) ) ; ret . apiURL = readStringInternal ( json . get ( N_API ) ) ; ret . graphURL = readStringInternal ( json . get ( N_GRAPH ) ) ; return ret ; }
|
Decode a JSON document to retrieve a JMX instance .
|
35,544
|
public ObjectInstanceWrapper [ ] readObjectInstances ( InputStream in ) throws ConversionException , IOException { JSONArray json = parseArray ( in ) ; ObjectInstanceWrapper [ ] ret = new ObjectInstanceWrapper [ json . size ( ) ] ; int pos = 0 ; for ( Object item : json ) { ret [ pos ++ ] = readObjectInstanceInternal ( item ) ; } return ret ; }
|
Decode a JSON document to retrieve an ObjectInstanceWrapper array .
|
35,545
|
public MBeanQuery readMBeanQuery ( InputStream in ) throws ConversionException , IOException , ClassNotFoundException { JSONObject json = parseObject ( in ) ; MBeanQuery ret = new MBeanQuery ( ) ; ret . objectName = readObjectName ( json . get ( N_OBJECTNAME ) ) ; Object queryExp = readSerialized ( json . get ( N_QUERYEXP ) ) ; if ( queryExp != null && ! ( queryExp instanceof QueryExp ) ) { throwConversionException ( "readMBeanQuery() receives an instance that's not a QueryExp." , json . get ( N_QUERYEXP ) ) ; } ret . queryExp = ( QueryExp ) queryExp ; ret . className = readStringInternal ( json . get ( N_CLASSNAME ) ) ; return ret ; }
|
Decode a JSON document to retrieve an MBeanQuery instance .
|
35,546
|
public CreateMBean readCreateMBean ( InputStream in ) throws ConversionException , IOException , ClassNotFoundException { JSONObject json = parseObject ( in ) ; CreateMBean ret = new CreateMBean ( ) ; ret . objectName = readObjectName ( json . get ( N_OBJECTNAME ) ) ; ret . className = readStringInternal ( json . get ( N_CLASSNAME ) ) ; ret . loaderName = readObjectName ( json . get ( N_LOADERNAME ) ) ; ret . params = readPOJOArray ( json . get ( N_PARAMS ) ) ; ret . signature = readStringArrayInternal ( json . get ( N_SIGNATURE ) ) ; ret . useLoader = readBooleanInternal ( json . get ( N_USELOADER ) ) ; ret . useSignature = readBooleanInternal ( json . get ( N_USESIGNATURE ) ) ; return ret ; }
|
Decode a JSON document to retrieve a CreateMBean instance .
|
35,547
|
@ SuppressWarnings ( "unchecked" ) public MBeanInfoWrapper readMBeanInfo ( InputStream in ) throws ConversionException , IOException , ClassNotFoundException { JSONObject json = parseObject ( in ) ; MBeanInfoWrapper ret = new MBeanInfoWrapper ( ) ; if ( USE_BASE64_FOR_MBEANINFO ) { Object o = readSerialized ( json . get ( N_SERIALIZED ) ) ; if ( ! ( o instanceof MBeanInfo ) ) { throwConversionException ( "readMBeanInfo() receives an instance that's not a MBeanInfo." , json . get ( N_SERIALIZED ) ) ; } ret . mbeanInfo = ( MBeanInfo ) o ; ret . attributesURL = readStringInternal ( json . get ( N_ATTRIBUTES_URL ) ) ; o = readSerialized ( json . get ( OM_ATTRIBUTES ) ) ; if ( ! ( o instanceof HashMap ) ) { throwConversionException ( "readMBeanInfo() receives an instance that's not a HashMap." , json . get ( OM_ATTRIBUTES ) ) ; } ret . attributeURLs = ( Map < String , String > ) o ; o = readSerialized ( json . get ( OM_OPERATIONS ) ) ; if ( ! ( o instanceof HashMap ) ) { throwConversionException ( "readMBeanInfo() receives an instance that's not a HashMap." , json . get ( OM_OPERATIONS ) ) ; } ret . operationURLs = ( Map < String , String > ) o ; return ret ; } ret . attributeURLs = new HashMap < String , String > ( ) ; ret . operationURLs = new HashMap < String , String > ( ) ; String className = readStringInternal ( json . get ( N_CLASSNAME ) ) ; String description = readStringInternal ( json . get ( N_DESCRIPTION ) ) ; Descriptor descriptor = readDescriptor ( json . get ( N_DESCRIPTOR ) ) ; MBeanAttributeInfo [ ] attributes = readAttributes ( json . get ( N_ATTRIBUTES ) , ret . attributeURLs ) ; String attributeURL = readStringInternal ( json . get ( N_ATTRIBUTES_URL ) ) ; MBeanConstructorInfo [ ] constructors = readConstructors ( json . get ( N_CONSTRUCTORS ) ) ; MBeanNotificationInfo [ ] notifications = readNotifications ( json . get ( N_NOTIFICATIONS ) ) ; MBeanOperationInfo [ ] operations = readOperations ( json . get ( N_OPERATIONS ) , ret . operationURLs ) ; ret . attributesURL = attributeURL ; Object o = json . get ( N_SERIALIZED ) ; if ( o != null ) { o = readSerialized ( o ) ; if ( ! ( o instanceof MBeanInfo ) ) { throwConversionException ( "readMBeanInfo() receives an instance that's not a MBeanInfo." , json . get ( N_SERIALIZED ) ) ; } ret . mbeanInfo = ( MBeanInfo ) o ; } else { ret . mbeanInfo = new MBeanInfo ( className , description , attributes , constructors , operations , notifications , descriptor ) ; } return ret ; }
|
Decode a JSON document to retrieve an MBeanInfoWrapper instance .
|
35,548
|
public AttributeList readAttributeList ( InputStream in ) throws ConversionException , IOException , ClassNotFoundException { JSONArray json = parseArray ( in ) ; AttributeList ret = new AttributeList ( ) ; for ( Object item : json ) { if ( ! ( item instanceof JSONObject ) ) { throwConversionException ( "readAttributeList() receives an items that's not a JSONObject." , item ) ; } JSONObject jo = ( JSONObject ) item ; String name = readStringInternal ( jo . get ( N_NAME ) ) ; Object value = readPOJOInternal ( jo . get ( N_VALUE ) ) ; ret . add ( new Attribute ( name , value ) ) ; } return ret ; }
|
Decode a JSON document to retrieve an AttributeList instance .
|
35,549
|
public Invocation readInvocation ( InputStream in ) throws ConversionException , IOException , ClassNotFoundException { JSONObject json = parseObject ( in ) ; Invocation ret = new Invocation ( ) ; ret . params = readPOJOArray ( json . get ( N_PARAMS ) ) ; ret . signature = readStringArrayInternal ( json . get ( N_SIGNATURE ) ) ; return ret ; }
|
Decode a JSON document to retrieve an Invocation instance .
|
35,550
|
public NotificationArea readNotificationArea ( InputStream in ) throws ConversionException , IOException { JSONObject json = parseObject ( in ) ; NotificationArea ret = new NotificationArea ( ) ; ret . registrationsURL = readStringInternal ( json . get ( N_REGISTRATIONS ) ) ; ret . serverRegistrationsURL = readStringInternal ( json . get ( N_SERVERREGISTRATIONS ) ) ; ret . inboxURL = readStringInternal ( json . get ( N_INBOX ) ) ; ret . clientURL = readStringInternal ( json . get ( N_CLIENT ) ) ; return ret ; }
|
Decode a JSON document to retrieve a NotificationArea instance .
|
35,551
|
public NotificationRegistration readNotificationRegistration ( InputStream in ) throws ConversionException , IOException , ClassNotFoundException { JSONObject json = parseObject ( in ) ; NotificationRegistration ret = new NotificationRegistration ( ) ; ret . objectName = readObjectName ( json . get ( N_OBJECTNAME ) ) ; ret . filters = readNotificationFiltersInternal ( json . get ( N_FILTERS ) ) ; return ret ; }
|
Decode a JSON document to retrieve a NotificationRegistration instance .
|
35,552
|
public ServerNotificationRegistration readServerNotificationRegistration ( InputStream in ) throws ConversionException , IOException , ClassNotFoundException { JSONObject json = parseObject ( in ) ; ServerNotificationRegistration ret = new ServerNotificationRegistration ( ) ; String name = readStringInternal ( json . get ( N_OPERATION ) ) ; ret . operation = name != null ? Operation . valueOf ( name ) : null ; ret . objectName = readObjectName ( json . get ( N_OBJECTNAME ) ) ; ret . listener = readObjectName ( json . get ( N_LISTENER ) ) ; ret . filter = readNotificationFilterInternal ( json . get ( N_FILTER ) , true ) ; ret . handback = readPOJOInternal ( json . get ( N_HANDBACK ) ) ; ret . filterID = readIntInternal ( json . get ( N_FILTERID ) ) ; ret . handbackID = readIntInternal ( json . get ( N_HANDBACKID ) ) ; return ret ; }
|
Decode a JSON document to retrieve a ServerNotificationRegistration instance .
|
35,553
|
public boolean isSupportedNotificationFilter ( NotificationFilter filter ) { Class < ? > clazz = filter . getClass ( ) ; return clazz == AttributeChangeNotificationFilter . class || clazz == MBeanServerNotificationFilter . class || clazz == NotificationFilterSupport . class ; }
|
Check if a NotificationFilter is a standard filter that can be send to a JMX server .
|
35,554
|
public NotificationFilter [ ] readNotificationFilters ( InputStream in ) throws ConversionException , IOException , ClassNotFoundException { return readNotificationFiltersInternal ( parseArray ( in ) ) ; }
|
Decode a JSON document to retrieve a NotificationFilter array .
|
35,555
|
public Notification [ ] readNotifications ( InputStream in ) throws ConversionException , IOException , ClassNotFoundException { final NotificationRecord [ ] records = readNotificationRecords ( in ) ; final Notification [ ] ret = new Notification [ records . length ] ; for ( int i = 0 ; i < records . length ; ++ i ) { ret [ i ] = records [ i ] . getNotification ( ) ; } return ret ; }
|
Decode a JSON document to retrieve an array of Notification instances .
|
35,556
|
public NotificationSettings readNotificationSettings ( InputStream in ) throws ConversionException , IOException { JSONObject json = parseObject ( in ) ; NotificationSettings ret = new NotificationSettings ( ) ; ret . deliveryInterval = readIntInternal ( json . get ( N_DELIVERYINTERVAL ) ) ; ret . inboxExpiry = readIntInternal ( json . get ( N_INBOXEXPIRY ) ) ; return ret ; }
|
Decode a JSON document to retrieve a NotificationSettings instance .
|
35,557
|
public Throwable readThrowable ( InputStream in ) throws ConversionException , IOException , ClassNotFoundException { byte [ ] byteInputStream = convertInputStreamToBytes ( in ) ; ByteArrayInputStream bais = new ByteArrayInputStream ( byteInputStream ) ; JSONObject json = null ; try { json = parseObject ( bais ) ; } catch ( IOException ex ) { bais . reset ( ) ; throw new RuntimeException ( convertStreamToString ( bais ) ) ; } Object t = readSerialized ( json . get ( N_THROWABLE ) ) ; if ( ! ( t instanceof Throwable ) ) { throwConversionException ( "readThrowable() receives an instance that's not a Throwable." , json . get ( N_THROWABLE ) ) ; } return ( Throwable ) t ; }
|
Decode a JSON document to retrieve a Throwable instance .
|
35,558
|
private byte [ ] convertInputStreamToBytes ( InputStream in ) throws IOException { ByteArrayOutputStream buffer = new ByteArrayOutputStream ( ) ; int len ; byte [ ] data = new byte [ 16384 ] ; while ( ( len = in . read ( data , 0 , data . length ) ) != - 1 ) { buffer . write ( data , 0 , len ) ; } buffer . flush ( ) ; return buffer . toByteArray ( ) ; }
|
Converts inputstream to bytearray
|
35,559
|
public String encodeStringAsBase64 ( String value ) throws ConversionException { try { return encodeStringAsBase64Internal ( value ) ; } catch ( IOException e ) { return null ; } }
|
Encode a String in base64 . The content of the string is first encoded as UTF - 8 bytes the bytes are then base64 encoded . The resulting base64 value is returned as a String .
|
35,560
|
private void writeSimpleString ( OutputStream out , CharSequence value ) throws IOException { out . write ( '"' ) ; for ( int i = 0 ; i < value . length ( ) ; i ++ ) { out . write ( value . charAt ( i ) ) ; } out . write ( '"' ) ; }
|
The value can t be null .
|
35,561
|
public String getTemporaryQueueNamePrefix ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getTemporaryQueueNamePrefix" ) ; String prefix = jcaConnectionFactory . getTemporaryQueueNamePrefix ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getTemporaryQueueNamePrefix" , prefix ) ; return prefix ; }
|
Get the temp queue name prefix
|
35,562
|
public String getPassword ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getPassword" ) ; String password = jcaConnectionFactory . getPassword ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getPassword" ) ; return password ; }
|
This method is not added in the interface JmsManagedConnectionFactory since it s for internal use only .
|
35,563
|
public String getConnectionProximity ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getConnectionProximity" ) ; String connectionProximity = jcaConnectionFactory . getConnectionProximity ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getConnectionProximity" , connectionProximity ) ; return connectionProximity ; }
|
Gets the connection proximity
|
35,564
|
public String getProviderEndpoints ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getProviderEndpoints" ) ; String providerEndpoints = jcaConnectionFactory . getProviderEndpoints ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getProviderEndpoints" , providerEndpoints ) ; return providerEndpoints ; }
|
Gets the provider endpoints 181802 . 2
|
35,565
|
public String getTargetTransportChain ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getTargetTransportChain" ) ; String targetTransportChain = jcaConnectionFactory . getTargetTransportChain ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getTargetTransportChain" , targetTransportChain ) ; return targetTransportChain ; }
|
Gets the remote protocol
|
35,566
|
public String getTarget ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getTarget" ) ; String remoteTargetGroup = jcaConnectionFactory . getTarget ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getTarget" , remoteTargetGroup ) ; return remoteTargetGroup ; }
|
Gets the target
|
35,567
|
public String getTargetType ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getTargetType" ) ; String remoteTargetType = jcaConnectionFactory . getTargetType ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getTargetType" , remoteTargetType ) ; return remoteTargetType ; }
|
Gets the target type
|
35,568
|
@ SuppressWarnings ( "rawtypes" ) public Class getException ( ) { try { return Class . forName ( errorParam , true , Thread . currentThread ( ) . getContextClassLoader ( ) ) . newInstance ( ) . getClass ( ) ; } catch ( Exception e ) { return null ; } }
|
Use of the WAR class loader is correct .
|
35,569
|
@ SuppressWarnings ( "rawtypes" ) public Class getException ( ClassLoader warClassLoader ) { try { return Class . forName ( errorParam , true , warClassLoader ) ; } catch ( Exception e ) { return null ; } }
|
PK52168 - STARTS
|
35,570
|
private byte [ ] readIndefiniteLengthFully ( ) throws IOException { ByteArrayOutputStream bOut = new ByteArrayOutputStream ( ) ; int b , b1 ; b1 = read ( ) ; while ( ( b = read ( ) ) >= 0 ) { if ( b1 == 0 && b == 0 ) { break ; } bOut . write ( b1 ) ; b1 = b ; } return bOut . toByteArray ( ) ; }
|
read a string of bytes representing an indefinite length object .
|
35,571
|
public static String [ ] generateUniqueIdCache ( String prefix , int count ) { String [ ] cache = new String [ count ] ; SectionUniqueIdCounter counter = new SectionUniqueIdCounter ( prefix ) ; for ( int i = 0 ; i < count ; i ++ ) { cache [ i ] = counter . generateUniqueId ( ) ; } return cache ; }
|
Creates an array of the generated unique ids for an specified prefix than can be used later to prevent calculate the same String over and over .
|
35,572
|
public Set < HeaderField > getHeaders ( ) { HashSet < HeaderField > headerFields = new HashSet < HeaderField > ( ) ; if ( _headers . size ( ) > 0 ) { Iterator < String > headerNames = _headers . keySet ( ) . iterator ( ) ; while ( headerNames . hasNext ( ) ) { Iterator < HttpHeaderField > headers = _headers . get ( headerNames . next ( ) ) . iterator ( ) ; while ( headers . hasNext ( ) ) { HttpHeaderField field = headers . next ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "getHeaders()" , "add header name = " + field . getName ( ) + ", value = " + field . asString ( ) ) ; } headerFields . add ( field ) ; } } } return headerFields ; }
|
Methods required by com . ibm . wsspi . http . ee8 . HttpPushBuilder
|
35,573
|
private void reset ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "reset()" , "Clearing the path and removing conditional headers" ) ; } _path = null ; _pathURI = null ; _queryString = null ; _pathQueryString = null ; removeHeader ( HDR_IF_MATCH ) ; removeHeader ( HDR_IF_MODIFIED_SINCE ) ; removeHeader ( HDR_IF_NONE_MATCH ) ; removeHeader ( HDR_IF_RANGE ) ; removeHeader ( HDR_IF_UNMODIFIED_SINCE ) ; }
|
Reset the state of this PushBuilder before next push
|
35,574
|
protected synchronized void installJAASConfigurationFromJAASConfigFile ( ) { JAASLoginConfig jaasLoginConfig = jaasLoginConfigRef . getService ( ) ; if ( jaasLoginConfig != null ) { jaasConfigurationEntriesFromJaasConfig = jaasLoginConfig . getEntries ( ) ; if ( jaasConfigurationEntriesFromJaasConfig != null ) { if ( jaasSecurityConfiguration == null ) { jaasSecurityConfiguration = new JAASSecurityConfiguration ( ) ; Configuration . setConfiguration ( jaasSecurityConfiguration ) ; } jaasSecurityConfiguration . setAppConfigurationEntries ( jaasConfigurationEntriesFromJaasConfig ) ; } } }
|
This method optional install the JAAS configuration that specified in the jaas . conf file
|
35,575
|
@ SuppressWarnings ( "unchecked" ) public static List < ProductRequirementInformation > createFromAppliesTo ( String appliesTo ) { if ( appliesTo == null || appliesTo . isEmpty ( ) ) { throw new InvalidParameterException ( "Applies to must be set to a valid value but is " + appliesTo ) ; } List < ProductRequirementInformation > products = new ArrayList < ProductRequirementInformation > ( ) ; List < ProductMatch > matchers = SelfExtractor . parseAppliesTo ( appliesTo ) ; for ( ProductMatch match : matchers ) { String productId = match . getProductId ( ) ; String version = match . getVersion ( ) ; final String versionRange ; if ( version != null && version . endsWith ( "+" ) ) { versionRange = version . substring ( 0 , version . length ( ) - 1 ) ; } else { if ( version != null ) { versionRange = Character . toString ( VersionRange . LEFT_CLOSED ) + version + ", " + version + Character . toString ( VersionRange . RIGHT_CLOSED ) ; } else { versionRange = null ; } } String installType = match . getInstallType ( ) ; String licenseType = match . getLicenseType ( ) ; List < String > editions = match . getEditions ( ) ; products . add ( new ProductRequirementInformation ( versionRange , productId , installType , licenseType , editions ) ) ; } return products ; }
|
Parse an appliesTo string to produce a list of product requirements
|
35,576
|
Neighbour [ ] getMembers ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getMembers" ) ; SibTr . exit ( tc , "getMembers" ) ; } return iNeighbours ; }
|
Method that returns all the Neighbours for this Bus
|
35,577
|
Hashtable getLocalSubscriptions ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getLocalSubscriptions" ) ; SibTr . exit ( tc , "getLocalSubscriptions" , iLocalSubscriptions ) ; } return ( Hashtable ) iLocalSubscriptions . clone ( ) ; }
|
Gets all the local subscriptions that have been sent to this Bus .
|
35,578
|
Hashtable getRemoteSubscriptions ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getRemoteSubscriptions" ) ; SibTr . exit ( tc , "getRemoteSubscriptions" , iRemoteSubscriptions ) ; } return ( Hashtable ) iRemoteSubscriptions . clone ( ) ; }
|
Gets all the remote subscriptions that have been sent to this Bus .
|
35,579
|
SubscriptionMessageHandler addRemoteSubscription ( SIBUuid12 topicSpace , String topic , SubscriptionMessageHandler messageHandler , boolean sendProxy ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "addRemoteSubscription" , new Object [ ] { topicSpace , topic , messageHandler } ) ; messageHandler = addSubscription ( null , topicSpace , topic , messageHandler , iRemoteSubscriptions , sendProxy ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "addRemoteSubscription" , messageHandler ) ; return messageHandler ; }
|
Adds a remote subscription to this ME .
|
35,580
|
SubscriptionMessageHandler removeRemoteSubscription ( SIBUuid12 topicSpace , String topic , SubscriptionMessageHandler messageHandler , boolean sendProxy ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "removeRemoteSubscription" , new Object [ ] { topicSpace , topic , messageHandler } ) ; messageHandler = removeSubscription ( topicSpace , topic , messageHandler , iRemoteSubscriptions , sendProxy ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "removeRemoteSubscription" , messageHandler ) ; return messageHandler ; }
|
Called when an unsubscribe needs to be propagated to the group . Decrements the reference count on the subscription for any subscriptions registered remotely .
|
35,581
|
private SubscriptionMessageHandler removeSubscription ( SIBUuid12 topicSpace , String topic , SubscriptionMessageHandler messageHandler , Hashtable subscriptionsTable , boolean sendProxy ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "removeSubscription" , new Object [ ] { topicSpace , topic , messageHandler , subscriptionsTable , new Boolean ( sendProxy ) } ) ; final String key = subscriptionKey ( topicSpace , topic ) ; synchronized ( subscriptionLock ) { final MESubscription subscription = ( MESubscription ) subscriptionsTable . get ( key ) ; if ( subscription == null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "removeSubscription" , "Non Existent Subscription " + topicSpace + ":" + topic ) ; return messageHandler ; } messageHandler = doProxySubscribeOp ( subscription . removeRef ( ) , subscription , messageHandler , subscriptionsTable , sendProxy ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "removeSubscription" , messageHandler ) ; return messageHandler ; }
|
Called when an unsubscribe needs to be propagated to the group . Decrements the reference count on the subscription .
|
35,582
|
protected void sendToNeighbours ( SubscriptionMessage msg , Transaction transaction , boolean startup ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "sendToNeighbours" , new Object [ ] { msg , transaction , new Boolean ( startup ) } ) ; for ( int i = 0 ; i < iNeighbours . length ; i ++ ) { if ( startup ) { msg . setSubscriptionMessageType ( SubscriptionMessageType . REQUEST ) ; iNeighbours [ i ] . setRequestedProxySubscriptions ( ) ; } iNeighbours [ i ] . sendToNeighbour ( msg , transaction ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "sendToNeighbours" ) ; }
|
Sends the messages to all the Neighbours in this Bus .
|
35,583
|
void addNeighbour ( Neighbour neighbour ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "addNeighbour" , neighbour ) ; final Neighbour [ ] tmp = new Neighbour [ iNeighbours . length + 1 ] ; System . arraycopy ( iNeighbours , 0 , tmp , 0 , iNeighbours . length ) ; tmp [ iNeighbours . length ] = neighbour ; iNeighbours = tmp ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "addNeighbour" ) ; }
|
Adds a reference of Neighbour to this Bus group
|
35,584
|
void removeNeighbour ( Neighbour neighbour ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "removeNeighbour" , neighbour ) ; Neighbour [ ] tmp = iNeighbours ; for ( int i = 0 ; i < iNeighbours . length ; ++ i ) if ( iNeighbours [ i ] . equals ( neighbour ) ) { tmp = new Neighbour [ iNeighbours . length - 1 ] ; System . arraycopy ( iNeighbours , 0 , tmp , 0 , i ) ; System . arraycopy ( iNeighbours , i + 1 , tmp , i , iNeighbours . length - i - 1 ) ; iNeighbours = tmp ; break ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "removeNeighbour" ) ; }
|
Removes a Neighbour reference from this Bus group
|
35,585
|
private SubscriptionMessageHandler doProxySubscribeOp ( int op , MESubscription subscription , SubscriptionMessageHandler messageHandler , Hashtable subscriptionsTable , boolean sendProxy ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "doProxySubscribeOp" , new Object [ ] { new Integer ( op ) , subscription , messageHandler , new Boolean ( sendProxy ) } ) ; if ( ! sendProxy ) { if ( op == MESubscription . UNSUBSCRIBE ) subscriptionsTable . remove ( subscriptionKey ( subscription . getTopicSpaceUuid ( ) , subscription . getTopic ( ) ) ) ; op = MESubscription . NOP ; } switch ( op ) { case MESubscription . SUBSCRIBE : if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Publishing new Subscription " + subscription + "," + sendProxy ) ; if ( messageHandler == null ) { messageHandler = iProxyHandler . getMessageHandler ( ) ; messageHandler . resetCreateSubscriptionMessage ( subscription , isLocalBus ) ; } else { messageHandler . addSubscriptionToMessage ( subscription , isLocalBus ) ; } break ; case MESubscription . UNSUBSCRIBE : if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Publishing Delete subscription " + subscription + "," + sendProxy ) ; messageHandler = iProxyHandler . getMessageHandler ( ) ; messageHandler . resetDeleteSubscriptionMessage ( subscription , isLocalBus ) ; subscriptionsTable . remove ( subscriptionKey ( subscription . getTopicSpaceUuid ( ) , subscription . getTopic ( ) ) ) ; break ; default : if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Doing nothing for subscription " + subscription + "," + sendProxy ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "doProxySubscribeOp" , messageHandler ) ; return messageHandler ; }
|
Performs a proxy subscription operation for the given subscription .
|
35,586
|
protected SubscriptionMessage generateResetSubscriptionMessage ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "generateResetSubscriptionMessage" ) ; final SubscriptionMessageHandler messageHandler = iProxyHandler . getMessageHandler ( ) ; messageHandler . resetResetSubscriptionMessage ( ) ; addToMessage ( messageHandler , iLocalSubscriptions ) ; addToMessage ( messageHandler , iRemoteSubscriptions ) ; SubscriptionMessage message = messageHandler . getSubscriptionMessage ( ) ; iProxyHandler . addMessageHandler ( messageHandler ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "generateResetSubscriptionMessage" , message ) ; return message ; }
|
Generates the reset subscription message that should be sent to a member or members of this Bus .
|
35,587
|
protected SubscriptionMessage generateReplySubscriptionMessage ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "generateReplySubscriptionMessage" ) ; final SubscriptionMessageHandler messageHandler = iProxyHandler . getMessageHandler ( ) ; messageHandler . resetReplySubscriptionMessage ( ) ; if ( iLocalSubscriptions . size ( ) > 0 ) addToMessage ( messageHandler , iLocalSubscriptions ) ; if ( iRemoteSubscriptions . size ( ) > 0 ) addToMessage ( messageHandler , iRemoteSubscriptions ) ; SubscriptionMessage message = messageHandler . getSubscriptionMessage ( ) ; iProxyHandler . addMessageHandler ( messageHandler ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "generateReplySubscriptionMessage" , message ) ; return message ; }
|
Generates the reply subscription message that should be sent to a the neighbor on the Bus who sent the request .
|
35,588
|
private final void addToMessage ( SubscriptionMessageHandler messageHandler , Hashtable subscriptions ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "addToMessage" , new Object [ ] { messageHandler , subscriptions } ) ; Enumeration enu = subscriptions . elements ( ) ; while ( enu . hasMoreElements ( ) ) { final MESubscription subscription = ( MESubscription ) enu . nextElement ( ) ; messageHandler . addSubscriptionToMessage ( subscription , isLocalBus ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "addToMessage" ) ; }
|
Adds the subscriptions to the subscription message
|
35,589
|
void resetListFailed ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "resetListFailed" ) ; for ( int i = 0 ; i < iNeighbours . length ; i ++ ) { iNeighbours [ i ] . resetListFailed ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "resetListFailed" ) ; }
|
If at startup the reset list failed then we need to try and send it again . Each Neighbour needs to be told that the send failed so that it can retry .
|
35,590
|
protected MultiThreadedWorker getMultiThreadedWorker ( SelectionKey key , long threadIdfWQM ) { MultiThreadedWorker worker = null ; synchronized ( multiThreadedObjectPool ) { worker = ( MultiThreadedWorker ) multiThreadedObjectPool . get ( ) ; } if ( worker == null ) { worker = new MultiThreadedWorker ( this ) ; } worker . set ( key ) ; return worker ; }
|
Retrieve a MultiThreadedWorker object from the object pool .
|
35,591
|
String resolveSymbolicString ( String symbolicPath ) { if ( symbolicPath == null ) throw new NullPointerException ( "Path must be non-null" ) ; return resolveStringSymbols ( symbolicPath , symbolicPath , true , 0 , true ) ; }
|
Resolves the given string evaluating all symbols and path - normalizes the value .
|
35,592
|
String resolveRawSymbolicString ( String string ) { if ( string == null ) throw new NullPointerException ( "String must be non-null" ) ; return resolveStringSymbols ( string , string , true , 0 , false ) ; }
|
Resolves the given string evaluating all symbols but does NOT path - normalize the value .
|
35,593
|
protected boolean addJwtCookies ( String cookieByteString , HttpServletRequest req , HttpServletResponse resp ) { String baseName = getJwtCookieName ( ) ; if ( baseName == null ) { return false ; } if ( ( ! req . isSecure ( ) ) && getJwtCookieSecure ( ) ) { Tr . warning ( tc , "JWT_COOKIE_SECURITY_MISMATCH" , new Object [ ] { } ) ; } String [ ] chunks = splitString ( cookieByteString , 3900 ) ; String cookieName = baseName ; for ( int i = 0 ; i < chunks . length ; i ++ ) { if ( i > 98 ) { String eMsg = "Too many jwt cookies created" ; com . ibm . ws . ffdc . FFDCFilter . processException ( new Exception ( eMsg ) , this . getClass ( ) . getName ( ) , "132" ) ; break ; } Cookie ssoCookie = createCookie ( req , cookieName , chunks [ i ] , getJwtCookieSecure ( ) ) ; resp . addCookie ( ssoCookie ) ; cookieName = baseName + ( i + 2 < 10 ? "0" : "" ) + ( i + 2 ) ; } return true ; }
|
Add the cookie or cookies as needed depending on size of token . Return true if any cookies were added
|
35,594
|
public void removeSSOCookieFromResponse ( HttpServletResponse resp ) { if ( resp instanceof com . ibm . wsspi . webcontainer . servlet . IExtendedResponse ) { ( ( com . ibm . wsspi . webcontainer . servlet . IExtendedResponse ) resp ) . removeCookie ( getSSOCookiename ( ) ) ; removeJwtSSOCookies ( ( com . ibm . wsspi . webcontainer . servlet . IExtendedResponse ) resp ) ; } }
|
Remove a cookie from the response
|
35,595
|
protected synchronized void updateCookieCache ( ByteArray cookieBytes , String cookieByteString ) { if ( cookieByteStringCache . size ( ) > MAX_COOKIE_STRING_ENTRIES ) cookieByteStringCache . clear ( ) ; if ( cookieByteString != null ) cookieByteStringCache . put ( cookieBytes , cookieByteString ) ; }
|
Perform some cookie cache maintenance . If the cookie cache has grown too large clear it . Otherwise store the cookieByteString into the cache based on the cookieBytes .
|
35,596
|
protected boolean isJwtCookie ( String baseName , String cookieName ) { if ( baseName . equalsIgnoreCase ( cookieName ) ) return true ; if ( ! ( cookieName . startsWith ( baseName ) ) ) { return false ; } if ( cookieName . length ( ) != baseName . length ( ) + 2 ) { return false ; } String lastTwoChars = cookieName . substring ( baseName . length ( ) ) ; return lastTwoChars . matches ( "\\d\\d" ) ; }
|
see if cookiename is a jwtsso cookie based on the name .
|
35,597
|
protected String resolveCookieName ( Cookie [ ] cookies ) { boolean foundCookie = false ; String ssoCookieName = this . getSSOCookiename ( ) ; if ( cookies != null ) { for ( int i = 0 ; i < cookies . length ; i ++ ) { if ( cookies [ i ] . getName ( ) . equalsIgnoreCase ( ssoCookieName ) ) { foundCookie = true ; break ; } } } if ( ! foundCookie && ! config . isUseOnlyCustomCookieName ( ) ) return SSOAuthenticator . DEFAULT_SSO_COOKIE_NAME ; else return ssoCookieName ; }
|
1 ) If we found the cookie associate with the cookie name we will use the cookie name 2 ) If we can not find the cookie associate with the cookie name we will use the default cookie name LTPAToken2 if isUseOnlyCustomCookieName is false
|
35,598
|
public String getJwtSsoTokenFromCookies ( HttpServletRequest req , String baseName ) { StringBuffer tokenStr = new StringBuffer ( ) ; String cookieName = baseName ; for ( int i = 1 ; i <= 99 ; i ++ ) { if ( i > 1 ) { cookieName = baseName + ( i < 10 ? "0" : "" ) + i ; } String cookieValue = getCookieValue ( req , cookieName ) ; if ( cookieValue == null ) { break ; } if ( cookieValue . length ( ) > 0 ) { tokenStr . append ( cookieValue ) ; } } return tokenStr . length ( ) > 0 ? tokenStr . toString ( ) : null ; }
|
The token can be split across multiple cookies if it is over 3900 chars . Look for subsequent cookies and concatenate them in that case . The counterpart for this method is SSOCookieHelperImpl . addJwtSsoCookiesToResponse .
|
35,599
|
public static DERGeneralizedTime getInstance ( Object obj ) { if ( obj == null || obj instanceof DERGeneralizedTime ) { return ( DERGeneralizedTime ) obj ; } if ( obj instanceof ASN1OctetString ) { return new DERGeneralizedTime ( ( ( ASN1OctetString ) obj ) . getOctets ( ) ) ; } throw new IllegalArgumentException ( "illegal object in getInstance: " + obj . getClass ( ) . getName ( ) ) ; }
|
return a generalized time from the passed in object
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.