private MessageProcessorSearchResults matchMessage ( MessageItem msg ) throws SIDiscriminatorSyntaxException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "matchMessage" , new Object [ ] { msg } ) ; //Extract the message from the MessageItem JsMessage jsMsg = msg . getMessage ( ) ; // Match Consumers is only called for PubSub targets. TopicAuthorization topicAuth = _messageProcessor . getDiscriminatorAccessChecker ( ) ; MessageProcessorSearchResults searchResults = new MessageProcessorSearchResults ( topicAuth ) ; // Defect 382250, set the unlockCount from MsgStore into the message // in the case where the message is being redelivered. int redelCount = msg . guessRedeliveredCount ( ) ; if ( redelCount > 0 ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Set deliverycount into message: " + redelCount ) ; jsMsg . setDeliveryCount ( redelCount ) ; } // Get the matching consumers from the matchspace _matchspace . retrieveMatchingOutputHandlers ( _destination , jsMsg . getDiscriminator ( ) , ( MatchSpaceKey ) jsMsg , searchResults ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "matchMessage" , new Object [ ] { searchResults } ) ; return searchResults ; }
Returns a list of matching OutputHandlers for a particular message . Note that this method takes a MessageProcessorSearchResults object from a pool . This object must be returned by the caller when it is finished with .