public abstract class BaseHandler extends Object implements PortalHandler
Constructor and Description |
---|
BaseHandler(int order) |
Modifier and Type | Method and Description |
---|---|
int |
getOrder() |
PortalResponse |
handle(PortalRequest req) |
protected PortalException |
methodNotAllowed(String message,
Object... args) |
WebSocketEndpoint |
newWebSocketEndpoint(PortalRequest req,
WebSocketConfig config) |
protected abstract PortalHandlerWorker |
newWorker(PortalRequest req) |
protected PortalException |
notFound(String message,
Object... args) |
protected void |
setHandleOptions(boolean handleOptions) |
protected void |
setMethodsAllowed(EnumSet<HttpMethod> methods) |
protected void |
setMethodsAllowed(HttpMethod... methods) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canHandle
protected final void setMethodsAllowed(HttpMethod... methods)
protected final void setHandleOptions(boolean handleOptions)
protected final void setMethodsAllowed(EnumSet<HttpMethod> methods)
public final int getOrder()
getOrder
in interface PortalHandler
public final PortalResponse handle(PortalRequest req) throws Exception
handle
in interface PortalHandler
Exception
protected abstract PortalHandlerWorker newWorker(PortalRequest req) throws Exception
Exception
protected final PortalException notFound(String message, Object... args)
protected final PortalException methodNotAllowed(String message, Object... args)
public WebSocketEndpoint newWebSocketEndpoint(PortalRequest req, WebSocketConfig config) throws Exception
newWebSocketEndpoint
in interface PortalHandler
Exception