use of org.glassfish.jersey.internal.ServiceFinderBinder in project jersey by jersey.
the class MetaInfServicesAutoDiscoverable method configure.
@Override
public void configure(final FeatureContext context) {
final Map<String, Object> properties = context.getConfiguration().getProperties();
final RuntimeType runtimeType = context.getConfiguration().getRuntimeType();
context.register(new AbstractBinder() {
@Override
protected void configure() {
// Message Body providers.
install(new ServiceFinderBinder<MessageBodyReader>(MessageBodyReader.class, properties, runtimeType));
install(new ServiceFinderBinder<MessageBodyWriter>(MessageBodyWriter.class, properties, runtimeType));
// Exception Mappers.
install(new ServiceFinderBinder<ExceptionMapper>(ExceptionMapper.class, properties, runtimeType));
}
});
}
Aggregations