Interface AssemblyInterceptor<WP>

Type Parameters:
WP - The work piece which is being passed to the implementing interceptor and which is processed by the interceptor.
All Superinterfaces:
Interceptor<WP,WP>
All Known Implementing Classes:
AssemblyInterceptorComposite
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface AssemblyInterceptor<WP> extends Interceptor<WP,WP>
A AssemblyInterceptor assembles a work piece object whilst the work piece is passed to the next AssemblyInterceptor in the assembly line till all AssemblyInterceptor in the assembly line were invoked.
  • Method Summary

    Modifier and Type
    Method
    Description
    intercept(WP aWorkPiece)
    This method is invoked with a work piece as argument.
  • Method Details

    • intercept

      WP intercept(WP aWorkPiece)
      This method is invoked with a work piece as argument. The method processes the work piece for the work piece to be passed to the succeeding AssemblyInterceptor instance in order to finish the work piece. In case the interceptor is able to finish the the work piece then this is indicated by returning true. In case false is returned, then the work piece is considered not to be finished.
      Specified by:
      intercept in interface Interceptor<WP,WP>
      Parameters:
      aWorkPiece - The work piece which is to be processed by the AssemblyInterceptor instance.
      Returns:
      The work piece as it was processed by the AssemblyInterceptor instance. The returned instance needs not to be the same instance as the one passed as method parameter: This way a decorator or a proxy may be returned, providing additional or tweaked functionality.