Example usage for org.springframework.remoting.support RemoteInvocationTraceInterceptor RemoteInvocationTraceInterceptor

List of usage examples for org.springframework.remoting.support RemoteInvocationTraceInterceptor RemoteInvocationTraceInterceptor

Introduction

In this page you can find the example usage for org.springframework.remoting.support RemoteInvocationTraceInterceptor RemoteInvocationTraceInterceptor.

Prototype

public RemoteInvocationTraceInterceptor(String exporterName) 

Source Link

Document

Create a new RemoteInvocationTraceInterceptor.

Usage

From source file:org.springframework.remoting.support.RemoteExporter.java

/**
 * Get a proxy for the given service object, implementing the specified
 * service interface.// w  w  w  .  j  a v a  2s. co m
 * <p>Used to export a proxy that does not expose any internals but just
 * a specific interface intended for remote access. Furthermore, a
 * RemoteInvocationTraceInterceptor gets registered (by default).
 * @return the proxy
 * @see #setServiceInterface
 * @see #setRegisterTraceInterceptor
 * @see RemoteInvocationTraceInterceptor
 */
protected Object getProxyForService() {
    checkService();
    checkServiceInterface();
    ProxyFactory proxyFactory = new ProxyFactory();
    proxyFactory.addInterface(getServiceInterface());
    if (isRegisterTraceInterceptor()) {
        proxyFactory.addAdvice(new RemoteInvocationTraceInterceptor(getExporterName()));
    }
    proxyFactory.setTarget(getService());
    return proxyFactory.getProxy();
}