public class KeySetEndpointContextMatcher extends Object implements EndpointContextMatcher
| Constructor and Description |
|---|
KeySetEndpointContextMatcher(String name,
String[] keys)
Creates a matcher for a set of keys to compare.
|
KeySetEndpointContextMatcher(String name,
String[] keys,
boolean compareHostname)
Creates a matcher for a set of keys to compare.
|
| Modifier and Type | Method and Description |
|---|---|
static Set<String> |
createKeySet(String... keys)
Create key set from keys.
|
String |
getName()
Return matcher name.
|
boolean |
isResponseRelatedToRequest(EndpointContext requestContext,
EndpointContext responseContext)
Check, if responses is related to the request.
|
static boolean |
isSameVirtualHost(EndpointContext firstContext,
EndpointContext secondContext)
Checks if two endpoint contexts have the same virtual host property value.
|
boolean |
isToBeSent(EndpointContext messageContext,
EndpointContext connectionContext)
Check, if message should be sent out using the current endpoint
context of the connector.
|
public KeySetEndpointContextMatcher(String name, String[] keys)
The new matcher will not compare the virtual host names of contexts.
name - name (used for logging).keys - the names of the keys whose values will be compared when matching contexts.public KeySetEndpointContextMatcher(String name, String[] keys, boolean compareHostname)
name - name (used for logging).keys - the names of the keys whose values will be compared when matching contexts.compareHostname - true if the matcher should also
compare
virtual host names when matching contexts.public String getName()
EndpointContextMatchergetName in interface EndpointContextMatcherpublic boolean isResponseRelatedToRequest(EndpointContext requestContext, EndpointContext responseContext)
EndpointContextMatcherisResponseRelatedToRequest in interface EndpointContextMatcherrequestContext - endpoint context of requestresponseContext - endpoint context of responsepublic boolean isToBeSent(EndpointContext messageContext, EndpointContext connectionContext)
EndpointContextMatcherisToBeSent in interface EndpointContextMatchermessageContext - endpoint context of messageconnectionContext - endpoint context of connectionpublic static Set<String> createKeySet(String... keys)
keys - keyspublic static final boolean isSameVirtualHost(EndpointContext firstContext, EndpointContext secondContext)
firstContext - The first context.secondContext - The second context.true if the second context is null of if both contexts'
virtualHost properties have the same value.NullPointerException - if the first context is null.Copyright © 2019 Eclipse Foundation. All rights reserved.