Tabnine Logo
ServiceResources.getServiceInterface
Code IndexAdd Tabnine to your IDE (free)

How to use
getServiceInterface
method
in
org.apache.tapestry5.ioc.ServiceResources

Best Java code snippets using org.apache.tapestry5.ioc.ServiceResources.getServiceInterface (Showing top 11 results out of 315)

origin: apache/tapestry-5

protected final void train_getServiceInterface(ServiceResources resources, Class serviceInterface)
{
  expect(resources.getServiceInterface()).andReturn(serviceInterface).atLeastOnce();
}
origin: org.apache.tapestry/tapestry-ioc

protected final void train_getServiceInterface(ServiceResources resources, Class serviceInterface)
{
  expect(resources.getServiceInterface()).andReturn(serviceInterface).atLeastOnce();
}
origin: org.apache.tapestry/tapestry-ioc

public AbstractMethodInvokingInstrumenter(ModuleBuilderSource moduleSource, Method method,
                     ServiceResources resources, PlasticProxyFactory proxyFactory)
{
  this.moduleSource = moduleSource;
  this.method = method;
  this.resources = resources;
  this.proxyFactory = proxyFactory;
  serviceId = resources.getServiceId();
  resourcesDefaults.put(String.class, serviceId);
  resourcesDefaults.put(ObjectLocator.class, resources);
  resourcesDefaults.put(ServiceResources.class, resources);
  logger = resources.getLogger();
  resourcesDefaults.put(Logger.class, logger);
  serviceInterface = resources.getServiceInterface();
  resourcesDefaults.put(Class.class, serviceInterface);
  resourcesDefaults.put(OperationTracker.class, resources.getTracker());
}
origin: apache/tapestry-5

public AbstractMethodInvokingInstrumenter(ModuleBuilderSource moduleSource, Method method,
                     ServiceResources resources, PlasticProxyFactory proxyFactory)
{
  this.moduleSource = moduleSource;
  this.method = method;
  this.resources = resources;
  this.proxyFactory = proxyFactory;
  serviceId = resources.getServiceId();
  resourcesDefaults.put(String.class, serviceId);
  resourcesDefaults.put(ObjectLocator.class, resources);
  resourcesDefaults.put(ServiceResources.class, resources);
  logger = resources.getLogger();
  resourcesDefaults.put(Logger.class, logger);
  serviceInterface = resources.getServiceInterface();
  resourcesDefaults.put(Class.class, serviceInterface);
  resourcesDefaults.put(OperationTracker.class, resources.getTracker());
}
origin: net.sourceforge.tapestrytestify/tapestry-testify

  @SuppressWarnings("unchecked")
  public Object createService(ServiceResources resources, ObjectCreator creator) {
    ObjectCreator perTestCreator = new PerTestServiceCreator(perTestManager, creator);
    Class<?> serviceInterface = resources.getServiceInterface();
    

    String toString = format("<PerTest Proxy for %s(%s)>", resources.getServiceId(), serviceInterface.getName());
    return proxyFactory.createProxy(serviceInterface, perTestCreator, toString);
  }
}
origin: org.apache.tapestry/tapestry-ioc

  @Override
  public Object createService(ServiceResources resources, ObjectCreator creator)
  {
    ObjectCreator perThreadCreator = perthreadManager.createValue(creator);

    Class serviceInterface = resources.getServiceInterface();

    return proxyFactory.createProxy(serviceInterface, perThreadCreator, "<PerThread Proxy for " + resources.getServiceId() + "(" + serviceInterface.getName() + ")>");
  }
}
origin: apache/tapestry-5

  @Override
  public Object createService(ServiceResources resources, ObjectCreator creator)
  {
    ObjectCreator perThreadCreator = perthreadManager.createValue(creator);

    Class serviceInterface = resources.getServiceInterface();

    return proxyFactory.createProxy(serviceInterface, perThreadCreator, "<PerThread Proxy for " + resources.getServiceId() + "(" + serviceInterface.getName() + ")>");
  }
}
origin: org.apache.tapestry/tapestry-ioc

private Object createProxy(ServiceResources resources, ObjectCreator creator, boolean preventDecoration)
{
  String serviceId = resources.getServiceId();
  Class serviceInterface = resources.getServiceInterface();
  String toString = format("<Proxy for %s(%s)>", serviceId, serviceInterface.getName());
  ServiceProxyToken token = SerializationSupport.createToken(serviceId);
  final Class serviceImplementation = preventDecoration || serviceInterface == TypeCoercer.class ? null : resources.getServiceImplementation();
  return createProxyInstance(creator, token, serviceInterface, serviceImplementation, toString);
}
origin: apache/tapestry-5

private Object createProxy(ServiceResources resources, ObjectCreator creator, boolean preventDecoration)
{
  String serviceId = resources.getServiceId();
  Class serviceInterface = resources.getServiceInterface();
  String toString = format("<Proxy for %s(%s)>", serviceId, serviceInterface.getName());
  ServiceProxyToken token = SerializationSupport.createToken(serviceId);
  final Class serviceImplementation = preventDecoration || serviceInterface == TypeCoercer.class ? null : resources.getServiceImplementation();
  return createProxyInstance(creator, token, serviceInterface, serviceImplementation, toString);
}
origin: apache/tapestry-5

private static <T> T doDecorate(final String decoratorId, ServiceResources resources, T delegate, AspectDecorator aspectDecorator)
{
  Class<T> serviceInterface = resources.getServiceInterface();
  AspectInterceptorBuilder<T> builder = aspectDecorator.createBuilder(serviceInterface, delegate, String.format(
      "<Interceptor for %s(%s)>", resources.getServiceId(), serviceInterface.getName()));
  builder.adviseAllMethods(new MethodAdvice()
  {
    @Override
    public void advise(MethodInvocation invocation)
    {
      invocation.proceed();
      Object result = invocation.getReturnValue();
      invocation.setReturnValue(String.format("Decorated by %s[%s]", decoratorId, result));
    }
  });
  return builder.build();
}
origin: apache/tapestry-5

private static <T> T doDecorate(final String decoratorId, ServiceResources resources, T delegate, AspectDecorator aspectDecorator)
{
  Class<T> serviceInterface = resources.getServiceInterface();
  AspectInterceptorBuilder<T> builder = aspectDecorator.createBuilder(serviceInterface, delegate, String.format(
      "<Interceptor for %s(%s)>", resources.getServiceId(), serviceInterface.getName()));
  builder.adviseAllMethods(new MethodAdvice()
  {
    @Override
    public void advise(MethodInvocation invocation)
    {
      invocation.proceed();
      Object result = invocation.getReturnValue();
      invocation.setReturnValue(String.format("Decorated by %s[%s]", decoratorId, result));
    }
  });
  return builder.build();
}
org.apache.tapestry5.iocServiceResourcesgetServiceInterface

Javadoc

Returns the service interface implemented by the service.

Popular methods of ServiceResources

  • getServiceId
    Returns the fully qualified id of the service.
  • getTracker
    Returns an object that can be used to track operations related to constructing, configuring, decorat
  • autobuild
  • getLogger
    Returns a Logger appropriate for logging messages. This includes debug level messages about the crea
  • getService
  • getServiceImplementation
    Returns the service implementation.

Popular in Java

  • Making http requests using okhttp
  • addToBackStack (FragmentTransaction)
  • setScale (BigDecimal)
  • getExternalFilesDir (Context)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Reference (javax.naming)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Top Sublime Text plugins
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