@Override public void initiate(final ResourceConfig rc, final IoCComponentProviderFactory _provider) { Errors.processWithErrors(new Errors.Closure<Void>() { @Override public Void f() { Errors.setReportMissingDependentFieldOrMethod(false); _initiate(rc, _provider); return null; } }); }
/* package */ UriRules<UriRule> getUriRules(final Class c) { assert c != null; // Try the non-blocking read, the most common operation UriRules<UriRule> r = rulesMap.get(c); if (r != null) { return r; } // Not present use a synchronized block to ensure that only one // instance is created and put to the map synchronized (abstractResourceMap) { // One or more threads may have been blocking on the synchronized // block, re-check the map r = rulesMap.get(c); if (r != null) { return r; } r = Errors.processWithErrors(new Errors.Closure<ResourceUriRules>() { @Override public ResourceUriRules f() { return newResourceUriRules(getAbstractResource(c)); } }).getRules(); rulesMap.put(c, r); } return r; }
Errors.processWithErrors(new Errors.Closure<Void>() { @Override public Void f() {
@Override public IoCComponentProcessor get(final Class c, final ComponentScope scope) { IoCComponentProcessor cp = componentProcessorMap.get(c); if (cp != null) { return (cp == NULL_COMPONENT_PROCESSOR) ? null : cp; } synchronized (abstractResourceMap) { cp = componentProcessorMap.get(c); if (cp != null) { return (cp == NULL_COMPONENT_PROCESSOR) ? null : cp; } final ResourceComponentInjector rci = Errors.processWithErrors(new Errors.Closure<ResourceComponentInjector>() { @Override public ResourceComponentInjector f() { return new ResourceComponentInjector( injectableFactory, scope, getAbstractResource(c)); } }); if (rci.hasInjectableArtifacts()) { cp = new ComponentProcessorImpl(rci); componentProcessorMap.put(c, cp); } else { cp = null; componentProcessorMap.put(c, NULL_COMPONENT_PROCESSOR); } } return cp; } }
Errors.processWithErrors(new Errors.Closure<Void>() { @Override public Void f() {
@Override public void initiate(final ResourceConfig rc, final IoCComponentProviderFactory _provider) { Errors.processWithErrors(new Errors.Closure<Void>() { @Override public Void f() { Errors.setReportMissingDependentFieldOrMethod(false); _initiate(rc, _provider); return null; } }); }
@Override public void initiate(final ResourceConfig rc, final IoCComponentProviderFactory _provider) { Errors.processWithErrors(new Errors.Closure<Void>() { @Override public Void f() { Errors.setReportMissingDependentFieldOrMethod(false); _initiate(rc, _provider); return null; } }); }
/** * Create a new instance with a client configuration and a * component provider. * * @param root the root client handler for dispatching a request and * returning a response. * @param config the client configuration. * @param provider the IoC component provider factory. */ public Client(final ClientHandler root, final ClientConfig config, final IoCComponentProviderFactory provider) { // Defer instantiation of root to component provider super(root); Errors.processWithErrors(new Errors.Closure<Void>() { @Override public Void f() { Errors.setReportMissingDependentFieldOrMethod(false); init(root, config, provider); return null; } }); }
/** * Create a new instance with a client configuration and a * component provider. * * @param root the root client handler for dispatching a request and * returning a response. * @param config the client configuration. * @param provider the IoC component provider factory. */ public Client(final ClientHandler root, final ClientConfig config, final IoCComponentProviderFactory provider) { // Defer instantiation of root to component provider super(root); Errors.processWithErrors(new Errors.Closure<Void>() { @Override public Void f() { Errors.setReportMissingDependentFieldOrMethod(false); init(root, config, provider); return null; } }); }
/* package */ UriRules<UriRule> getUriRules(final Class c) { assert c != null; // Try the non-blocking read, the most common operation UriRules<UriRule> r = rulesMap.get(c); if (r != null) { return r; } // Not present use a synchronized block to ensure that only one // instance is created and put to the map synchronized (abstractResourceMap) { // One or more threads may have been blocking on the synchronized // block, re-check the map r = rulesMap.get(c); if (r != null) { return r; } r = Errors.processWithErrors(new Errors.Closure<ResourceUriRules>() { @Override public ResourceUriRules f() { return newResourceUriRules(getAbstractResource(c)); } }).getRules(); rulesMap.put(c, r); } return r; }
/* package */ UriRules<UriRule> getUriRules(final Class c) { assert c != null; // Try the non-blocking read, the most common operation UriRules<UriRule> r = rulesMap.get(c); if (r != null) { return r; } // Not present use a synchronized block to ensure that only one // instance is created and put to the map synchronized (abstractResourceMap) { // One or more threads may have been blocking on the synchronized // block, re-check the map r = rulesMap.get(c); if (r != null) { return r; } r = Errors.processWithErrors(new Errors.Closure<ResourceUriRules>() { @Override public ResourceUriRules f() { return newResourceUriRules(getAbstractResource(c)); } }).getRules(); rulesMap.put(c, r); } return r; }
Errors.processWithErrors(new Errors.Closure<Void>() { @Override public Void f() {
Errors.processWithErrors(new Errors.Closure<Void>() { @Override public Void f() {
@Override public IoCComponentProcessor get(final Class c, final ComponentScope scope) { IoCComponentProcessor cp = componentProcessorMap.get(c); if (cp != null) { return (cp == NULL_COMPONENT_PROCESSOR) ? null : cp; } synchronized (abstractResourceMap) { cp = componentProcessorMap.get(c); if (cp != null) { return (cp == NULL_COMPONENT_PROCESSOR) ? null : cp; } final ResourceComponentInjector rci = Errors.processWithErrors(new Errors.Closure<ResourceComponentInjector>() { @Override public ResourceComponentInjector f() { return new ResourceComponentInjector( injectableFactory, scope, getAbstractResource(c)); } }); if (rci.hasInjectableArtifacts()) { cp = new ComponentProcessorImpl(rci); componentProcessorMap.put(c, cp); } else { cp = null; componentProcessorMap.put(c, NULL_COMPONENT_PROCESSOR); } } return cp; } }
@Override public IoCComponentProcessor get(final Class c, final ComponentScope scope) { IoCComponentProcessor cp = componentProcessorMap.get(c); if (cp != null) { return (cp == NULL_COMPONENT_PROCESSOR) ? null : cp; } synchronized (abstractResourceMap) { cp = componentProcessorMap.get(c); if (cp != null) { return (cp == NULL_COMPONENT_PROCESSOR) ? null : cp; } final ResourceComponentInjector rci = Errors.processWithErrors(new Errors.Closure<ResourceComponentInjector>() { @Override public ResourceComponentInjector f() { return new ResourceComponentInjector( injectableFactory, scope, getAbstractResource(c)); } }); if (rci.hasInjectableArtifacts()) { cp = new ComponentProcessorImpl(rci); componentProcessorMap.put(c, cp); } else { cp = null; componentProcessorMap.put(c, NULL_COMPONENT_PROCESSOR); } } return cp; } }
public JerseyEntityHandler(final ContainerManagedPlugin plugin, final Bundle bundle) { resourceConfigManager = new ResourceConfigManager(plugin, bundle); messageBodyFactory = Errors.processWithErrors(new Closure<MessageBodyFactory>() { public MessageBodyFactory f() { ResourceConfig config = resourceConfigManager.createResourceConfig(Collections.<String, Object>emptyMap(),
Errors.processWithErrors(new Errors.Closure<Void>() { @Override public Void f() {
Errors.processWithErrors(new Errors.Closure<Void>() { @Override public Void f() {