@Override
public Optional<RestxHandlerMatch> match(RestxRoute route) {
if (!(route instanceof StdEntityRoute)) {
return Optional.absent();
}
StdEntityRoute stdEntityRoute = (StdEntityRoute) route;
if (!(stdEntityRoute.getEntityResponseType() instanceof Class)) {
return Optional.absent();
}
Class<?> clazz = (Class<?>) stdEntityRoute.getEntityResponseType();
for (ETagProvider<?> provider : providers) {
if (provider.getEntityType().isAssignableFrom(clazz)) {
return Optional.of(new RestxHandlerMatch(new StdRestxRequestMatch("/*"), new ETagHandler<>(provider)));
}