Interface Handler

All Known Implementing Classes:
AbstractHandler, ConcreteHandlerA, ConcreteHandlerB

public interface Handler
The interface for handling requests in the chain.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Handles the request or forwards it to the next handler.
    Sets the next handler in the chain.
  • Method Details

    • handleRequest

      void handleRequest(String request)
      Handles the request or forwards it to the next handler.
      Parameters:
      request - The request to handle.
    • setNext

      Handler setNext(Handler next)
      Sets the next handler in the chain.
      Parameters:
      next - The next handler.
      Returns:
      The current handler for chaining.