package chainOfResponsibility; public class ExtendedHandler extends Handler { @Override public void HandleRequest(Request req) { switch (req.GetKind()) { case Request.PREVIEW: HandlerPreview(req); break; default: super.HandleHelp(req); break; } } protected void HandlerPreview(Request req) { // ... }}