public class TcpHealthCheck
extends com.codahale.metrics.health.HealthCheck
| Constructor and Description |
|---|
TcpHealthCheck(String host,
int port) |
TcpHealthCheck(String host,
int port,
Duration connectionTimeout) |
| Modifier and Type | Method and Description |
|---|---|
protected com.codahale.metrics.health.HealthCheck.Result |
check() |
protected boolean |
tcpCheck(String host,
int port)
Performs a health check via TCP against an external dependency.
|
protected com.codahale.metrics.health.HealthCheck.Result check()
throws IOException
check in class com.codahale.metrics.health.HealthCheckIOExceptionprotected boolean tcpCheck(String host, int port) throws IOException
Socket API, but can be overridden to allow for different behavior.host - the host to check.port - the port to check.IOExceptionCopyright © 2011. All rights reserved.