Package Behavioral.ChainOfResponsibility
Interface Handler
- All Known Implementing Classes:
AbstractHandler,ConcreteHandlerA,ConcreteHandlerB
public interface Handler
The interface for handling requests in the chain.
-
Method Summary
Modifier and TypeMethodDescriptionvoidhandleRequest(String request) Handles the request or forwards it to the next handler.Sets the next handler in the chain.
-
Method Details
-
handleRequest
Handles the request or forwards it to the next handler.- Parameters:
request- The request to handle.
-
setNext
Sets the next handler in the chain.- Parameters:
next- The next handler.- Returns:
- The current handler for chaining.
-