Package eu.mosaic_cloud.tools.callbacks.core

Examples of eu.mosaic_cloud.tools.callbacks.core.CallbackProxy


        provideConstructor = null;
      }
      Preconditions.checkArgument ((provideMethod != null) || (provideConstructor != null));
      final ComponentCallbacks callbacks;
      if (provideMethod != null) {
        final CallbackProxy callbacksProxy;
        Threading.setDefaultContext (context.threading);
        try {
          try {
            callbacksProxy = (CallbackProxy) provideMethod.invoke (null, context);
          } catch (final InvocationTargetException wrapper) {
            context.exceptions.trace (ExceptionResolution.Handled, wrapper);
            throw (wrapper.getCause ());
          }
        } catch (final Throwable exception) {
          context.exceptions.trace (ExceptionResolution.Handled, exception);
          throw (new IllegalArgumentException (String.format ("invalid callbacks provider class `%s` (error encountered while invocking)", this.clasz.getName ()), exception));
        } finally {
          Threading.setDefaultContext (null);
        }
        Preconditions.checkArgument (callbacksProxy != null, "invalid callbacks (is null)");
        Preconditions.checkArgument (ComponentCallbacks.class.isInstance (callbacksProxy), "invalid callbacks proxy `%s` (not an instance of `ComponentCallbacks`)", callbacksProxy.getClass ().getName ());
        Preconditions.checkArgument (CallbackProxy.class.isInstance (callbacksProxy), "invalid callbacks proxy `%s` (not an instance of `CallbackProxy`)", callbacksProxy.getClass ().getName ());
        callbacks = (ComponentCallbacks) callbacksProxy;
      } else if (provideConstructor != null) {
        final CallbackHandler callbacksHandler;
        Threading.setDefaultContext (context.threading);
        try {
View Full Code Here

TOP

Related Classes of eu.mosaic_cloud.tools.callbacks.core.CallbackProxy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.