Interface LoggingDecorator

  • All Known Implementing Classes:
    LoggingDecoratorImpl

    public interface LoggingDecorator
    Service that can create a logging interceptor that wraps around a service implementation (or interceptor). The interceptor works with the service's log to log, at debug level, method entry (with arguments), method exit (with return value, if any) as well as any thrown exceptions. This represents the Tapestry 5.0 decorator approach; for Tapestry 5.1 you may want to use the LoggingAdvisor in conjunction with a service advisor method.
    • Method Detail

      • build

        <T> T build​(Class<T> serviceInterface,
                    T delegate,
                    String serviceId,
                    org.slf4j.Logger logger)
        Builds a logging interceptor instance.
        Type Parameters:
        T -
        Parameters:
        serviceInterface - interface implemented by the delegate
        delegate - existing object to be wrapped
        serviceId - id of service
        logger - log used for debug level logging messages by the interceptor
        Returns:
        a new object implementing the interface that can be used in place of the delegate, providing logging behavior around each method call on the service interface