@Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { try { T service = dynamicReference.get(); return method.invoke(service, args); } catch (InvocationTargetException e) { throw e.getTargetException(); } }
@Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { try { T service = dynamicReference.get(); return method.invoke(service, args); } catch (InvocationTargetException e) { throw e.getTargetException(); } }
@Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { try { T service = dynamicReference.get(); return method.invoke(service, args); } catch (InvocationTargetException e) { throw e.getTargetException(); } }
@Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { try { T service = dynamicReference.get(); return method.invoke(service, args); } catch (InvocationTargetException e) { throw e.getTargetException(); } }
/** * Finds or waits for the {@link org.jclouds.compute.ComputeService} that matches the specified name. */ public ComputeService getOrWait(String name) { assertValid(); computeServices.putIfAbsent(name, new DynamicReference<ComputeService>(name, COMPUTE_SERVICE_WAIT, TimeUnit.MILLISECONDS)); return computeServices.get(name).get(); }