|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jackrabbit.spi.commons.logging.AbstractLogger
public class AbstractLogger
Common base class for all log wrappers of SPI entities.
Nested Class Summary | |
---|---|
protected static interface |
AbstractLogger.Callable
Type of thunk used in {@link AbstractLogger#execute(Callable, String, Object[]) |
protected static interface |
AbstractLogger.SafeCallable
Type of thunk used in {@link AbstractLogger#execute(SafeCallable, String, Object[]) |
Field Summary | |
---|---|
protected LogWriter |
writer
The LogWriter used by this instance for persisting log messages. |
Constructor Summary | |
---|---|
AbstractLogger(LogWriter writer)
Create a new instance of this log wrapper which uses writer
for persisting log messages. |
Method Summary | |
---|---|
protected Object |
execute(AbstractLogger.Callable thunk,
String methodName,
Object[] args)
Execute a thunk of a method which might throw a RepositoryException . |
protected Object |
execute(AbstractLogger.SafeCallable thunk,
String methodName,
Object[] args)
Execute a thunk of a method which does not throw any checked exception. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final LogWriter writer
LogWriter
used by this instance for persisting log messages.
Constructor Detail |
---|
public AbstractLogger(LogWriter writer)
writer
for persisting log messages.
writer
- Method Detail |
---|
protected Object execute(AbstractLogger.Callable thunk, String methodName, Object[] args) throws RepositoryException
thunk
of a method which might throw a RepositoryException
. The call
is logged to writer
right before it is actually performed and after it returns. Any
exception thrown by the call is logged before it is re-thrown.
thunk
- thunk of the method to executemethodName
- the name of the methodargs
- the arguments passed to the method
thunk
RepositoryException
- if executing the thunk
throws an Exception the
exception is re-thrown.protected Object execute(AbstractLogger.SafeCallable thunk, String methodName, Object[] args)
thunk
of a method which does not throw any checked exception. The
call is logged to writer
right before it is actually performed and after it returns.
thunk
- thunk of the method to executemethodName
- the name of the methodargs
- the arguments passed to the method
thunk
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |