/** * Constructor. * * @throws ClassNotFoundException if a class was not found when attempting to load it * @throws InstantiationException if a class was not able to be instantiated * @throws IllegalAccessException if there was a problem accessing something due to security restrictions */ public ResourceConfig() throws ClassNotFoundException, InstantiationException, IllegalAccessException { // Build the binder using the configured factory Class<?> binderClass = Class.forName(bindingFactory); BinderFactory binderFactory = (BinderFactory) binderClass.newInstance(); Binder binder = binderFactory.buildBinder(); // Register Instrumentation register(new InstrumentedResourceMethodApplicationListener(MetricRegistryFactory.getRegistry())); registerMetricsAppender(); register(binder); registerFilters(); // Call post-registration hook to allow for additional registration binderFactory.afterRegistration(this); }