站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 1.2.9 API 文档英文版

RemoteInvocationTraceInterceptor (Spring Framework) - Spring Framework 1.2.9 API 文档英文版


org.springframework.remoting.support
Class RemoteInvocationTraceInterceptor

java.lang.Object
  extended by org.springframework.remoting.support.RemoteInvocationTraceInterceptor
All Implemented Interfaces:
Advice, Interceptor, MethodInterceptor

public class RemoteInvocationTraceInterceptor
extends Object
implements MethodInterceptor

AOP Alliance MethodInterceptor for tracing remote invocations. Automatically applied by RemoteExporter and its subclasses.

Logs an incoming remote call as well as the finished processing of a remote call at DEBUG level. If the processing of a remote call results in a checked exception, the exception will get logged at INFO level; if it results in an unchecked exception (or error), the exception will get logged at WARN level.

The logging of exceptions is particularly useful to save the stacktrace information on the server-side rather than just propagating the exception to the client (who might or might not log it properly).

Since:
1.2
Author:
Juergen Hoeller
See Also:
RemoteExporter.setRegisterTraceInterceptor(boolean), RemoteExporter.getProxyForService()

Field Summary
protected static Log logger
           
 
Constructor Summary
RemoteInvocationTraceInterceptor(String protocolName)
          Create a new RemoteInvocationTraceInterceptor.
 
Method Summary
 Object invoke(MethodInvocation invocation)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final Log logger
Constructor Detail

RemoteInvocationTraceInterceptor

public RemoteInvocationTraceInterceptor(String protocolName)
Create a new RemoteInvocationTraceInterceptor.

Parameters:
protocolName - the name of the remoting protocol (to be used as context information in log messages)
Method Detail

invoke

public Object invoke(MethodInvocation invocation)
              throws Throwable
Specified by:
invoke in interface MethodInterceptor
Throws:
Throwable


Copyright (c) 2002-2007 The Spring Framework Project.