@Override public <T, K extends SharedResourceKey> T getSharedResource(SharedResourceFactory<T, K, S> factory, K key) throws NotConfiguredException { try { return this.brokerCache.getAutoScoped(factory, key, this); } catch (ExecutionException ee) { Throwable cause = ee.getCause(); if (cause instanceof NotConfiguredException) { throw (NotConfiguredException) cause; } throw new RuntimeException(cause); } }
@Override public <T, K extends SharedResourceKey> T getSharedResource(SharedResourceFactory<T, K, S> factory, K key) throws NotConfiguredException { try { return this.brokerCache.getAutoScoped(factory, key, this); } catch (ExecutionException ee) { Throwable cause = ee.getCause(); if (cause instanceof NotConfiguredException) { throw (NotConfiguredException) cause; } throw new RuntimeException(cause); } }