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

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

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

origin: apache/tapestry-5

@Override
public String getServiceId()
{
  return resources.getServiceId();
}
origin: apache/tapestry-5

public ToStringService buildToString(ServiceResources resources)
{
  final String serviceId = resources.getServiceId();
  return new ToStringService()
  {
    @Override
    public String toString()
    {
      return "<ToStringService: " + serviceId + ">";
    }
  };
}
origin: apache/tapestry-5

protected final void train_getServiceId(ServiceResources resources, String serviceId)
{
  expect(resources.getServiceId()).andReturn(serviceId).atLeastOnce();
}
origin: org.apache.tapestry/tapestry-ioc

protected final void train_getServiceId(ServiceResources resources, String serviceId)
{
  expect(resources.getServiceId()).andReturn(serviceId).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

  @PostInjection
  public void finishSetup(ServiceResources resources)
  {
    greeting = String.format("Greetings from %s.", resources.getServiceId());
  }
}
origin: apache/tapestry-5

@Match("*DAO")
public static <T> T decorateTransactionally(HibernateTransactionDecorator decorator, Class<T> serviceInterface,
                      T delegate, ServiceResources resources)
{
  return decorator.build(serviceInterface, delegate, resources.getServiceId());
}
origin: org.apache.tapestry/tapestry-ioc

resources.getServiceId(), t, parameterType), injectionResources);
origin: apache/tapestry-5

resources.getServiceId(), t, parameterType), injectionResources);
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.iocServiceResourcesgetServiceId

Javadoc

Returns the fully qualified id of the service.

Popular methods of ServiceResources

  • getServiceInterface
    Returns the service interface implemented by 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

  • Start an intent from android
  • getSupportFragmentManager (FragmentActivity)
  • findViewById (Activity)
  • getExternalFilesDir (Context)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Reference (javax.naming)
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top plugins for Android Studio
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