public class ManagementHttpRequestProcessor extends Object implements org.jboss.as.protocol.mgmt.support.ManagementChannelShutdownHandle
HttpShutdownService and the ManagementRequestTracker,
which prevent the http server from closing the connections before all active operations completed.| Modifier and Type | Class and Description |
|---|---|
static interface |
ManagementHttpRequestProcessor.ShutdownListener |
| Constructor and Description |
|---|
ManagementHttpRequestProcessor() |
| Modifier and Type | Method and Description |
|---|---|
void |
addShutdownListener(ManagementHttpRequestProcessor.ShutdownListener listener)
Add a shutdown listener, which gets called when all requests completed on shutdown.
|
boolean |
awaitCompletion(long timeout,
TimeUnit unit) |
protected boolean |
beginRequest()
This gets called when we receive a new http mgmt request and returns whether
the request can process or should return a
503 response when the server
is about to shutdown. |
protected void |
endRequest()
End a request and call the
handleCompleted() if the server is
shutdown and there are no more active requests. |
protected void |
handleCompleted()
Notify all shutdown listeners that the shutdown completed.
|
void |
shutdown() |
void |
shutdownNow() |
public void shutdown()
shutdown in interface org.jboss.as.protocol.mgmt.support.ManagementChannelShutdownHandlepublic void shutdownNow()
shutdownNow in interface org.jboss.as.protocol.mgmt.support.ManagementChannelShutdownHandlepublic boolean awaitCompletion(long timeout,
TimeUnit unit)
throws InterruptedException
awaitCompletion in interface org.jboss.as.protocol.mgmt.support.ManagementChannelShutdownHandleInterruptedExceptionpublic void addShutdownListener(ManagementHttpRequestProcessor.ShutdownListener listener)
listener - the shutdown listenerprotected void handleCompleted()
protected boolean beginRequest()
503 response when the server
is about to shutdown.true if the request can be processed; false if the server is about to shut downprotected void endRequest()
handleCompleted() if the server is
shutdown and there are no more active requests.Copyright © 2021 JBoss by Red Hat. All rights reserved.