public boolean match ( String destinationName ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "match" , destinationName ) ; boolean matches = false ; if ( ! patternIsWildcarded ) { // Match the name directly through String equality matches = destinationName . equals ( destinationNamePatternString ) ; } else { // We need to match a wildcarded expression if ( destinationName . startsWith ( wildcardStem ) ) { //A candidate for full matching as the stem is the same try { matches = mpm . evaluateDiscriminator ( destinationName , destinationNamePatternString , parsedPattern ) ; } // Any discriminator exceptions should have been caught at the prepare() // stage, so ffdc, etc. catch ( SIDiscriminatorSyntaxException e ) { // FFDC FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.impl.DestinationNamePattern.match" , "1:141:1.2" , this ) ; SibTr . exception ( tc , e ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "match" , "SIErrorException" ) ; SibTr . error ( tc , "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.impl.DestinationNamePattern" , "1:152:1.2" , e } ) ; throw new SIErrorException ( nls . getFormattedMessage ( "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.impl.DestinationNamePattern" , "1:160:1.2" , e } , null ) , e ) ; } } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "match" , Boolean . valueOf ( matches ) ) ; return matches ; }
Match a string against the pattern represented by this object .