Tabnine Logo
OperationTracker.invoke
Code IndexAdd Tabnine to your IDE (free)

How to use
invoke
method
in
org.apache.tapestry5.ioc.OperationTracker

Best Java code snippets using org.apache.tapestry5.ioc.OperationTracker.invoke (Showing top 20 results out of 315)

origin: org.apache.tapestry/tapestry-ioc

@Override
public <T> T invoke(String description, Invokable<T> operation)
{
  return operationTracker.invoke(description, operation);
}
origin: apache/tapestry-5

@Override
public <T> T invoke(String description, Invokable<T> operation)
{
  return operationTracker.invoke(description, operation);
}
origin: apache/tapestry-5

public <T> T invoke(String description, Invokable<T> operation)
{
  return tracker.invoke(description, operation);
}
origin: org.apache.tapestry/tapestry-ioc

  @Override
  public Object createObject()
  {
    Invokable<Object> operation = new Invokable<Object>()
    {
      @Override
      public Object invoke()
      {
        return delegate.createObject();
      }
    };

    return tracker.invoke(message, operation);
  }
}
origin: apache/tapestry-5

  @Override
  public Object createObject()
  {
    Invokable<Object> operation = new Invokable<Object>()
    {
      @Override
      public Object invoke()
      {
        return delegate.createObject();
      }
    };

    return tracker.invoke(message, operation);
  }
}
origin: org.apache.tapestry/tapestry-ioc

public static <T> ObjectCreator<T> createMethodInvocationPlan(final OperationTracker tracker, final ObjectLocator locator,
                               final InjectionResources resources,
                               final Logger logger,
                               final String description,
                               final Object instance,
                               final Method method)
{
  return tracker.invoke("Creating plan to invoke " + method, new Invokable<ObjectCreator<T>>()
  {
    @Override
    public ObjectCreator<T> invoke()
    {
      ObjectCreator[] methodParameters = calculateParametersForMethod(method, locator, resources, tracker);
      Invokable<T> core = new MethodInvoker<T>(instance, method, methodParameters);
      Invokable<T> wrapped = logger == null ? core : new LoggingInvokableWrapper<T>(logger, description, core);
      return new ConstructionPlan(tracker, description, wrapped);
    }
  });
}
origin: apache/tapestry-5

public static <T> ObjectCreator<T> createMethodInvocationPlan(final OperationTracker tracker, final ObjectLocator locator,
                               final InjectionResources resources,
                               final Logger logger,
                               final String description,
                               final Object instance,
                               final Method method)
{
  return tracker.invoke("Creating plan to invoke " + method, new Invokable<ObjectCreator<T>>()
  {
    @Override
    public ObjectCreator<T> invoke()
    {
      ObjectCreator[] methodParameters = calculateParametersForMethod(method, locator, resources, tracker);
      Invokable<T> core = new MethodInvoker<T>(instance, method, methodParameters);
      Invokable<T> wrapped = logger == null ? core : new LoggingInvokableWrapper<T>(logger, description, core);
      return new ConstructionPlan(tracker, description, wrapped);
    }
  });
}
origin: org.apache.tapestry/tapestry-ioc

private Object createInstance()
{
  return tracker.invoke(String.format("Reloading class %s.", implementationClassName), new Invokable<Object>()
  {
    @Override
    public Object invoke()
    {
      Class reloadedClass = reloadImplementationClass();
      return createInstance(reloadedClass);
    }
  });
}
origin: apache/tapestry-5

private ComponentAssembler createAssembler(final String className, final ComponentResourceSelector selector)
{
  return tracker.invoke("Creating ComponentAssembler for " + className, new Invokable<ComponentAssembler>()
  {
    public ComponentAssembler invoke()
    {
      Instantiator instantiator = instantiatorSource.getInstantiator(className);
      ComponentModel componentModel = instantiator.getModel();
      ComponentTemplate template = templateSource.getTemplate(componentModel, selector);
      ComponentPageElementResources resources = resourcesSource.get(selector);
      ComponentAssembler assembler = new ComponentAssemblerImpl(PageLoaderImpl.this, instantiatorSource,
          componentClassResolver, instantiator, resources, tracker, template.usesStrictMixinParameters());
      // "Program" the assembler by adding actions to it. The actions interact with a
      // PageAssembly object (a fresh one for each new page being created).
      programAssembler(assembler, template);
      return assembler;
    }
  });
}
origin: apache/tapestry-5

private Object createInstance()
{
  return tracker.invoke(String.format("Reloading class %s.", implementationClassName), new Invokable<Object>()
  {
    @Override
    public Object invoke()
    {
      Class reloadedClass = reloadImplementationClass();
      return createInstance(reloadedClass);
    }
  });
}
origin: apache/tapestry-5

public ComponentTemplate parseTemplate(final Resource templateResource)
{
  if (!templateResource.exists())
    throw new RuntimeException(String.format("Template resource %s does not exist.", templateResource));
  return tracker.invoke("Parsing component template " + templateResource, new Invokable<ComponentTemplate>()
  {
    public ComponentTemplate invoke()
    {
      return new SaxTemplateParser(templateResource, configuration).parse(defaultCompressWhitespace);
    }
  });
}
origin: org.apache.tapestry/tapestry-ioc

@Override
public T createObject()
{
  T result = tracker.invoke(description, instanceConstructor);
  if (initializationPlans != null)
  {
    executeInitializationPLans(result);
  }
  return result;
}
origin: apache/tapestry-5

@Override
public T createObject()
{
  T result = tracker.invoke(description, instanceConstructor);
  if (initializationPlans != null)
  {
    executeInitializationPLans(result);
  }
  return result;
}
origin: apache/tapestry-5

  public Object get(final ComponentEvent event, final int index)
  {
    // Hopefully this will not be too much overhead; it's really nice to be able to track what parameter
    // caused a failure.

    return operationTracker.invoke("Obtaining value for parameter #" + (index + 1) + " of "+ methodIdentifier,
        new ParameterExtractor(providers, index, event));
  }
}
origin: apache/tapestry-5

public ComponentPageElement assembleRootComponent(final Page page)
{
  return tracker.invoke("Assembling root component for page " + page.getName(),
      new Invokable<ComponentPageElement>()
      {
        public ComponentPageElement invoke()
        {
          return performAssembleRootComponent(page);
        }
      });
}
origin: apache/tapestry-5

  @Override
  public <T> T provide(final Class<T> objectType, final AnnotationProvider annotationProvider,
             final ObjectLocator locator,
             final boolean required)
  {
    return tracker.invoke(String.format("Resolving object of type %s using MasterObjectProvider",
        PlasticUtils.toTypeName(objectType)), new Invokable<T>()
    {
      @Override
      public T invoke()
      {
        for (ObjectProvider provider : configuration)
        {
          T result = provider.provide(objectType, annotationProvider, locator);

          if (result != null) return result;
        }

        // If required, then we must obtain it the hard way, by
        // seeing if there's a single service that implements the interface.

        if (required) return locator.getService(objectType);

        return null;
      }
    });
  }
}
origin: org.apache.tapestry/tapestry-spring

@Override
public Object createObject()
{
  return resources.getTracker().invoke(
      "Creating Spring ApplicationContext via ContextLoader",
      new Invokable<Object>()
      {
        @Override
        public Object invoke()
        {
          resources.getLogger().info(
              String.format("Starting Spring (version %s)", SpringVersion
                  .getVersion()));
          WebApplicationContext context = loader
              .initWebApplicationContext(servletContext);
          shutdownHub.addRegistryShutdownListener(shutdownListener);
          applicationContextCreated.set(true);
          return context;
        }
      });
}
origin: apache/tapestry-5

@Override
public Object createObject()
{
  return resources.getTracker().invoke(
      "Creating Spring ApplicationContext via ContextLoader",
      new Invokable<Object>()
      {
        @Override
        public Object invoke()
        {
          resources.getLogger().info(
              String.format("Starting Spring (version %s)", SpringVersion
                  .getVersion()));
          WebApplicationContext context = loader
              .initWebApplicationContext(servletContext);
          shutdownHub.addRegistryShutdownListener(shutdownListener);
          applicationContextCreated.set(true);
          return context;
        }
      });
}
origin: org.apache.tapestry/tapestry-ioc

@Override
public <T> T invoke(String description, Invokable<T> operation)
{
  try
  {
    return get().invoke(description, operation);
  } finally
  {
    cleanup();
  }
}
origin: apache/tapestry-5

@Override
public <T> T invoke(String description, Invokable<T> operation)
{
  try
  {
    return get().invoke(description, operation);
  } finally
  {
    cleanup();
  }
}
org.apache.tapestry5.iocOperationTrackerinvoke

Javadoc

As with #run(String,Runnable), but the operation may return a value.

Popular methods of OperationTracker

  • run
    Executes the operation. If the operation throws a RuntimeException it will be logged and rethrown wr
  • perform
    As with #invoke(String,Invokable), but the operation may throw an java.io.IOException.

Popular in Java

  • Reading from database using SQL prepared statement
  • requestLocationUpdates (LocationManager)
  • setContentView (Activity)
  • onRequestPermissionsResult (Fragment)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now