idx
int64 0
165k
| question
stringlengths 73
4.15k
| target
stringlengths 5
918
| len_question
int64 21
890
| len_target
int64 3
255
|
|---|---|---|---|---|
162,300
|
public static boolean waitForPageResponse ( HtmlPage page , String responseMessage ) throws InterruptedException { int i = 0 ; boolean isTextFound = false ; while ( ! isTextFound && i < 5 ) { isTextFound = page . asText ( ) . contains ( responseMessage ) ; i ++ ; Thread . sleep ( 1000 ) ; Log . info ( c , "waitForPageResponse" , "Waiting for: " + responseMessage + " isTextFound: " + isTextFound + " i: " + i ) ; } return isTextFound ; }
|
Create a custom wait mechanism that waits for any background JavaScript to finish and verifies a message in the page response .
| 122
| 23
|
162,301
|
@ FFDCIgnore ( InvocationTargetException . class ) @ Override public Object invoke ( Object proxy , Method method , Object [ ] args ) throws Throwable { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "invoke" , method . toGenericString ( ) ) ; if ( actualMessageObject instanceof JmsMessageImpl ) { if ( ( ( JmsMessageImpl ) actualMessageObject ) . isAsynSendInProgress ( ) ) { //Async send is in progress... application is trying to access message object //throw JMSException if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Application is trying to access message object.. when asysn send is in progress.. throwing JMSException" ) ; throw ( JMSException ) JmsErrorUtils . newThrowable ( JMSException . class , "INVALID_MESSAGE_ACCESS_CWSIA0516E" , null , // object[] argument tc ) ; } } Object retObject = null ; try { retObject = method . invoke ( actualMessageObject , args ) ; } catch ( InvocationTargetException e ) { throw e . getCause ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "invoke" , retObject ) ; //call the method on actual message object. return retObject ; }
|
While Async send operation is in progress do not allow application to access message object
| 339
| 16
|
162,302
|
public static boolean hasClientBehavior ( String eventName , Map < String , List < ClientBehavior > > behaviors , FacesContext facesContext ) { if ( behaviors == null ) { return false ; } return ( behaviors . get ( eventName ) != null ) ; }
|
Checks if the given component has a behavior attachment with a given name .
| 56
| 15
|
162,303
|
public static boolean renderBehaviorizedAttribute ( FacesContext facesContext , ResponseWriter writer , String componentProperty , UIComponent component , String eventName , Collection < ClientBehaviorContext . Parameter > eventParameters , Map < String , List < ClientBehavior > > clientBehaviors , String htmlAttrName , String attributeValue ) throws IOException { return renderBehaviorizedAttribute ( facesContext , writer , componentProperty , component , component . getClientId ( facesContext ) , eventName , eventParameters , clientBehaviors , htmlAttrName , attributeValue ) ; }
|
Render an attribute taking into account the passed event the component property and the passed attribute value for the component property . The event will be rendered on the selected htmlAttrName .
| 123
| 35
|
162,304
|
public static boolean isHideNoSelectionOption ( UIComponent component ) { // check hideNoSelectionOption for literal value (String) or ValueExpression (Boolean) Object hideNoSelectionOptionAttr = component . getAttributes ( ) . get ( JSFAttr . HIDE_NO_SELECTION_OPTION_ATTR ) ; return ( ( hideNoSelectionOptionAttr instanceof String && "true" . equalsIgnoreCase ( ( String ) hideNoSelectionOptionAttr ) ) || ( hideNoSelectionOptionAttr instanceof Boolean && ( ( Boolean ) hideNoSelectionOptionAttr ) ) ) ; }
|
Returns the value of the hideNoSelectionOption attribute of the given UIComponent
| 140
| 18
|
162,305
|
public static void renderUnhandledFacesMessages ( FacesContext facesContext ) throws IOException { // create and configure HtmlMessages component HtmlMessages messages = ( HtmlMessages ) facesContext . getApplication ( ) . createComponent ( HtmlMessages . COMPONENT_TYPE ) ; messages . setId ( "javax_faces_developmentstage_messages" ) ; messages . setTitle ( "Project Stage[Development]: Unhandled Messages" ) ; messages . setStyle ( "color:orange" ) ; messages . setRedisplay ( false ) ; // render the component messages . encodeAll ( facesContext ) ; }
|
Renders all FacesMessages which have not been rendered yet with the help of a HtmlMessages component .
| 137
| 23
|
162,306
|
protected void deactivate ( ComponentContext compcontext ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Deactivating " + this ) ; } INSTANCE . compareAndSet ( this , null ) ; }
|
DS method to deactivate this component
| 62
| 7
|
162,307
|
protected void updateConfiguration ( Map < String , Object > properties ) { if ( properties != null ) { this . properties . clear ( ) ; this . properties . putAll ( properties ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Current Properties: " + this . properties ) ; } }
|
Updates the current configuration properties
| 81
| 6
|
162,308
|
@ Override public boolean isImplicitBeanArchivesScanningDisabled ( ) { boolean enableImplicitBeanArchivesValue = ( Boolean ) this . properties . get ( "enableImplicitBeanArchives" ) ; if ( tc . isWarningEnabled ( ) && ! hasLoggedNoImplicitMsg && ! enableImplicitBeanArchivesValue ) { hasLoggedNoImplicitMsg = true ; Tr . warning ( tc , "implicit.bean.scanning.disabled.CWOWB1009W" ) ; } return ! enableImplicitBeanArchivesValue ; }
|
Get the Container level configuration about whether to disable the scanning for implicit bean archives . If the value is true it means CDI Container will not scan archives without beans . xml to see whether they are implicit archives .
| 128
| 42
|
162,309
|
@ FFDCIgnore ( InjectionException . class ) private void processPostConstruct ( ) { ApplicationClient appClient = ( ( ClientModuleMetaData ) cmd . getModuleMetaData ( ) ) . getAppClient ( ) ; boolean isMetadataComplete = appClient . isMetadataComplete ( ) ; LifecycleCallbackHelper helper = new LifecycleCallbackHelper ( isMetadataComplete ) ; List < LifecycleCallback > postConstruct = appClient . getPostConstruct ( ) ; CallbackHandler loginCallbackHandler = cmi . getCallbackHandler ( ) ; try { if ( loginCallbackHandler != null ) { helper . doPostConstruct ( loginCallbackHandler , postConstruct ) ; } helper . doPostConstruct ( mainClass , postConstruct ) ; } catch ( InjectionException e ) { Tr . error ( tc , "INJECTION_POSTCONSTRUCT_CWWKC2452E" , new Object [ ] { e . getLocalizedMessage ( ) } ) ; } }
|
Process PostContruct annotation or metadata for Main class or Login Callback class .
| 205
| 16
|
162,310
|
@ FFDCIgnore ( InjectionException . class ) private void processPreDestroy ( ) { ApplicationClient appClient = ( ( ClientModuleMetaData ) cmd . getModuleMetaData ( ) ) . getAppClient ( ) ; boolean isMetadataComplete = appClient . isMetadataComplete ( ) ; LifecycleCallbackHelper helper = new LifecycleCallbackHelper ( isMetadataComplete ) ; List < LifecycleCallback > preDestroy = appClient . getPreDestroy ( ) ; CallbackHandler loginCallbackHandler = cmi . getCallbackHandler ( ) ; try { if ( loginCallbackHandler != null ) { helper . doPreDestroy ( loginCallbackHandler , preDestroy ) ; } } catch ( InjectionException e ) { Tr . error ( tc , "INJECTION_PREDESTROY_CWWKC2453E" , new Object [ ] { e . getLocalizedMessage ( ) } ) ; } }
|
Process PreDestroy annotation or metadata for Login Callback class .
| 194
| 12
|
162,311
|
@ Override public void introspect ( final PrintWriter writer ) throws Exception { // Put out a header before the information writer . println ( "Network Interface Information" ) ; writer . println ( "-----------------------------" ) ; // Extract the interface information inside a doPriv try { AccessController . doPrivileged ( new PrivilegedExceptionAction < Void > ( ) { @ Override public Void run ( ) throws IOException { // Iterate over the system network interfaces Enumeration < NetworkInterface > interfaces = NetworkInterface . getNetworkInterfaces ( ) ; while ( interfaces . hasMoreElements ( ) ) { getInterfaceInfo ( interfaces . nextElement ( ) , writer ) ; } return null ; } } ) ; } catch ( PrivilegedActionException pae ) { throw ( Exception ) pae . getCause ( ) ; } }
|
Introspect all network interfaces for diagnostic information .
| 172
| 10
|
162,312
|
private void getInterfaceInfo ( NetworkInterface networkInterface , PrintWriter out ) throws IOException { final String indent = " " ; // Basic information from the interface out . println ( ) ; out . append ( "Interface: " ) . append ( networkInterface . getDisplayName ( ) ) . println ( ) ; out . append ( indent ) . append ( " loopback: " ) . append ( Boolean . toString ( networkInterface . isLoopback ( ) ) ) . println ( ) ; out . append ( indent ) . append ( " mtu: " ) . append ( Integer . toString ( networkInterface . getMTU ( ) ) ) . println ( ) ; out . append ( indent ) . append ( " point-to-point: " ) . append ( Boolean . toString ( networkInterface . isPointToPoint ( ) ) ) . println ( ) ; out . append ( indent ) . append ( "supports multicast: " ) . append ( Boolean . toString ( networkInterface . supportsMulticast ( ) ) ) . println ( ) ; out . append ( indent ) . append ( " up: " ) . append ( Boolean . toString ( networkInterface . isUp ( ) ) ) . println ( ) ; out . append ( indent ) . append ( " virtual: " ) . append ( Boolean . toString ( networkInterface . isVirtual ( ) ) ) . println ( ) ; // Interface address information List < InterfaceAddress > intfAddresses = networkInterface . getInterfaceAddresses ( ) ; for ( int i = 0 ; i < intfAddresses . size ( ) ; i ++ ) { out . append ( indent ) . append ( "InterfaceAddress #" ) . append ( Integer . toString ( i + 1 ) ) . append ( ": " ) . append ( String . valueOf ( intfAddresses . get ( i ) ) ) . println ( ) ; } // Network interface information Enumeration < InetAddress > inetAddresses = networkInterface . getInetAddresses ( ) ; for ( int i = 1 ; inetAddresses . hasMoreElements ( ) ; i ++ ) { InetAddress inetAddress = inetAddresses . nextElement ( ) ; out . append ( indent ) . append ( "InetAddress #" ) . append ( Integer . toString ( i ) ) . println ( ":" ) ; out . append ( indent ) . append ( indent ) . append ( " IP address: " ) . append ( inetAddress . getHostAddress ( ) ) . println ( ) ; out . append ( indent ) . append ( indent ) . append ( " host name: " ) . append ( inetAddress . getHostName ( ) ) . println ( ) ; out . append ( indent ) . append ( indent ) . append ( "FQDN host name: " ) . append ( inetAddress . getCanonicalHostName ( ) ) . println ( ) ; } }
|
Capture interface specific information and write it to the provided writer .
| 625
| 12
|
162,313
|
private Object invoke ( Method method , Object [ ] args ) throws IllegalAccessException , InvocationTargetException { ArrayList < ThreadContext > contextAppliedToThread = threadContextDescriptor . taskStarting ( ) ; try { return method . invoke ( object , args ) ; } finally { threadContextDescriptor . taskStopping ( contextAppliedToThread ) ; } }
|
Apply context invoke the method then remove the context from the thread .
| 79
| 13
|
162,314
|
private synchronized void initialize ( ) { if ( ! _initialized ) { FacesContext context = FacesContext . getCurrentInstance ( ) ; if ( isFacelets2Enabled ( context ) ) { logWarningIfLegacyFaceletViewHandlerIsPresent ( context ) ; if ( MyfacesConfig . getCurrentInstance ( context . getExternalContext ( ) ) . isSupportJSPAndFacesEL ( ) ) { _supportedLanguages = new ViewDeclarationLanguageStrategy [ 2 ] ; _supportedLanguages [ 0 ] = new FaceletViewDeclarationLanguageStrategy ( ) ; _supportedLanguages [ 1 ] = new JspViewDeclarationLanguageStrategy ( ) ; } else { _supportedLanguages = new ViewDeclarationLanguageStrategy [ 1 ] ; _supportedLanguages [ 0 ] = new FaceletViewDeclarationLanguageStrategy ( ) ; } } else { // Support JSP only _supportedLanguages = new ViewDeclarationLanguageStrategy [ 1 ] ; _supportedLanguages [ 0 ] = new JspViewDeclarationLanguageStrategy ( ) ; } _initialized = true ; } }
|
Initialize the supported view declaration languages .
| 233
| 8
|
162,315
|
private boolean isFacelets2Enabled ( FacesContext context ) { String param = context . getExternalContext ( ) . getInitParameter ( PARAM_DISABLE_JSF_FACELET ) ; boolean facelets2ParamDisabled = ( param != null && Boolean . parseBoolean ( param . toLowerCase ( ) ) ) ; return ! facelets2ParamDisabled ; }
|
Determines if the current application uses Facelets - 2 . To accomplish that it looks at the init param javax . faces . DISABLE_FACELET_JSF_VIEWHANDLER
| 80
| 41
|
162,316
|
@ FFDCIgnore ( { MissingResourceException . class , IllegalArgumentException . class } ) protected static Logger createLogger ( final Class < ? > cls , String name , String loggerName ) { ClassLoader orig = getContextClassLoader ( ) ; ClassLoader n = getClassLoader ( cls ) ; if ( n != null ) { setContextClassLoader ( n ) ; } String bundleName = name ; try { Logger logger = null ; ResourceBundle b = null ; if ( bundleName == null ) { //grab the bundle prior to the call to Logger.getLogger(...) so the //ResourceBundle can be loaded outside the big sync block that getLogger really is bundleName = BundleUtils . getBundleName ( cls ) ; try { b = BundleUtils . getBundle ( cls ) ; } catch ( MissingResourceException rex ) { //ignore } } else { bundleName = BundleUtils . getBundleName ( cls , bundleName ) ; try { b = BundleUtils . getBundle ( cls , bundleName ) ; } catch ( MissingResourceException rex ) { //ignore } } if ( b != null ) { b . getLocale ( ) ; } if ( loggerClass != null ) { try { Constructor < ? > cns = loggerClass . getConstructor ( String . class , String . class ) ; if ( name == null ) { try { return ( Logger ) cns . newInstance ( loggerName , bundleName ) ; } catch ( InvocationTargetException ite ) { if ( ite . getTargetException ( ) instanceof MissingResourceException ) { return ( Logger ) cns . newInstance ( loggerName , null ) ; } else { throw ite ; } } } else { try { return ( Logger ) cns . newInstance ( loggerName , bundleName ) ; } catch ( InvocationTargetException ite ) { if ( ite . getTargetException ( ) instanceof MissingResourceException ) { throw ( MissingResourceException ) ite . getTargetException ( ) ; } else { throw ite ; } } } } catch ( Exception e ) { throw new RuntimeException ( e ) ; } } try { logger = Logger . getLogger ( loggerName , bundleName ) ; //NOPMD } catch ( IllegalArgumentException iae ) { //likely a mismatch on the bundle name, just return the default logger = Logger . getLogger ( loggerName ) ; //NOPMD } catch ( MissingResourceException rex ) { logger = Logger . getLogger ( loggerName ) ; //NOPMD } finally { b = null ; } return logger ; } finally { if ( n != orig ) { setContextClassLoader ( orig ) ; } } }
|
Create a logger
| 596
| 3
|
162,317
|
public static void log ( Logger logger , Level level , String message , Throwable throwable , Object parameter ) { if ( logger . isLoggable ( level ) ) { final String formattedMessage = MessageFormat . format ( localize ( logger , message ) , parameter ) ; doLog ( logger , level , formattedMessage , throwable ) ; } }
|
Allows both parameter substitution and a typed Throwable to be logged .
| 74
| 13
|
162,318
|
private static String localize ( Logger logger , String message ) { ResourceBundle bundle = logger . getResourceBundle ( ) ; try { return bundle != null ? bundle . getString ( message ) : message ; } catch ( MissingResourceException ex ) { //string not in the bundle return message ; } }
|
Retrieve localized message retrieved from a logger s resource bundle .
| 65
| 12
|
162,319
|
public synchronized int add ( Object value ) throws IdTableFullException { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "add" , value ) ; if ( value == null ) throw new SIErrorException ( nls . getFormattedMessage ( "IDTABLE_INTERNAL_SICJ0050" , null , "IDTABLE_INTERNAL_SICJ0050" ) ) ; // D226232 int id = 0 ; if ( highWaterMark < table . length ) { // Can we store the object in any free space at the end of the table? id = highWaterMark ; if ( table [ id ] != null ) throw new SIErrorException ( nls . getFormattedMessage ( "IDTABLE_INTERNAL_SICJ0050" , null , "IDTABLE_INTERNAL_SICJ0050" ) ) ; // D226232 table [ id ] = value ; if ( lowestPossibleFree == highWaterMark ) ++ lowestPossibleFree ; ++ highWaterMark ; } else if ( table . length < maxSize ) { // Resize the table if we can growTable ( ) ; id = highWaterMark ; if ( table [ id ] != null ) throw new SIErrorException ( nls . getFormattedMessage ( "IDTABLE_INTERNAL_SICJ0050" , null , "IDTABLE_INTERNAL_SICJ0050" ) ) ; // D226232 table [ id ] = value ; if ( lowestPossibleFree == highWaterMark ) ++ lowestPossibleFree ; ++ highWaterMark ; } else { // Scan for free slot id = findFreeSlot ( ) ; if ( id == 0 ) throw new IdTableFullException ( ) ; } if ( tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "add" , "" + id ) ; return id ; }
|
Adds an object to the table and returns the ID associated with the object in the table . The object will never be assigned an ID which clashes with another object .
| 414
| 32
|
162,320
|
public synchronized Object remove ( int id ) throws IllegalArgumentException { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "remove" , "" + id ) ; Object returnValue = get ( id ) ; if ( returnValue != null ) table [ id ] = null ; if ( id < lowestPossibleFree ) lowestPossibleFree = id ; // If the ID removed was at just below the high water mark, then // move the high water mark down as far as we can. if ( ( id + 1 ) == highWaterMark ) { int index = id ; while ( index >= lowestPossibleFree ) { if ( table [ index ] == null ) highWaterMark = index ; -- index ; } } if ( tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "remove" , returnValue ) ; return returnValue ; }
|
Removes an object from the table .
| 191
| 8
|
162,321
|
public synchronized Object get ( int id ) throws IllegalArgumentException { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "get" , "" + id ) ; if ( ( id < 1 ) || ( id > maxSize ) ) throw new SIErrorException ( nls . getFormattedMessage ( "IDTABLE_INTERNAL_SICJ0050" , null , "IDTABLE_INTERNAL_SICJ0050" ) ) ; // D226232 Object returnValue = null ; if ( id < table . length ) returnValue = table [ id ] ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "get" , "" + returnValue ) ; return returnValue ; }
|
Gets an object from the table by ID . Returns the object associated with the specified ID . It is valid to specify an ID which does not have an object associated with it . In this case a value of null is returned .
| 167
| 46
|
162,322
|
private void growTable ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "growTable" ) ; int newSize = Math . min ( table . length + TABLE_GROWTH_INCREMENT , maxSize ) ; if ( tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "existing size=" + table . length + " new size=" + newSize ) ; Object [ ] newTable = new Object [ newSize + 1 ] ; System . arraycopy ( table , 0 , newTable , 0 , table . length ) ; table = newTable ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "growTable" ) ; }
|
Helper method which increases the size of the table by a factor of TABLE_GROWTH_INCREMENT until the maximum size for the table is achieved .
| 163
| 32
|
162,323
|
private int findFreeSlot ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "findFreeSlot" ) ; boolean foundFreeSlot = false ; int index = lowestPossibleFree ; int largestIndex = Math . min ( highWaterMark , table . length - 1 ) ; while ( ( ! foundFreeSlot ) && ( index <= largestIndex ) ) { foundFreeSlot = ( table [ index ] == null ) ; ++ index ; } int freeSlot = 0 ; if ( foundFreeSlot ) { freeSlot = index - 1 ; // If we have already scanned more than half the table then // we might as well spend a little more time and see if we can // move the high water mark any lower... if ( ( index * 2 ) > largestIndex ) { boolean quit = false ; int lowest = index ; index = largestIndex ; while ( ! quit && ( index >= lowest ) ) { if ( table [ index ] == null ) highWaterMark = index ; else quit = true ; -- index ; } } } if ( tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "findFreeSlot" , "" + freeSlot ) ; return freeSlot ; }
|
Helper method which attempts to locate a free slot in the table . The algorithm used is to scan from the lowest possible free value looking for an entry with a null value . If more than half the table is scanned before a free slot is found then the code also attempts to move the high watermark back towards the beginning of the table by scanning backwards looking for the last empty slot .
| 261
| 76
|
162,324
|
public void init ( HttpInboundConnection conn , SessionManager sessMgr ) { this . connection = conn ; this . request = conn . getRequest ( ) ; this . sessionData = new SessionInfo ( this , sessMgr ) ; }
|
Initialize this request with the input link .
| 54
| 9
|
162,325
|
public void clear ( ) { this . attributes . clear ( ) ; this . queryParameters = null ; this . inReader = null ; this . streamActive = false ; this . inStream = null ; this . encoding = null ; this . sessionData = null ; this . strippedURI = null ; this . srvContext = null ; this . srvPath = null ; this . pathInfo = null ; this . pathInfoComputed = false ; this . filters = null ; }
|
Clear all the temporary variables of this request .
| 101
| 9
|
162,326
|
private void parseQueryFormData ( ) throws IOException { int size = getContentLength ( ) ; if ( 0 == size ) { // no body present this . queryParameters = new HashMap < String , String [ ] > ( ) ; return ; } else if ( - 1 == size ) { // chunked encoded perhaps size = 1024 ; } StringBuilder sb = new StringBuilder ( size ) ; char [ ] data = new char [ size ] ; BufferedReader reader = getReader ( ) ; int len = reader . read ( data ) ; while ( - 1 != len ) { sb . append ( data , 0 , len ) ; len = reader . read ( data ) ; } this . queryParameters = parseQueryString ( sb . toString ( ) ) ; }
|
Read and parse the POST body data that represents query data .
| 164
| 12
|
162,327
|
private Map < String , String [ ] > parseQueryString ( String data ) { Map < String , String [ ] > map = new Hashtable < String , String [ ] > ( ) ; if ( null == data ) { return map ; } String valArray [ ] = null ; char [ ] chars = data . toCharArray ( ) ; int key_start = 0 ; for ( int i = 0 ; i < chars . length ; i ++ ) { // look for the key name delimiter if ( ' ' == chars [ i ] ) { if ( i == key_start ) { // missing the key name throw new IllegalArgumentException ( "Missing key name: " + i ) ; } String key = parseName ( chars , key_start , i ) ; int value_start = ++ i ; for ( ; i < chars . length && ' ' != chars [ i ] ; i ++ ) { // just keep looping looking for the end or & } if ( i > value_start ) { // did find at least one char for the value String value = parseName ( chars , value_start , i ) ; if ( map . containsKey ( key ) ) { String oldVals [ ] = map . get ( key ) ; valArray = new String [ oldVals . length + 1 ] ; System . arraycopy ( oldVals , 0 , valArray , 0 , oldVals . length ) ; valArray [ oldVals . length ] = value ; } else { valArray = new String [ ] { value } ; } map . put ( key , valArray ) ; } key_start = i + 1 ; } } return map ; }
|
Parse a string of query parameters into a Map representing the values stored using the name as the key .
| 352
| 21
|
162,328
|
private void mergeQueryParams ( Map < String , String [ ] > urlParams ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "mergeQueryParams: " + urlParams ) ; } for ( Entry < String , String [ ] > entry : urlParams . entrySet ( ) ) { String key = entry . getKey ( ) ; // prepend to postdata values if necessary String [ ] post = this . queryParameters . get ( key ) ; String [ ] url = entry . getValue ( ) ; if ( null != post ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "map already contains key " + key ) ; } String [ ] newVals = new String [ post . length + url . length ] ; System . arraycopy ( url , 0 , newVals , 0 , url . length ) ; System . arraycopy ( post , 0 , newVals , url . length , post . length ) ; this . queryParameters . put ( key , newVals ) ; } else { this . queryParameters . put ( key , url ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "put key " + key + " into map." ) ; } } }
|
In certain cases the URL will contain query string information and the POST body will as well . This method merges the two maps together .
| 312
| 27
|
162,329
|
private String getCipherSuite ( ) { String suite = null ; SSLContext ssl = this . connection . getSSLContext ( ) ; if ( null != ssl ) { suite = ssl . getSession ( ) . getCipherSuite ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "getCipherSuite [" + suite + "]" ) ; } return suite ; }
|
Access the SSL cipher suite used in this connection .
| 104
| 10
|
162,330
|
private X509Certificate [ ] getPeerCertificates ( ) { X509Certificate [ ] rc = null ; SSLContext ssl = this . connection . getSSLContext ( ) ; if ( null != ssl && ( ssl . getNeedClientAuth ( ) || ssl . getWantClientAuth ( ) ) ) { try { Object [ ] objs = ssl . getSession ( ) . getPeerCertificates ( ) ; if ( null != objs ) { rc = ( X509Certificate [ ] ) objs ; } } catch ( Throwable t ) { FFDCFilter . processException ( t , getClass ( ) . getName ( ) , "peercerts" , new Object [ ] { this , ssl } ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Error getting peer certs; " + t ) ; } } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { if ( null == rc ) { Tr . debug ( tc , "getPeerCertificates: none" ) ; } else { Tr . debug ( tc , "getPeerCertificates: " + rc . length ) ; } } return rc ; }
|
Access any client SSL certificates for this connection .
| 283
| 9
|
162,331
|
public void removeTarget ( Object key ) throws MatchingException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "removeTarget" , new Object [ ] { key } ) ; // Remove from the HashMap, with synch, there may be other accessors synchronized ( _targets ) { Target targ = ( Target ) _targets . get ( key ) ; if ( targ == null ) throw new MatchingException ( ) ; for ( int i = 0 ; i < targ . targets . length ; i ++ ) _matchSpace . removeTarget ( targ . expr [ i ] , targ . targets [ i ] ) ; // Now remove the Target from the cache _targets . remove ( key ) ; // Remove from the Monitor state, with synch, there may be other accessors if ( targ . targets . length > 0 ) // Defect 417084, check targets is non-empty { if ( targ . targets [ 0 ] instanceof MonitoredConsumer ) _consumerMonitoring . removeConsumer ( ( MonitoredConsumer ) targ . targets [ 0 ] ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "removeTarget" ) ; }
|
Remove a target from the MatchSpace
| 283
| 7
|
162,332
|
public void removeConsumerPointMatchTarget ( DispatchableKey consumerPointData ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "removeConsumerPointMatchTarget" , consumerPointData ) ; // Remove the consumer point from the matchspace try { removeTarget ( consumerPointData ) ; } catch ( MatchingException e ) { // FFDC FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.matching.MessageProcessorMatching.removeConsumerPointMatchTarget" , "1:840:1.117.1.11" , this ) ; SibTr . exception ( tc , e ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "removeConsumerPointMatchTarget" , "SICoreException" ) ; SibTr . error ( tc , "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.matching.MessageProcessorMatching" , "1:851:1.117.1.11" , e } ) ; throw new SIErrorException ( nls . getFormattedMessage ( "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.matching.MessageProcessorMatching" , "1:859:1.117.1.11" , e } , null ) , e ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "removeConsumerPointMatchTarget" ) ; }
|
Method removeConsumerPointMatchTarget Used to remove a ConsumerPoint from the MatchSpace .
| 399
| 17
|
162,333
|
public ControllableProxySubscription addPubSubOutputHandlerMatchTarget ( PubSubOutputHandler handler , SIBUuid12 topicSpace , String discriminator , boolean foreignSecuredProxy , String MESubUserId ) throws SIDiscriminatorSyntaxException , SISelectorSyntaxException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "addPubSubOutputHandlerMatchTarget" , new Object [ ] { handler , topicSpace , discriminator , Boolean . valueOf ( foreignSecuredProxy ) , MESubUserId } ) ; // Combine the topicSpace and topic String topicSpaceStr = topicSpace . toString ( ) ; String theTopic = buildAddTopicExpression ( topicSpaceStr , discriminator ) ; ControllableProxySubscription key = new ControllableProxySubscription ( handler , theTopic , foreignSecuredProxy , MESubUserId ) ; // Store the CPS in the MatchSpace try { addTarget ( key , // Use the output handler as key theTopic , null , // selector string null , // selector domain null , // this'll pick up the default resolver key , // defect 240115: Store the wrappered PSOH null , null ) ; // selector properties } catch ( QuerySyntaxException e ) { // No FFDC code needed SibTr . exception ( tc , e ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "addPubSubOutputHandlerMatchTarget" , e ) ; throw new SISelectorSyntaxException ( nls . getFormattedMessage ( "INVALID_SELECTOR_ERROR_CWSIP0371" , new Object [ ] { null } , null ) ) ; } catch ( InvalidTopicSyntaxException e ) { // No FFDC code needed if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "addPubSubOutputHandlerMatchTarget" , e ) ; throw new SIDiscriminatorSyntaxException ( nls . getFormattedMessage ( "INVALID_TOPIC_ERROR_CWSIP0372" , new Object [ ] { discriminator } , null ) ) ; } catch ( MatchingException e ) { // FFDC FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.matching.MessageProcessorMatching.addPubSubOutputHandlerMatchTarget" , "1:1111:1.117.1.11" , this ) ; SibTr . exception ( tc , e ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "addPubSubOutputHandlerMatchTarget" , e ) ; SibTr . error ( tc , "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.matching.MessageProcessorMatching" , "1:1122:1.117.1.11" , e } ) ; throw new SIErrorException ( nls . getFormattedMessage ( "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.matching.MessageProcessorMatching" , "1:1130:1.117.1.11" , e } , null ) , e ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "addPubSubOutputHandlerMatchTarget" , key ) ; return key ; }
|
Used to add a PubSubOutputHandler for ME - ME comms to the MatchSpace .
| 827
| 19
|
162,334
|
public void removeConsumerDispatcherMatchTarget ( ConsumerDispatcher consumerDispatcher , SelectionCriteria selectionCriteria ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "removeConsumerDispatcherMatchTarget" , new Object [ ] { consumerDispatcher , selectionCriteria } ) ; // Remove the consumer point from the matchspace // Set the CD and selection criteria into a wrapper that extends MatchTarget MatchingConsumerDispatcherWithCriteira key = new MatchingConsumerDispatcherWithCriteira ( consumerDispatcher , selectionCriteria ) ; // Reset the CD flag to indicate that this subscription is not in the MatchSpace. consumerDispatcher . setIsInMatchSpace ( false ) ; try { removeTarget ( key ) ; } catch ( MatchingException e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.matching.MessageProcessorMatching.removeConsumerDispatcherMatchTarget" , "1:1312:1.117.1.11" , this ) ; SibTr . exception ( tc , e ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "removeConsumerDispatcherMatchTarget" , "SICoreException" ) ; SibTr . error ( tc , "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.matching.MessageProcessorMatching" , "1:1323:1.117.1.11" , e } ) ; throw new SIErrorException ( nls . getFormattedMessage ( "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.matching.MessageProcessorMatching" , "1:1331:1.117.1.11" , e } , null ) , e ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "removeConsumerDispatcherMatchTarget" ) ; }
|
Method removeConsumerDispatcherMatchTarget Used to remove a ConsumerDispatcher from the MatchSpace .
| 504
| 21
|
162,335
|
public void removePubSubOutputHandlerMatchTarget ( ControllableProxySubscription sub ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "removePubSubOutputHandlerMatchTarget" , sub ) ; // Remove the PubSub OutputHandler from the matchspace try { removeTarget ( sub ) ; } catch ( MatchingException e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.matching.MessageProcessorMatching.removePubSubOutputHandlerMatchTarget" , "1:1363:1.117.1.11" , this ) ; SibTr . exception ( tc , e ) ; SibTr . error ( tc , "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.matching.MessageProcessorMatching" , "1:1370:1.117.1.11" , e } ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "removePubSubOutputHandlerMatchTarget" , "SICoreException" ) ; throw new SIErrorException ( nls . getFormattedMessage ( "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.matching.MessageProcessorMatching" , "1:1381:1.117.1.11" , e } , null ) , e ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "removePubSubOutputHandlerMatchTarget" ) ; }
|
Method removePubSubOutputHandlerMatchTarget Used to remove a PubSubOutputHandler from the MatchSpace .
| 406
| 21
|
162,336
|
private String buildSendTopicExpression ( String destName , String discriminator ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "buildSendTopicExpression" , new Object [ ] { destName , discriminator } ) ; String combo = null ; if ( discriminator == null || discriminator . trim ( ) . length ( ) == 0 ) combo = destName ; else combo = destName + MatchSpace . SUBTOPIC_SEPARATOR_CHAR + discriminator ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "buildSendTopicExpression" , combo ) ; return combo ; }
|
Concatenates topicspace and a topic expression with a level separator between
| 163
| 16
|
162,337
|
public String buildAddTopicExpression ( String destName , String discriminator ) throws SIDiscriminatorSyntaxException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "buildAddTopicExpression" , new Object [ ] { destName , discriminator } ) ; String combo = null ; if ( discriminator == null ) combo = destName + MatchSpace . SUBTOPIC_DOUBLE_SEPARATOR_STOP_STRING ; else if ( discriminator . trim ( ) . length ( ) == 0 ) combo = destName ; else if ( discriminator . startsWith ( MatchSpace . SUBTOPIC_DOUBLE_SEPARATOR_STRING ) ) combo = destName + discriminator ; else if ( discriminator . startsWith ( "" + MatchSpace . SUBTOPIC_SEPARATOR_CHAR ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "buildAddTopicExpression" , "SISelectorSyntaxException" ) ; throw new SIDiscriminatorSyntaxException ( nls . getFormattedMessage ( "INVALID_TOPIC_ERROR_CWSIP0372" , new Object [ ] { discriminator } , null ) ) ; } else combo = destName + MatchSpace . SUBTOPIC_SEPARATOR_CHAR + discriminator ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "buildAddTopicExpression" , combo ) ; return combo ; }
|
Concatenates topicspace and a topic expression with a level separator between .
| 361
| 17
|
162,338
|
public ArrayList getAllCDMatchTargets ( ) { ArrayList consumerDispatcherList ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getAllCDMatchTargets" ) ; // Get from the HashMap, with synch, there may be other accessors synchronized ( _targets ) { consumerDispatcherList = new ArrayList ( _targets . size ( ) ) ; Iterator itr = _targets . keySet ( ) . iterator ( ) ; while ( itr . hasNext ( ) ) { Object key = itr . next ( ) ; if ( key instanceof MatchingConsumerDispatcherWithCriteira ) { consumerDispatcherList . add ( ( ( MatchingConsumerDispatcherWithCriteira ) key ) . getConsumerDispatcher ( ) ) ; } } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getAllCDMatchTargets" ) ; return consumerDispatcherList ; }
|
Method getAllCDMatchTargets Used to return a list of all ConsumerDispatchers stored in the matchspace
| 247
| 24
|
162,339
|
public ArrayList getAllCDMatchTargetsForTopicSpace ( String tSpace ) { ArrayList consumerDispatcherList ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getAllCDMatchTargetsForTopicSpace" ) ; // Get from the HashMap, with synch, there may be other accessors synchronized ( _targets ) { consumerDispatcherList = new ArrayList ( _targets . size ( ) ) ; Iterator itr = _targets . keySet ( ) . iterator ( ) ; while ( itr . hasNext ( ) ) { Object key = itr . next ( ) ; if ( key instanceof MatchingConsumerDispatcherWithCriteira ) { ConsumerDispatcher cd = ( ( ( MatchingConsumerDispatcherWithCriteira ) key ) . getConsumerDispatcher ( ) ) ; String storedDest = cd . getDestination ( ) . getName ( ) ; if ( storedDest . equals ( tSpace ) ) { consumerDispatcherList . add ( cd ) ; } } } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getAllCDMatchTargetsForTopicSpace" ) ; return consumerDispatcherList ; }
|
Method getAllCDMatchTargetsForTopicSpace Used to return a list of all ConsumerDispatchers stored in the matchspace for a specific topicspace .
| 299
| 33
|
162,340
|
public ArrayList getAllPubSubOutputHandlerMatchTargets ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getAllPubSubOutputHandlerMatchTargets" ) ; ArrayList outputHandlerList ; // Get from the HashMap, with synch, there may be other accessors synchronized ( _targets ) { outputHandlerList = new ArrayList ( _targets . size ( ) ) ; Iterator itr = _targets . keySet ( ) . iterator ( ) ; while ( itr . hasNext ( ) ) { Object key = itr . next ( ) ; if ( key instanceof ControllableProxySubscription ) outputHandlerList . add ( ( ( ControllableProxySubscription ) key ) . getOutputHandler ( ) ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getAllPubSubOutputHandlerMatchTargets" , outputHandlerList ) ; return outputHandlerList ; }
|
Method getAllPubSubOutputHandlerMatchTargets Used to return a list of all PubSubOutputHandlers stored in the matchspace
| 240
| 28
|
162,341
|
public void addTopicAcl ( SIBUuid12 destName , TopicAcl acl ) throws SIDiscriminatorSyntaxException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "addTopicAcl" , new Object [ ] { destName , acl } ) ; String discriminator = null ; // Postpend # wildcard to the fully qualified topic supplied // TO DO check the topicsyntax String theTopic = "" ; if ( destName != null ) { String destNameStr = destName . toString ( ) ; theTopic = buildAddTopicExpression ( destNameStr , acl . getTopic ( ) ) ; } // Careful, only do this if the original topic is not null if ( acl . getTopic ( ) != null ) { discriminator = theTopic + "//." ; } else { discriminator = theTopic ; } // Put the acl into the matchspace try { addTarget ( acl , // N.B we use the raw CP as key discriminator , // wildcarded topic expression null , // selector string null , // selector domain null , // this'll pick up the default resolver acl , null , null ) ; // selector properties } catch ( QuerySyntaxException e ) { // No FFDC code needed } catch ( InvalidTopicSyntaxException e ) { // No FFDC code needed SibTr . exception ( tc , e ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "addTopicAcl" , "SIDiscriminatorSyntaxException" ) ; throw new SIDiscriminatorSyntaxException ( nls . getFormattedMessage ( "INVALID_TOPIC_ERROR_CWSIP0372" , new Object [ ] { theTopic } , null ) ) ; } catch ( MatchingException e ) { // FFDC FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.matching.MessageProcessorMatching.addTopicAcl" , "1:1954:1.117.1.11" , this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "addTopicAcl" , "SIErrorException" ) ; SibTr . error ( tc , "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.matching.MessageProcessorMatching" , "1:1962:1.117.1.11" , e } ) ; throw new SIErrorException ( nls . getFormattedMessage ( "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.matching.MessageProcessorMatching" , "1:1970:1.117.1.11" , e } , null ) , e ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "addTopicAcl" ) ; }
|
Method addTopicAcl Used to add a TopicAcl to the MatchSpace .
| 720
| 17
|
162,342
|
public void removeAllTopicAcls ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "removeAllTopicAcls" ) ; ArrayList topicAclList = null ; try { // Remove from the HashMap, with synch, there may be other accessors synchronized ( _targets ) { // Build a list of the existing ACLs topicAclList = new ArrayList ( _targets . size ( ) ) ; Iterator itr = _targets . keySet ( ) . iterator ( ) ; while ( itr . hasNext ( ) ) { Object key = itr . next ( ) ; if ( key instanceof TopicAcl ) { topicAclList . add ( key ) ; } } // Now remove the ACLs from the targets Map Iterator aclIter = topicAclList . iterator ( ) ; while ( aclIter . hasNext ( ) ) { Object key = aclIter . next ( ) ; removeTarget ( key ) ; } } } catch ( MatchingException e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.matching.MessageProcessorMatching.removeAllTopicAcls" , "1:2188:1.117.1.11" , this ) ; SibTr . exception ( tc , e ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "removeAllTopicAcls" , "SICoreException" ) ; SibTr . error ( tc , "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.matching.MessageProcessorMatching" , "1:2199:1.117.1.11" , e } ) ; throw new SIErrorException ( nls . getFormattedMessage ( "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.matching.MessageProcessorMatching" , "1:2207:1.117.1.11" , e } , null ) , e ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "removeAllTopicAcls" ) ; }
|
Method removeAllTopicAcls Used to remove all TopicAcls stored in the matchspace
| 555
| 20
|
162,343
|
public void removeApplicationSignatureMatchTarget ( ApplicationSignature appSignature ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "removeApplicationSignatureMatchTarget" , appSignature ) ; // Remove the consumer point from the matchspace try { removeTarget ( appSignature ) ; } catch ( MatchingException e ) { // FFDC FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.matching.MessageProcessorMatching.removeApplicationSignatureMatchTarget" , "1:3045:1.117.1.11" , this ) ; SibTr . exception ( tc , e ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "removeApplicationSignatureMatchTarget" , "SICoreException" ) ; SibTr . error ( tc , "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.matching.MessageProcessorMatching" , "1:3056:1.117.1.11" , e } ) ; throw new SIErrorException ( nls . getFormattedMessage ( "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.matching.MessageProcessorMatching" , "1:3064:1.117.1.11" , e } , null ) , e ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "removeApplicationSignatureMatchTarget" ) ; }
|
Method removeApplicationSignatureMatchTarget Used to remove a ApplicationSignature from the MatchSpace .
| 405
| 19
|
162,344
|
@ Reference ( policy = DYNAMIC , policyOption = GREEDY , cardinality = MANDATORY ) protected void setProvider ( MetricRecorderProvider provider ) { metricProvider = provider ; }
|
Require a provider update dynamically if a new one becomes available
| 44
| 12
|
162,345
|
@ Override public void commit ( ) throws RollbackException , HeuristicMixedException , HeuristicRollbackException , SecurityException , IllegalStateException , SystemException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "commit (SPI)" ) ; try { processCommit ( ) ; } catch ( HeuristicHazardException hhe ) { // Only throw heuristic hazard in the one phase case // modify the heuristic - note JTA 1.0.1 errata implies this may be reconsidered one day final HeuristicMixedException hme = new HeuristicMixedException ( hhe . getLocalizedMessage ( ) ) ; hme . initCause ( hhe . getCause ( ) ) ; //Set the cause to be the cause of the HeuristicHazardException if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "commit" , hme ) ; throw hme ; } finally { if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "commit (SPI)" ) ; } }
|
Commit the transation associated with the target Transaction object
| 228
| 11
|
162,346
|
public void commit_one_phase ( ) throws RollbackException , HeuristicMixedException , HeuristicHazardException , HeuristicRollbackException , SecurityException , IllegalStateException , SystemException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "commit_one_phase" ) ; // This call is only valid for a single subordinate - treat as a "superior" _subordinate = false ; try { processCommit ( ) ; } finally { if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "commit_one_phase" ) ; } }
|
Commit the transation associated with a subordinate which received a commit_one_phase request from the superior . Any other subordinate requests should call the internal methods directly .
| 129
| 33
|
162,347
|
@ Override public void rollback ( ) throws IllegalStateException , SystemException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "rollback (SPI)" ) ; final int state = _status . getState ( ) ; // // We are only called in this method for superiors. // if ( state == TransactionState . STATE_ACTIVE ) { // // Cancel timeout prior to completion phase // cancelAlarms ( ) ; try { _status . setState ( TransactionState . STATE_ROLLING_BACK ) ; } catch ( SystemException se ) { FFDCFilter . processException ( se , "com.ibm.tx.jta.TransactionImpl.rollback" , "1587" , this ) ; if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "Exception caught setting state to ROLLING_BACK!" , se ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "rollback (SPI)" ) ; throw se ; } try { internalRollback ( ) ; } catch ( HeuristicMixedException hme ) { if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "HeuristicMixedException caught rollback processing" , hme ) ; // state change handled by notifyCompletion // Add to list of heuristically completed transactions addHeuristic ( ) ; } catch ( HeuristicHazardException hhe ) { if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "HeuristicHazardException caught rollback processing" , hhe ) ; // state change handled by notifyCompletion // Add to list of heuristically completed transactions addHeuristic ( ) ; } catch ( HeuristicCommitException hce ) { if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "HeuristicHazardException caught rollback processing" , hce ) ; // state change handled by notifyCompletion // Add to list of heuristically completed transactions addHeuristic ( ) ; } catch ( SystemException se ) { FFDCFilter . processException ( se , "com.ibm.tx.jta.TransactionImpl.rollback" , "1626" , this ) ; if ( tc . isEventEnabled ( ) ) Tr . event ( tc , "SystemException caught during rollback" , se ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "rollback (SPI)" ) ; throw se ; } catch ( Throwable ex ) { FFDCFilter . processException ( ex , "com.ibm.tx.jta.TransactionImpl.rollback" , "1633" , this ) ; if ( tc . isEventEnabled ( ) ) Tr . event ( tc , "Exception caught during rollback" , ex ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "rollback (SPI)" ) ; throw new SystemException ( ex . getLocalizedMessage ( ) ) ; } finally { notifyCompletion ( ) ; } } // // Defect 1440 // // We are not in ACTIVE state so we need to // throw the appropriate exception. // else if ( state == TransactionState . STATE_NONE ) { if ( tc . isEventEnabled ( ) ) Tr . event ( tc , "No transaction available!" ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "rollback (SPI)" ) ; throw new IllegalStateException ( ) ; } else { if ( tc . isEventEnabled ( ) ) Tr . event ( tc , "Invalid transaction state:" + state ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "rollback (SPI)" ) ; throw new SystemException ( ) ; } if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "rollback (SPI)" ) ; }
|
Rollback the transaction associated with the target Transaction Object
| 833
| 10
|
162,348
|
protected void setPrepareXAFailed ( ) // d266464A { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "setPrepareXAFailed" ) ; setRBO ( ) ; // Ensure native context is informed if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "setPrepareXAFailed" ) ; }
|
Indicate that the prepare XA phase failed .
| 82
| 10
|
162,349
|
protected boolean prePrepare ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "prePrepare" ) ; // // Cancel timeout prior to completion phase // cancelAlarms ( ) ; // // Inform the Synchronisations we are about to complete // if ( ! _rollbackOnly ) { if ( _syncs != null ) { _syncs . distributeBefore ( ) ; } } if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "prePrepare" , ! _rollbackOnly ) ; return ! _rollbackOnly ; }
|
Drive beforeCompletion against sync objects registered with this transaction .
| 125
| 12
|
162,350
|
protected boolean distributeEnd ( ) throws SystemException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "distributeEnd" ) ; if ( ! getResources ( ) . distributeEnd ( XAResource . TMSUCCESS ) ) { setRBO ( ) ; } if ( _rollbackOnly ) { try { _status . setState ( TransactionState . STATE_ROLLING_BACK ) ; } catch ( SystemException se ) { FFDCFilter . processException ( se , "com.ibm.tx.jta.TransactionImpl.distributeEnd" , "1731" , this ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "distributeEnd" , se ) ; throw se ; } } if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "distributeEnd" , ! _rollbackOnly ) ; return ! _rollbackOnly ; }
|
Distribute end to all XA resources
| 203
| 8
|
162,351
|
public Throwable getOriginalException ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getOriginalException" ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "getOriginalException" , _originalException ) ; return _originalException ; }
|
returns the exception stored by RegisteredSyncs
| 65
| 9
|
162,352
|
@ Override public void setRollbackOnly ( ) throws IllegalStateException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "setRollbackOnly (SPI)" ) ; final int state = _status . getState ( ) ; if ( state == TransactionState . STATE_NONE || state == TransactionState . STATE_COMMITTED || state == TransactionState . STATE_ROLLED_BACK ) { if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "setRollbackOnly (SPI)" ) ; throw new IllegalStateException ( "No transaction available" ) ; } setRBO ( ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "setRollbackOnly (SPI)" ) ; }
|
Modify the transaction such that the only possible outcome of the transaction is to rollback .
| 168
| 18
|
162,353
|
public void enlistResource ( JTAResource remoteRes ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "enlistResource (SPI): args: " , remoteRes ) ; getResources ( ) . addRes ( remoteRes ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "enlistResource (SPI)" ) ; }
|
Enlist a remote resouce with the transaction associated with the target TransactionImpl object . Typically this remote resource represents a downstream suborindate server .
| 85
| 31
|
162,354
|
protected void logHeuristic ( boolean commit ) throws SystemException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "logHeuristic" , commit ) ; if ( _subordinate && _status . getState ( ) != TransactionState . STATE_PREPARING ) { getResources ( ) . logHeuristic ( commit ) ; } if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "logHeuristic" ) ; }
|
Log the fact that we have encountered a heuristic outcome .
| 99
| 12
|
162,355
|
@ Override public int getStatus ( ) { int state = Status . STATUS_UNKNOWN ; switch ( _status . getState ( ) ) { case TransactionState . STATE_NONE : state = Status . STATUS_NO_TRANSACTION ; break ; case TransactionState . STATE_ACTIVE : if ( _rollbackOnly ) state = Status . STATUS_MARKED_ROLLBACK ; else state = Status . STATUS_ACTIVE ; break ; case TransactionState . STATE_PREPARING : case TransactionState . STATE_LAST_PARTICIPANT : state = Status . STATUS_PREPARING ; break ; case TransactionState . STATE_PREPARED : state = Status . STATUS_PREPARED ; break ; case TransactionState . STATE_COMMITTING : case TransactionState . STATE_COMMITTING_ONE_PHASE : state = Status . STATUS_COMMITTING ; break ; case TransactionState . STATE_HEURISTIC_ON_COMMIT : case TransactionState . STATE_COMMITTED : state = Status . STATUS_COMMITTED ; break ; case TransactionState . STATE_ROLLING_BACK : state = Status . STATUS_ROLLING_BACK ; break ; case TransactionState . STATE_HEURISTIC_ON_ROLLBACK : case TransactionState . STATE_ROLLED_BACK : state = Status . STATUS_ROLLEDBACK ; break ; } if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "getStatus (SPI)" , Util . printStatus ( state ) ) ; return state ; }
|
Obtain the status of the transaction associated with the target object
| 351
| 12
|
162,356
|
public XidImpl getXidImpl ( boolean createIfAbsent ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getXidImpl" , new Object [ ] { this , createIfAbsent } ) ; if ( createIfAbsent && ( _xid == null ) ) { // Create an XID as this transaction identifier. _xid = new XidImpl ( new TxPrimaryKey ( _localTID , Configuration . getCurrentEpoch ( ) ) ) ; } if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "getXidImpl" , _xid ) ; return ( XidImpl ) _xid ; }
|
Returns a global identifier that represents the TransactionImpl s transaction .
| 150
| 12
|
162,357
|
public void setXidImpl ( XidImpl xid ) { if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "setXidImpl" , new Object [ ] { xid , this } ) ; _xid = xid ; }
|
For recovery only
| 57
| 3
|
162,358
|
public boolean isJCAImportedAndPrepared ( String providerId ) { return _JCARecoveryData != null && _status . getState ( ) == TransactionState . STATE_PREPARED && _JCARecoveryData . getWrapper ( ) . getProviderId ( ) . equals ( providerId ) ; }
|
Returns true if this tx was imported by the given RA and is prepared
| 69
| 14
|
162,359
|
public void loadKeyStores ( Map < String , WSKeyStore > config ) { // now process each keystore in the provided config for ( Entry < String , WSKeyStore > current : config . entrySet ( ) ) { try { String name = current . getKey ( ) ; WSKeyStore keystore = current . getValue ( ) ; addKeyStoreToMap ( name , keystore ) ; } catch ( Exception e ) { FFDCFilter . processException ( e , getClass ( ) . getName ( ) , "loadKeyStores" , new Object [ ] { this , config } ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Error loading keystore; " + current . getKey ( ) + " " + e ) ; } } } }
|
Load the provided list of keystores from the configuration .
| 182
| 11
|
162,360
|
public InputStream getInputStream ( String fileName , boolean create ) throws MalformedURLException , IOException { try { GetKeyStoreInputStreamAction action = new GetKeyStoreInputStreamAction ( fileName , create ) ; return AccessController . doPrivileged ( action ) ; } catch ( PrivilegedActionException e ) { Exception ex = e . getException ( ) ; FFDCFilter . processException ( e , getClass ( ) . getName ( ) , "getInputStream" , new Object [ ] { fileName , Boolean . valueOf ( create ) , this } ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "Exception opening keystore; " + ex ) ; if ( ex instanceof MalformedURLException ) throw ( MalformedURLException ) ex ; else if ( ex instanceof IOException ) throw ( IOException ) ex ; throw new IOException ( ex . getMessage ( ) ) ; } }
|
Open the provided filename as a keystore creating if it doesn t exist and the input create flag is true .
| 217
| 22
|
162,361
|
public OutputStream getOutputStream ( String fileName ) throws MalformedURLException , IOException { try { GetKeyStoreOutputStreamAction action = new GetKeyStoreOutputStreamAction ( fileName ) ; return AccessController . doPrivileged ( action ) ; } catch ( PrivilegedActionException e ) { Exception ex = e . getException ( ) ; FFDCFilter . processException ( e , getClass ( ) . getName ( ) , "getOutputStream" , new Object [ ] { fileName , this } ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "Exception opening keystore; " + ex ) ; if ( ex instanceof MalformedURLException ) throw ( MalformedURLException ) ex ; else if ( ex instanceof IOException ) throw ( IOException ) ex ; throw new IOException ( ex . getMessage ( ) ) ; } }
|
Open the provided filename as an outputstream .
| 204
| 9
|
162,362
|
public static String stripLastSlash ( String inputString ) { if ( null == inputString ) { return null ; } String rc = inputString . trim ( ) ; int len = rc . length ( ) ; if ( 0 < len ) { char lastChar = rc . charAt ( len - 1 ) ; if ( ' ' == lastChar || ' ' == lastChar ) { rc = rc . substring ( 0 , len - 1 ) ; } } return rc ; }
|
Remove the last slash if present from the input string and return the result .
| 100
| 15
|
162,363
|
public KeyStore getJavaKeyStore ( String keyStoreName ) throws Exception { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getJavaKeyStore: " + keyStoreName ) ; if ( keyStoreName == null || keyStoreName . trim ( ) . isEmpty ( ) ) { throw new SSLException ( "No keystore name provided." ) ; } KeyStore javaKeyStore = null ; WSKeyStore ks = keyStoreMap . get ( keyStoreName ) ; if ( ks != null ) { javaKeyStore = ks . getKeyStore ( false , false ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "getJavaKeyStore: " + javaKeyStore ) ; return javaKeyStore ; }
|
Returns the java keystore object based on the keystore name passed in .
| 191
| 15
|
162,364
|
public WSKeyStore getWSKeyStore ( String keyStoreName ) throws SSLException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getWSKeyStore: " + keyStoreName ) ; if ( keyStoreName == null ) { throw new SSLException ( "No keystore name provided." ) ; } WSKeyStore ks = keyStoreMap . get ( keyStoreName ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "getWSKeyStore: " + ks ) ; return ks ; }
|
Returns the java keystore object based on the keystore name passed in . A null value is returned if no existing store matchs the provided name .
| 147
| 30
|
162,365
|
@ Override public Set < String > getDependentApplications ( ) { Set < String > appsToStop = new HashSet < String > ( applications ) ; applications . clear ( ) ; return appsToStop ; }
|
Returns the list of applications that have used this resource so that the applications can be stopped by the application recycle code in response to a configuration change .
| 45
| 29
|
162,366
|
@ Trivial // do our own trace in order to selectively include the value private < T extends Object > void set ( Class < ? > clazz , Object clientBuilder , String name , Class < T > type , T value ) throws Exception { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , name + ' ' + ( name . endsWith ( "ssword" ) ? "***" : value ) + ' ' ) ; Method m ; // timeout properties take an additional parm for time unit if ( ( type == long . class ) && ( ( READ_TIMEOUT . equals ( name ) || CONNECT_TIMEOUT . equals ( name ) ) ) ) { m = clazz . getMethod ( name , type , TimeUnit . class ) ; m . invoke ( clientBuilder , value , TimeUnit . MILLISECONDS ) ; } else { m = clazz . getMethod ( name , type ) ; m . invoke ( clientBuilder , value ) ; } }
|
Method to reflectively invoke setters on the cloudant client builder
| 223
| 13
|
162,367
|
@ Override public void libraryNotification ( ) { // Notify the application recycle coordinator of an incompatible change that requires restarting the application if ( ! applications . isEmpty ( ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "recycle applications" , applications ) ; ApplicationRecycleCoordinator appRecycleCoord = ( ApplicationRecycleCoordinator ) componentContext . locateService ( "appRecycleCoordinator" ) ; Set < String > members = new HashSet < String > ( applications ) ; applications . removeAll ( members ) ; appRecycleCoord . recycleApplications ( members ) ; } }
|
Received when library is changed for example by altering the files in the library .
| 151
| 16
|
162,368
|
public Object getCloudantClient ( int resAuth , List < ? extends ResourceInfo . Property > loginPropertyList ) throws Exception { AuthData containerAuthData = null ; if ( resAuth == ResourceInfo . AUTH_CONTAINER ) { containerAuthData = getContainerAuthData ( loginPropertyList ) ; } String userName = containerAuthData == null ? ( String ) props . get ( USERNAME ) : containerAuthData . getUserName ( ) ; String password = null ; if ( containerAuthData == null ) { SerializableProtectedString protectedPwd = ( SerializableProtectedString ) props . get ( PASSWORD ) ; if ( protectedPwd != null ) { password = String . valueOf ( protectedPwd . getChars ( ) ) ; password = PasswordUtil . getCryptoAlgorithm ( password ) == null ? password : PasswordUtil . decode ( password ) ; } } else password = String . valueOf ( containerAuthData . getPassword ( ) ) ; final ClientKey key = new ClientKey ( null , userName , password ) ; return clients . get ( key ) ; }
|
Return the cloudant client object used for a particular username and password
| 237
| 13
|
162,369
|
public synchronized void waitOn ( ) throws InterruptedException { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "waitOn" , "" + count ) ; ++ count ; if ( count > 0 ) { try { wait ( ) ; } catch ( InterruptedException e ) { // No FFDC code needed -- count ; throw e ; } } if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "waitOn" ) ; }
|
Wait for the semaphore to be posted
| 104
| 9
|
162,370
|
public synchronized void post ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "post" , "" + count ) ; -- count ; if ( count >= 0 ) notify ( ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "post" ) ; }
|
Post the semaphore waking up at most one waiter . If there are no waiters then the next thread issuing a waitOn call will not be suspended . In fact if post is invoked n times then the next n waitOn calls will not block .
| 71
| 51
|
162,371
|
public synchronized void waitOnIgnoringInterruptions ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "waitOnIgnoringInterruptions" ) ; boolean interrupted ; do { interrupted = false ; try { waitOn ( ) ; } catch ( InterruptedException e ) { // No FFDC code needed interrupted = true ; } } while ( interrupted ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "waitOnIgnoringInterruptions" ) ; }
|
Wait on the semaphore ignoring any attempt to interrupt the thread .
| 114
| 14
|
162,372
|
protected void setMemberFactories ( FaceletCache . MemberFactory < V > faceletFactory , FaceletCache . MemberFactory < V > viewMetadataFaceletFactory , FaceletCache . MemberFactory < V > compositeComponentMetadataFaceletFactory ) { if ( compositeComponentMetadataFaceletFactory == null ) { throw new NullPointerException ( "viewMetadataFaceletFactory is null" ) ; } _compositeComponentMetadataFaceletFactory = compositeComponentMetadataFaceletFactory ; setMemberFactories ( faceletFactory , viewMetadataFaceletFactory ) ; }
|
Set the factories used for create Facelet instances .
| 124
| 10
|
162,373
|
@ Override public void close ( ) throws IOException { if ( this . in != null && this . inStream != null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { logger . logp ( Level . FINE , CLASS_NAME , "close" , "close called->" + this ) ; } this . in . close ( ) ; } else { super . close ( ) ; } }
|
Following needed to support MultiRead
| 102
| 6
|
162,374
|
@ Override public ArtifactContainer createContainer ( File cacheDir , Object containerData ) { if ( ! ( containerData instanceof File ) ) { return null ; } File fileContainerData = ( File ) containerData ; if ( ! FileUtils . fileIsFile ( fileContainerData ) ) { return null ; } if ( ! isZip ( fileContainerData ) ) { return null ; } return new ZipFileContainer ( cacheDir , fileContainerData , this ) ; }
|
Attempt to create a root - of - roots zip file type container .
| 99
| 14
|
162,375
|
@ Override public ArtifactContainer createContainer ( File cacheDir , ArtifactContainer enclosingContainer , ArtifactEntry entryInEnclosingContainer , Object containerData ) { if ( ( containerData instanceof File ) && FileUtils . fileIsFile ( ( File ) containerData ) ) { File fileContainerData = ( File ) containerData ; if ( isZip ( fileContainerData ) ) { return new ZipFileContainer ( cacheDir , enclosingContainer , entryInEnclosingContainer , fileContainerData , this ) ; } else { return null ; } } else { if ( isZip ( entryInEnclosingContainer ) ) { return new ZipFileContainer ( cacheDir , enclosingContainer , entryInEnclosingContainer , null , this ) ; } else { return null ; } } }
|
Attempt to create an enclosed root zip file type container .
| 166
| 11
|
162,376
|
private static boolean hasZipExtension ( String name ) { int nameLen = name . length ( ) ; // Need '.' plus at least three characters. if ( nameLen < 4 ) { return false ; } // Need '.' plus at least six characters for ".spring". if ( nameLen >= 7 ) { if ( ( name . charAt ( nameLen - 7 ) == ' ' ) && name . regionMatches ( IGNORE_CASE , nameLen - 6 , ZIP_EXTENSION_SPRING , 0 , 6 ) ) { return true ; } } if ( name . charAt ( nameLen - 4 ) != ' ' ) { return false ; } else { for ( String ext : ZIP_EXTENSIONS ) { if ( name . regionMatches ( IGNORE_CASE , nameLen - 3 , ext , 0 , 3 ) ) { // ignore case return true ; } } return false ; } // return name.matches("(?i:(.*)\\.(ZIP|[SEJRW]AR|E[BS]A|SPRING))"); }
|
Tell if a file name has a zip file type extension .
| 232
| 12
|
162,377
|
private static boolean isZip ( ArtifactEntry artifactEntry ) { if ( ! hasZipExtension ( artifactEntry . getName ( ) ) ) { return false ; } boolean validZip = false ; InputStream entryInputStream = null ; try { entryInputStream = artifactEntry . getInputStream ( ) ; if ( entryInputStream == null ) { return false ; } ZipInputStream zipInputStream = new ZipInputStream ( entryInputStream ) ; try { ZipEntry entry = zipInputStream . getNextEntry ( ) ; if ( entry == null ) { Tr . error ( tc , "bad.zip.data" , getPhysicalPath ( artifactEntry ) ) ; } else { validZip = true ; } } catch ( IOException e ) { String entryPath = getPhysicalPath ( artifactEntry ) ; Tr . error ( tc , "bad.zip.data" , entryPath ) ; } try { // attempt to close the zip, ignoring any error because we can't recover. zipInputStream . close ( ) ; } catch ( IOException ioe ) { // FFDC } } catch ( IOException e1 ) { // FFDC return false ; } return validZip ; }
|
Tell if an artifact entry is valid to be interpreted as a zip file container .
| 247
| 16
|
162,378
|
@ SuppressWarnings ( "deprecation" ) private static String getPhysicalPath ( ArtifactEntry artifactEntry ) { String physicalPath = artifactEntry . getPhysicalPath ( ) ; if ( physicalPath != null ) { return physicalPath ; } String entryPath = artifactEntry . getPath ( ) ; String rootPath = artifactEntry . getRoot ( ) . getPhysicalPath ( ) ; if ( rootPath != null ) { return rootPath + "!" + entryPath ; } while ( ( artifactEntry = artifactEntry . getRoot ( ) . getEntryInEnclosingContainer ( ) ) != null ) { String nextPhysicalPath = artifactEntry . getPhysicalPath ( ) ; if ( nextPhysicalPath != null ) { return nextPhysicalPath + "!" + entryPath ; } entryPath = artifactEntry . getPath ( ) + "!" + entryPath ; } return entryPath ; }
|
Answer they physical path of an artifact entry .
| 187
| 9
|
162,379
|
@ FFDCIgnore ( { IOException . class , FileNotFoundException . class } ) private static boolean isZip ( File file ) { if ( ! hasZipExtension ( file . getName ( ) ) ) { return false ; } InputStream inputStream = null ; try { inputStream = new FileInputStream ( file ) ; // throws FileNotFoundException ZipInputStream zipInputStream = new ZipInputStream ( inputStream ) ; try { ZipEntry entry = zipInputStream . getNextEntry ( ) ; // throws IOException if ( entry == null ) { Tr . error ( tc , "bad.zip.data" , file . getAbsolutePath ( ) ) ; return false ; } return true ; } catch ( IOException e ) { Tr . error ( tc , "bad.zip.data" , file . getAbsolutePath ( ) ) ; return false ; } } catch ( FileNotFoundException e ) { Tr . error ( tc , "Missing zip file " + file . getAbsolutePath ( ) ) ; return false ; } finally { if ( inputStream != null ) { try { inputStream . close ( ) ; } catch ( IOException e ) { // IGNORE } } } }
|
Tell if a file is valid to used to create a zip file container .
| 257
| 15
|
162,380
|
public static UpdatedFile fromNode ( Node n ) { String id = n . getAttributes ( ) . getNamedItem ( "id" ) == null ? null : n . getAttributes ( ) . getNamedItem ( "id" ) . getNodeValue ( ) ; long size = n . getAttributes ( ) . getNamedItem ( "size" ) == null ? null : Long . parseLong ( n . getAttributes ( ) . getNamedItem ( "size" ) . getNodeValue ( ) ) ; String date = n . getAttributes ( ) . getNamedItem ( "date" ) == null ? null : n . getAttributes ( ) . getNamedItem ( "date" ) . getNodeValue ( ) ; String hash = n . getAttributes ( ) . getNamedItem ( "hash" ) == null ? n . getAttributes ( ) . getNamedItem ( "MD5hash" ) == null ? null : n . getAttributes ( ) . getNamedItem ( "MD5hash" ) . getNodeValue ( ) : n . getAttributes ( ) . getNamedItem ( "hash" ) . getNodeValue ( ) ; return new UpdatedFile ( id , size , date , hash ) ; }
|
needs to support both hash and MD5hash as attributes
| 266
| 11
|
162,381
|
@ Override public void serverStopping ( ) { BundleContext bundleContext = componentContext . getBundleContext ( ) ; Collection < ServiceReference < EndpointActivationService > > refs ; try { refs = bundleContext . getServiceReferences ( EndpointActivationService . class , null ) ; } catch ( InvalidSyntaxException x ) { FFDCFilter . processException ( x , getClass ( ) . getName ( ) , "61" , this ) ; throw new RuntimeException ( x ) ; } for ( ServiceReference < EndpointActivationService > ref : refs ) { EndpointActivationService eas = bundleContext . getService ( ref ) ; try { for ( ActivationParams a ; null != ( a = eas . endpointActivationParams . poll ( ) ) ; ) try { eas . endpointDeactivation ( ( ActivationSpec ) a . activationSpec , a . messageEndpointFactory ) ; } catch ( Throwable x ) { FFDCFilter . processException ( x , getClass ( ) . getName ( ) , "71" , this ) ; } } finally { bundleContext . ungetService ( ref ) ; } } }
|
Invoked when server is quiescing . Deactivate all endpoints .
| 248
| 15
|
162,382
|
public boolean filterMatches ( AbstractItem item ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "filterMatches" , item ) ; /* Cast the incoming item to a PersistentStoreReferenceStream object. if it is not, an * exception will be thrown and the match will fail */ SIMPReferenceStream rstream ; if ( item instanceof SIMPReferenceStream ) { rstream = ( SIMPReferenceStream ) item ; // Check for matching consumer dispatchers if ( rstream == consumerDispatcher . getReferenceStream ( ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "filterMatches" , Boolean . TRUE ) ; return true ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "filterMatches" , Boolean . FALSE ) ; return false ; }
|
Filter method . Checks whether the given item is a consumerDispatcher and matches the one associated with this filter
| 226
| 22
|
162,383
|
private ValidatorFactory createValidatorFactory ( FacesContext context ) { Map < String , Object > applicationMap = context . getExternalContext ( ) . getApplicationMap ( ) ; Object attr = applicationMap . get ( VALIDATOR_FACTORY_KEY ) ; if ( attr instanceof ValidatorFactory ) { return ( ValidatorFactory ) attr ; } else { synchronized ( this ) { if ( _ExternalSpecifications . isBeanValidationAvailable ( ) ) { ValidatorFactory factory = Validation . buildDefaultValidatorFactory ( ) ; applicationMap . put ( VALIDATOR_FACTORY_KEY , factory ) ; return factory ; } else { throw new FacesException ( "Bean Validation is not present" ) ; } } } }
|
This method creates ValidatorFactory instances or retrieves them from the container .
| 162
| 15
|
162,384
|
private void postSetValidationGroups ( ) { if ( this . validationGroups == null || this . validationGroups . matches ( EMPTY_VALIDATION_GROUPS_PATTERN ) ) { this . validationGroupsArray = DEFAULT_VALIDATION_GROUPS_ARRAY ; } else { String [ ] classes = this . validationGroups . split ( VALIDATION_GROUPS_DELIMITER ) ; List < Class < ? > > validationGroupsList = new ArrayList < Class < ? > > ( classes . length ) ; for ( String clazz : classes ) { clazz = clazz . trim ( ) ; if ( ! clazz . isEmpty ( ) ) { Class < ? > theClass = null ; ClassLoader cl = null ; if ( System . getSecurityManager ( ) != null ) { try { cl = AccessController . doPrivileged ( new PrivilegedExceptionAction < ClassLoader > ( ) { public ClassLoader run ( ) throws PrivilegedActionException { return Thread . currentThread ( ) . getContextClassLoader ( ) ; } } ) ; } catch ( PrivilegedActionException pae ) { throw new FacesException ( pae ) ; } } else { cl = Thread . currentThread ( ) . getContextClassLoader ( ) ; } try { // Try WebApp ClassLoader first theClass = Class . forName ( clazz , false , cl ) ; } catch ( ClassNotFoundException ignore ) { try { // fallback: Try ClassLoader for BeanValidator (i.e. the myfaces.jar lib) theClass = Class . forName ( clazz , false , BeanValidator . class . getClassLoader ( ) ) ; } catch ( ClassNotFoundException e ) { throw new RuntimeException ( "Could not load validation group" , e ) ; } } // the class was found validationGroupsList . add ( theClass ) ; } } this . validationGroupsArray = validationGroupsList . toArray ( new Class [ validationGroupsList . size ( ) ] ) ; } }
|
Fully initialize the validation groups if needed . If no validation groups are specified the Default validation group is used .
| 442
| 22
|
162,385
|
public void setEnumerators ( String [ ] val ) { enumerators = val ; enumeratorCount = ( enumerators != null ) ? enumerators . length : 0 ; }
|
Set the enumerators in the order of their assigned codes
| 37
| 11
|
162,386
|
public void encodeType ( byte [ ] frame , int [ ] limits ) { setByte ( frame , limits , ( byte ) ENUM ) ; setCount ( frame , limits , enumeratorCount ) ; }
|
propagate the enumeratorCount .
| 43
| 7
|
162,387
|
public void format ( StringBuffer fmt , Set done , Set todo , int indent ) { formatName ( fmt , indent ) ; fmt . append ( "Enum" ) ; if ( enumerators != null ) { fmt . append ( "{{" ) ; String delim = "" ; for ( int i = 0 ; i < enumerators . length ; i ++ ) { fmt . append ( delim ) . append ( enumerators [ i ] ) ; delim = "," ; } fmt . append ( "}}" ) ; } }
|
Format for printing .
| 109
| 4
|
162,388
|
public static _ValueReferenceWrapper resolve ( ValueExpression valueExpression , final ELContext elCtx ) { _ValueReferenceResolver resolver = new _ValueReferenceResolver ( elCtx . getELResolver ( ) ) ; ELContext elCtxDecorator = new _ELContextDecorator ( elCtx , resolver ) ; valueExpression . getValue ( elCtxDecorator ) ; while ( resolver . lastObject . getBase ( ) instanceof CompositeComponentExpressionHolder ) { valueExpression = ( ( CompositeComponentExpressionHolder ) resolver . lastObject . getBase ( ) ) . getExpression ( ( String ) resolver . lastObject . getProperty ( ) ) ; valueExpression . getValue ( elCtxDecorator ) ; } return resolver . lastObject ; }
|
This method can be used to extract the ValueReferenceWrapper from the given ValueExpression .
| 181
| 19
|
162,389
|
@ Override public Object getValue ( final ELContext context , final Object base , final Object property ) { lastObject = new _ValueReferenceWrapper ( base , property ) ; return resolver . getValue ( context , base , property ) ; }
|
This method is the only one that matters . It keeps track of the objects in the EL expression .
| 52
| 20
|
162,390
|
private boolean isApplicationException ( Throwable ex , EJBMethodInfoImpl methodInfo ) { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "isApplicationException : " + ex . getClass ( ) . getName ( ) + ", " + methodInfo ) ; // d660332 if ( ex instanceof Exception && ( ! ContainerProperties . DeclaredUncheckedAreSystemExceptions || ! ( ex instanceof RuntimeException ) ) ) { Class < ? > [ ] declaredExceptions = null ; // Checks if the method interface is business or component. // If it's a component interface, there is only one interface to worry about // d734957 if ( ivInterface == WrapperInterface . LOCAL || ivInterface == WrapperInterface . REMOTE ) { declaredExceptions = methodInfo . ivDeclaredExceptionsComp ; } else { // Determine if there were any declared exceptions for the method // interface being used. However, if the wrapper is an aggregate // wrapper (all interfaces), then just find the first set of // non-null declared exceptions. It is possible (thought not likely) // this could result in odd behavior, but a warning was logged // when the wrapper class was created. F743-34304 if ( ivBusinessInterfaceIndex == AGGREGATE_LOCAL_INDEX ) { for ( Class < ? > [ ] declaredEx : methodInfo . ivDeclaredExceptions ) { if ( declaredEx != null ) { declaredExceptions = declaredEx ; break ; } } } else { if ( isTraceOn && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "ivBusinessInterfaceIndex=" + ivBusinessInterfaceIndex ) ; declaredExceptions = methodInfo . ivDeclaredExceptions [ ivBusinessInterfaceIndex ] ; // F743-24429 } } if ( declaredExceptions != null ) { for ( Class < ? > declaredException : declaredExceptions ) { if ( declaredException . isAssignableFrom ( ex . getClass ( ) ) ) { if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "isApplicationException : true" ) ; return true ; } } } } if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "isApplicationException : false" ) ; return false ; }
|
F743 - 761
| 523
| 6
|
162,391
|
synchronized protected void addMessagingEngine ( final JsMessagingEngine messagingEngine ) { final String methodName = "addMessagingEngine" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName , messagingEngine ) ; } SibRaMessagingEngineConnection connection = null ; try { /* * Get a connection for the messaging engine */ connection = getConnection ( messagingEngine ) ; final SICoreConnection coreConnection = connection . getConnection ( ) ; if ( coreConnection instanceof SICoreConnection ) { /* * Create destination listener */ final DestinationListener destinationListener = new SibRaDestinationListener ( connection , _messageEndpointFactory ) ; /* * Determine destination type */ final DestinationType destinationType = _endpointConfiguration . getDestinationType ( ) ; /* * Register destination listener */ final SIDestinationAddress [ ] destinations = coreConnection . addDestinationListener ( null , destinationListener , destinationType , DestinationAvailability . RECEIVE ) ; /* * Create a listener for each destination ... */ for ( int j = 0 ; j < destinations . length ; j ++ ) { try { connection . createListener ( destinations [ j ] , _messageEndpointFactory ) ; } catch ( final ResourceException exception ) { FFDCFilter . processException ( exception , CLASS_NAME + "." + methodName , FFDC_PROBE_1 , this ) ; SibTr . error ( TRACE , "CREATE_LISTENER_FAILED_CWSIV0803" , new Object [ ] { exception , destinations [ j ] . getDestinationName ( ) , messagingEngine . getName ( ) , messagingEngine . getBusName ( ) } ) ; } } } } catch ( final SIException exception ) { FFDCFilter . processException ( exception , CLASS_NAME + "." + methodName , FFDC_PROBE_2 , this ) ; SibTr . error ( TRACE , "ADD_DESTINATION_LISTENER_FAILED_CWSIV0804" , new Object [ ] { exception , messagingEngine . getName ( ) , messagingEngine . getBusName ( ) } ) ; closeConnection ( messagingEngine ) ; } catch ( final ResourceException exception ) { FFDCFilter . processException ( exception , CLASS_NAME + "." + methodName , FFDC_PROBE_3 , this ) ; SibTr . error ( TRACE , "CREATE_CONNECTION_FAILED_CWSIV0801" , new Object [ ] { exception , messagingEngine . getName ( ) , messagingEngine . getBusName ( ) } ) ; closeConnection ( messagingEngine ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . exit ( this , TRACE , methodName ) ; } }
|
Connects to the given messaging engine . Registers a destination listener and creates listeners for each of the current destinations .
| 629
| 23
|
162,392
|
public void addNotfication ( Notification notification ) { Object source = notification . getSource ( ) ; NotificationRecord nr ; if ( source instanceof ObjectName ) { nr = new NotificationRecord ( notification , ( ObjectName ) source ) ; } else { nr = new NotificationRecord ( notification , ( source != null ) ? source . toString ( ) : null ) ; } addNotficationRecord ( nr ) ; }
|
This method will be called by the NotificationListener once the MBeanServer pushes a notification .
| 91
| 19
|
162,393
|
public void addClientNotificationListener ( RESTRequest request , NotificationRegistration notificationRegistration , JSONConverter converter ) { String objectNameStr = notificationRegistration . objectName . getCanonicalName ( ) ; NotificationTargetInformation nti = toNotificationTargetInformation ( request , objectNameStr ) ; // Get the listener ClientNotificationListener listener = listeners . get ( nti ) ; if ( listener == null ) { listener = new ClientNotificationListener ( this ) ; ClientNotificationListener mapListener = listeners . putIfAbsent ( nti , listener ) ; if ( mapListener != null ) { listener = mapListener ; } } // Grab the wrapper filter which will be registered in the MBeanServer NotificationFilter filter = listener . getClientWrapperFilter ( ) ; // Check whether the producer of the notification is local or remote. if ( nti . getRoutingInformation ( ) == null ) { // Add the notification in the MBeanServer MBeanServerHelper . addClientNotification ( notificationRegistration . objectName , listener , filter , null , converter ) ; } else { // Add the notification listener to the Target-Client Manager through EventAdmin MBeanRoutedNotificationHelper helper = MBeanRoutedNotificationHelper . getMBeanRoutedNotificationHelper ( ) ; helper . addRoutedNotificationListener ( nti , listener , converter ) ; } // Add the filters to the listener listener . addClientNotification ( notificationRegistration . filters ) ; }
|
Fetch or create a new listener for the given object name
| 313
| 12
|
162,394
|
public void updateClientNotificationListener ( RESTRequest request , String objectNameStr , NotificationFilter [ ] filters , JSONConverter converter ) { NotificationTargetInformation nti = toNotificationTargetInformation ( request , objectNameStr ) ; ClientNotificationListener listener = listeners . get ( nti ) ; if ( listener == null ) { throw ErrorHelper . createRESTHandlerJsonException ( new RuntimeException ( "There are no listeners registered for " + nti ) , converter , APIConstants . STATUS_BAD_REQUEST ) ; } //Make the update listener . addClientNotification ( filters ) ; }
|
Update the listener for the given object name with the provided filters
| 134
| 12
|
162,395
|
private Object removeObject ( Integer key ) { if ( key == null ) { return null ; } return objectLibrary . remove ( key ) ; }
|
Only to be used by removal coming from direct - http calls because calls from the jmx client can still reference this key for other notifications .
| 30
| 28
|
162,396
|
public void removeClientNotificationListener ( RESTRequest request , ObjectName name ) { NotificationTargetInformation nti = toNotificationTargetInformation ( request , name . getCanonicalName ( ) ) ; // Remove locally ClientNotificationListener listener = listeners . remove ( nti ) ; // Check whether the producer of the notification is local or remote. if ( nti . getRoutingInformation ( ) == null ) { // Remove the notification from the MBeanServer MBeanServerHelper . removeClientNotification ( name , listener ) ; } else { // Remove the notification listener from the Target-Client Manager through EventAdmin MBeanRoutedNotificationHelper helper = MBeanRoutedNotificationHelper . getMBeanRoutedNotificationHelper ( ) ; helper . removeRoutedNotificationListener ( nti , listener ) ; } }
|
Remove the given NotificationListener
| 178
| 5
|
162,397
|
public void addServerNotificationListener ( RESTRequest request , ServerNotificationRegistration serverNotificationRegistration , JSONConverter converter ) { NotificationTargetInformation nti = toNotificationTargetInformation ( request , serverNotificationRegistration . objectName . getCanonicalName ( ) ) ; //Fetch the filter/handback objects NotificationFilter filter = ( NotificationFilter ) getObject ( serverNotificationRegistration . filterID , serverNotificationRegistration . filter , converter ) ; Object handback = getObject ( serverNotificationRegistration . handbackID , serverNotificationRegistration . handback , converter ) ; // Check whether the producer of the notification is local or remote. if ( nti . getRoutingInformation ( ) == null ) { //Add to the MBeanServer MBeanServerHelper . addServerNotification ( serverNotificationRegistration . objectName , serverNotificationRegistration . listener , filter , handback , converter ) ; } else { // Add the notification listener to the Target-Client Manager through EventAdmin MBeanRoutedNotificationHelper helper = MBeanRoutedNotificationHelper . getMBeanRoutedNotificationHelper ( ) ; helper . addRoutedServerNotificationListener ( nti , serverNotificationRegistration . listener , filter , handback , converter ) ; } //Make the local ServerNotification ServerNotification serverNotification = new ServerNotification ( ) ; serverNotification . listener = serverNotificationRegistration . listener ; serverNotification . filter = serverNotificationRegistration . filterID ; serverNotification . handback = serverNotificationRegistration . handbackID ; //See if there's a list already List < ServerNotification > list = serverNotifications . get ( nti ) ; if ( list == null ) { list = Collections . synchronizedList ( new ArrayList < ServerNotification > ( ) ) ; List < ServerNotification > mapList = serverNotifications . putIfAbsent ( nti , list ) ; if ( mapList != null ) { list = mapList ; } } //Add the new notification into the list list . add ( serverNotification ) ; }
|
Add the server notification to our internal list so we can cleanup afterwards
| 444
| 13
|
162,398
|
public synchronized void remoteClientRegistrations ( RESTRequest request ) { Iterator < Entry < NotificationTargetInformation , ClientNotificationListener > > clientListeners = listeners . entrySet ( ) . iterator ( ) ; try { while ( clientListeners . hasNext ( ) ) { Entry < NotificationTargetInformation , ClientNotificationListener > clientListener = clientListeners . next ( ) ; NotificationTargetInformation nti = clientListener . getKey ( ) ; ClientNotificationListener listener = clientListener . getValue ( ) ; // Check whether the producer of the notification is local or remote. if ( nti . getRoutingInformation ( ) == null ) { // Remove the notification from the MBeanServer ObjectName objName = RESTHelper . objectNameConverter ( nti . getNameAsString ( ) , false , null ) ; if ( MBeanServerHelper . isRegistered ( objName ) ) { try { MBeanServerHelper . removeClientNotification ( objName , listener ) ; } catch ( RESTHandlerJsonException exception ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Received exception while cleaning up: " + exception ) ; } } } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "The MBean " + objName + " is not registered with the MBean server." ) ; } } } else { // Remove the notification listener from the Target-Client Manager through EventAdmin MBeanRoutedNotificationHelper helper = MBeanRoutedNotificationHelper . getMBeanRoutedNotificationHelper ( ) ; helper . removeRoutedNotificationListener ( nti , listener ) ; } } } finally { //Clear the map listeners . clear ( ) ; } }
|
Remove all the client notifications
| 404
| 5
|
162,399
|
public synchronized void remoteServerRegistrations ( RESTRequest request ) { Iterator < Entry < NotificationTargetInformation , List < ServerNotification > > > serverNotificationsIter = serverNotifications . entrySet ( ) . iterator ( ) ; while ( serverNotificationsIter . hasNext ( ) ) { Entry < NotificationTargetInformation , List < ServerNotification > > entry = serverNotificationsIter . next ( ) ; NotificationTargetInformation nti = entry . getKey ( ) ; // Check whether the producer of the notification is local or remote. if ( nti . getRoutingInformation ( ) == null ) { //Traverse the list for that ObjectName ObjectName objName = RESTHelper . objectNameConverter ( nti . getNameAsString ( ) , false , null ) ; if ( MBeanServerHelper . isRegistered ( objName ) ) { for ( ServerNotification notification : entry . getValue ( ) ) { MBeanServerHelper . removeServerNotification ( objName , notification . listener , ( NotificationFilter ) getObject ( notification . filter , null , null ) , getObject ( notification . handback , null , null ) , null ) ; } } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "The MBean is not registered with the MBean server." ) ; } } } else { // Remove the notification listener from the Target-Client Manager through EventAdmin MBeanRoutedNotificationHelper helper = MBeanRoutedNotificationHelper . getMBeanRoutedNotificationHelper ( ) ; for ( ServerNotification notification : entry . getValue ( ) ) { helper . removeRoutedServerNotificationListener ( nti , notification . listener , ( NotificationFilter ) getObject ( notification . filter , null , null ) , getObject ( notification . handback , null , null ) , null ) ; } } } //Clear the map serverNotifications . clear ( ) ; //We don't have any more server notifications, so we can clear our library clearObjectLibrary ( ) ; }
|
Remove all the server notifications
| 449
| 5
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.