Package com.yahoo.container.handler
Class VipStatusHandler
- java.lang.Object
-
- com.yahoo.jdisc.AbstractResource
-
- com.yahoo.jdisc.handler.AbstractRequestHandler
-
- com.yahoo.container.jdisc.ThreadedRequestHandler
-
- com.yahoo.container.jdisc.ThreadedHttpRequestHandler
-
- com.yahoo.container.handler.VipStatusHandler
-
- All Implemented Interfaces:
com.yahoo.jdisc.handler.RequestHandler
,com.yahoo.jdisc.SharedResource
public final class VipStatusHandler extends ThreadedHttpRequestHandler
Transmit status to VIP from file or memory. Bind this to "http://*/status.html" to serve VIP status requests.- Author:
- Steinar Knutsen, bratseth
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.yahoo.container.jdisc.ThreadedHttpRequestHandler
ThreadedHttpRequestHandler.LazyContentChannel
-
-
Field Summary
-
Fields inherited from class com.yahoo.container.jdisc.ThreadedHttpRequestHandler
CONTENT_TYPE, log
-
Fields inherited from class com.yahoo.container.jdisc.ThreadedRequestHandler
metric
-
-
Constructor Summary
Constructors Constructor Description VipStatusHandler(com.yahoo.container.core.VipStatusConfig vipConfig, com.yahoo.jdisc.Metric metric, VipStatus vipStatus)
Create this with a dedicated thread pool to avoid returning an error to VIPs when the regular thread pool is out of capacity.VipStatusHandler(java.util.concurrent.Executor executor, com.yahoo.container.core.VipStatusConfig vipConfig, com.yahoo.jdisc.Metric metric)
VipStatusHandler(java.util.concurrent.Executor executor, com.yahoo.container.core.VipStatusConfig vipConfig, com.yahoo.jdisc.Metric metric, VipStatus vipStatus)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpResponse
handle(HttpRequest request)
Override this to implement a synchronous style handler.-
Methods inherited from class com.yahoo.container.jdisc.ThreadedHttpRequestHandler
addDateHeader, asHttpRequest, createLoggingCompletionHandler, handle, handleRequest
-
Methods inherited from class com.yahoo.container.jdisc.ThreadedRequestHandler
executor, getRequestType, getTimeout, handleRequest, writeErrorResponseOnOverload
-
Methods inherited from class com.yahoo.jdisc.AbstractResource
currentState, destroy, refer, release, retainCount
-
-
-
-
Constructor Detail
-
VipStatusHandler
@Inject public VipStatusHandler(com.yahoo.container.core.VipStatusConfig vipConfig, com.yahoo.jdisc.Metric metric, VipStatus vipStatus)
Create this with a dedicated thread pool to avoid returning an error to VIPs when the regular thread pool is out of capacity. This is the default behavior.
-
VipStatusHandler
public VipStatusHandler(java.util.concurrent.Executor executor, com.yahoo.container.core.VipStatusConfig vipConfig, com.yahoo.jdisc.Metric metric)
-
VipStatusHandler
public VipStatusHandler(java.util.concurrent.Executor executor, com.yahoo.container.core.VipStatusConfig vipConfig, com.yahoo.jdisc.Metric metric, VipStatus vipStatus)
-
-
Method Detail
-
handle
public HttpResponse handle(HttpRequest request)
Description copied from class:ThreadedHttpRequestHandler
Override this to implement a synchronous style handler.- Specified by:
handle
in classThreadedHttpRequestHandler
- Parameters:
request
- incoming HTTP request- Returns:
- a valid HTTP response for presentation to the user
-
-