Does this message header match this filter?
@param messageHeader The message header to check.
@return true if match, false if no match.
541936
public boolean isFilterMatch(BaseMessageHeader messageHeader)
    {
        boolean bMatch = true;
        if (messageHeader != null)
        {
            if (this.getQueueName() != null)
                if (!this.getQueueName().equals(messageHeader.getQueueName()))
                    return false;   // No match
            if (this.getQueueType() != null)
                if (!this.getQueueType().equals(messageHeader.getQueueType()))
                    return false;   // No match
            if (this.getMessageSource() != null)
                if (this.getMessageSource() == messageHeader.getMessageSource())
                    return false;   // If the source codes are the same object, don't echo!
            Object[][] mxMessageHeader = messageHeader.getNameValueTree();
            Object[][] mxMessageFilter = this.getNameValueTree();
            bMatch = this.compareTrees(mxMessageHeader, mxMessageFilter, false);
            if (bMatch)
                if (messageHeader.getRegistryIDMatch() != null)
                    if (!messageHeader.getRegistryIDMatch().equals(this.getRegistryID()))
                        bMatch = false;
        }
        return bMatch;    // MATCH!!!
    }
1070548
public boolean filterMatches(AbstractItem item) throws MessageStoreException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "filterMatches", item);

    boolean result = true;
    
    // If messages are classified by XD, then check the classification up front.
    // If the index is 0, then there is no classification
    if(classIndex>0)
    {
      // If we're classifying then the classification property must match this
      // filter's classification
      result = false;
      
      //Do not throw exception if Message not available in the store
      boolean throwExceptionIfMessageNotAvailable = false;
      
      // Need to get the classification out of the message
      String keyClassification = ((SIMPMessage)item).getMessageControlClassification(throwExceptionIfMessageNotAvailable);              

      if(keyClassification != null && keyClassification.equalsIgnoreCase(classificationName))
        result = true;
      else
      {
        if(TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
          SibTr.debug(tc, "filter class: " + classificationName + ", message class: " + keyClassification);
      }
    }
    
    // If we still have a potential match, then drive any selector
    // processing through the parent class.
    if(result)
      result = parentFilter.filterMatches(item);

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "filterMatches", Boolean.valueOf(result));
    
    return result;
  }
751845
public static <T extends Exception> org.hamcrest.Matcher<T> hasMessage(
            String expectedMessage) {
        return new ExceptionMessageMatcher<>(expectedMessage);
    }
812980
protected boolean checkSupportedMessageTypes(Message msg) {
        if (msg instanceof TextMessage) {
            return true;
        } else {
            try {
                log.error("Unsupported message type: " + msg.getJMSType());
            } catch (JMSException ignore) {
            }
            sendToInvalidMessageQueue(msg);
            return false;
        }
    }
1182289
public boolean isHeadMember() {
		final Address localAddress = getLocalAddress();
		if (localAddress != null) {
			final List<Address> clusterMembers = getClusterMembers();
			return !clusterMembers.isEmpty() && clusterMembers.get(0).equals(localAddress);
		}
		else {
			return true;
		}
	}
845405
boolean isMessageName(String identifier, boolean isNewStyleMessage) {
    return identifier.startsWith(MSG_PREFIX) &&
        (style == JsMessage.Style.CLOSURE || isNewStyleMessage ||
         !identifier.endsWith(DESC_SUFFIX));
  }
1062957
public function matches(MessageReceived $message): bool
    {
        $text = $message->getText();
        if ($text === null) {
            return false;
        }

        return str_contains($text, (array) $this->needles);
    }
999535
public boolean isSameFilter(BaseMessageFilter filter)
    {
        if (filter.getClass().equals(this.getClass()))
        {
            if (filter.isFilterMatch(this))
                ;   // return true;? todo (don) You need to figure out how to compare filters
        }
        return false;
    }
279827
public static boolean areRequestHeadersValid(HeaderMap headers) {
        HeaderValues te = headers.get(Headers.TRANSFER_ENCODING);
        HeaderValues cl = headers.get(Headers.CONTENT_LENGTH);
        if(te != null && cl != null) {
            return false;
        } else if(te != null && te.size() > 1) {
            return false;
        } else if(cl != null && cl.size() > 1) {
            return false;
        }
        return true;
    }
1201072
private static boolean isLast(HttpMessage httpMessage) {
        if (httpMessage instanceof FullHttpMessage) {
            FullHttpMessage fullMessage = (FullHttpMessage) httpMessage;
            if (fullMessage.trailingHeaders().isEmpty() && !fullMessage.content().isReadable()) {
                return true;
            }
        }

        return false;
    }
500417
protected boolean matchHeaderPattern(HttpMessage msg, String header, Pattern pattern) {
        if (msg.getResponseHeader().isEmpty()) {
            return false;
        }

        String val = msg.getResponseHeader().getHeader(header);
        if (val == null) {
            return false;
        }

        Matcher matcher = pattern.matcher(val);
        return matcher.find();
    }
1122778
public boolean isHashEquals(byte[] expectedSignature, BuilderMode builderMode) {
        final byte[] signature = build(builderMode);
        return MessageDigest.isEqual(signature, expectedSignature);
    }
181384
public boolean filterMatches(AbstractItem item)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "filterMatches", item);

    boolean match = false;
    LocalQPConsumerKey matchingMember = null;

    // Hopefully we have a general consumer so we don't need to parse the message
    if(generalMemberCount > 0)
    {
      // We have a match but we don't care which one out of the general members
      // actually takes the message, so if one of the general members is the one
      // performing the scan they can take the message.
      matchingMember = null;
      match = true;
    }
    // Damn, all we've got are members with selectors, we'll have to parse the message
    else
    {
      // If there is just the single member see if they match the message
      if(singleMember != null)
      {
        if(singleMember.filterMatches(item))
        {
          match = true;
          matchingMember = singleMember;
        }
      }
      // Otherwise we give all the members a chance to match it
      else
      {
        LocalQPConsumerKey keyMember;
        int index;
        int size = specificKeyMembers.size();
        for(index = 0;
            (index < size) && !match;
            index++)
        {
          keyMember = specificKeyMembers.get(index);
          // Drop out if one of the members matches it
          if(keyMember.filterMatches(item))
          {
            match = true;
            matchingMember = keyMember;
          }
        }
      }
    }

//  we only want to remember this result if get got here as a result of a consumer
    //asking for a message.
    boolean onConsumerThread = consumerThreadActive &&
                               (Thread.currentThread().getId() == consumerThreadID);

    if(onConsumerThread)
    {
      currentMatch = match;
      currentMatchingMember = matchingMember;
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "filterMatches", new Object[] {Boolean.valueOf(match), matchingMember});

    return match;
  }
782795
public Iterator<BaseMessageFilter> getFilterList(BaseMessageHeader messageHeader)
    {
        if (messageHeader == null)
            return super.getFilterList(messageHeader);  // ALL The filters
        return this.getRegistry().getFilterList(messageHeader);
    }
1359651
public boolean isNotify() {
    if (message == null) {
      return false;
    }

    return (((Request) message).getMethod().equals(Request.NOTIFY));
  }
1142727
@Override
    public void headerComplianceCheck() throws MessageSentException {
        final boolean bTrace = TraceComponent.isAnyTracingEnabled();
        if (bTrace && tc.isEntryEnabled()) {
            Tr.entry(tc, "headerComplianceCheck");
        }

        super.headerComplianceCheck();

        // 339972 - responses must have the Date header
        if (!containsHeader(HttpHeaderKeys.HDR_DATE)) {
            if (bTrace && tc.isDebugEnabled()) {
                Tr.debug(tc, "Creating a missing Date header");
            }
            setCurrentDate();
        }

        if (getServiceContext().getHttpConfig().removeServerHeader()) {
            // @PK15848 - configuration says to remove it if present
            if (containsHeader(HttpHeaderKeys.HDR_SERVER)) {
                if (bTrace && tc.isDebugEnabled()) {
                    Tr.debug(tc, "Configuration forcing removal of Server header");
                }
                removeSpecialHeader(HttpHeaderKeys.HDR_SERVER);
            }
        } else if (!containsHeader(HttpHeaderKeys.HDR_SERVER)) {
            // PM87031 (PM75371) Start
            // only add value of the Server Header if ServerHeaderValue property has a value
            byte[] serverHeader = getServiceContext().getHttpConfig().getServerHeaderValue();
            if (null != serverHeader) {
                setSpecialHeader(HttpHeaderKeys.HDR_SERVER, serverHeader);
                if (bTrace && tc.isDebugEnabled()) {
                    Tr.debug(tc, "Adding the Server header value: " + getHeader(HttpHeaderKeys.HDR_SERVER).asString());
                }
            } // PM87031 (PM75371) End
        }

        // @PK20531 - add Cache-Control header if config says to
        if (getServiceContext().getHttpConfig().shouldCookiesConfigureNoCache()) {
            updateCacheControl();
        }

        if (bTrace && tc.isEntryEnabled()) {
            Tr.exit(tc, "headerComplianceCheck");
        }
    }
878578
private boolean checkHeader(RandomAccessInputStream raf) throws IOException
	{
		raf.seek(HEAD_LOCATION);

		byte[] buf = new byte[HEAD_SIZE];
		if (raf.read(buf) != HEAD_SIZE)
		{
			throw new IOException("Error encountered finding id3v2 header");
		}

		String result = new String(buf, ENC_TYPE);
		if (result.substring(0, TAG_START.length()).equals(TAG_START))
		{
			if ((((int)buf[3]&0xFF) < 0xff) && (((int)buf[4]&0xFF) < 0xff))
			{
				if ((((int)buf[6]&0xFF) < 0x80) && (((int)buf[7]&0xFF) < 0x80) && (((int)buf[8]&0xFF) < 0x80) && (((int)buf[9]&0xFF) < 0x80))
				{
					return true;
				}
			}
		}

		return false;
	}