java.lang.Object
org.refcodes.servicebus.ServiceMatcherSugar
Declarative syntactic sugar which may be statically imported in order to
allow declarative definitions for the
ServiceMatcher
related
elements.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <S extends Service<?>>
ServiceMatcher<S>and
(ServiceMatcher<S>... aServiceMatchers) Factory method to create an "AND" matcher for the given matchers.static <S extends Service<?>>
ServiceMatcher<S>isAssignableFrom
(Class<?> aServiceType) Factory method to create an service matcher by service type.static <S extends Service<?>>
ServiceMatcher<S>or
(ServiceMatcher<S>... aServiceMatchers) Factory method to create an "OR" matcher for the given matchers.
-
Constructor Details
-
ServiceMatcherSugar
public ServiceMatcherSugar()
-
-
Method Details
-
isAssignableFrom
Factory method to create an service matcher by service type.- Type Parameters:
S
- The type of the service to be matched- Parameters:
aServiceType
- The service type to be matched by this matcher.- Returns:
- An service matcher by service type.
-
or
@SafeVarargs public static <S extends Service<?>> ServiceMatcher<S> or(ServiceMatcher<S>... aServiceMatchers) Factory method to create an "OR" matcher for the given matchers.- Type Parameters:
S
- The type of the service applied to the matcher- Parameters:
aServiceMatchers
- The matchers to be combined by an "OR".- Returns:
- An "OR" matcher.
-
and
@SafeVarargs public static <S extends Service<?>> ServiceMatcher<S> and(ServiceMatcher<S>... aServiceMatchers) Factory method to create an "AND" matcher for the given matchers.- Type Parameters:
S
- The type of the service applied to the matcher- Parameters:
aServiceMatchers
- The matchers to be combined by an "AND".- Returns:
- An "AND" matcher.
-