Package Behavioral.ChainOfResponsibility
Class AbstractHandler
java.lang.Object
Behavioral.ChainOfResponsibility.AbstractHandler
- All Implemented Interfaces:
Handler
- Direct Known Subclasses:
ConcreteHandlerA,ConcreteHandlerB
Abstract base class that implements the chaining mechanism.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleRequest(String request) Handles the request or forwards it to the next handler.Sets the next handler in the chain.
-
Constructor Details
-
AbstractHandler
public AbstractHandler()Default constructor for AbstractHandler.
-
-
Method Details
-
setNext
Description copied from interface:HandlerSets the next handler in the chain. -
handleRequest
Description copied from interface:HandlerHandles the request or forwards it to the next handler.- Specified by:
handleRequestin interfaceHandler- Parameters:
request- The request to handle.
-