public abstract class AbstractDetector extends Object implements ServiceDetector
AbstractDetector class.
Modifier | Constructor and Description |
---|---|
protected |
AbstractDetector(String serviceName,
int port)
Constructor for AbstractDetector.
|
protected |
AbstractDetector(String serviceName,
int port,
int timeout,
int retries)
Constructor for AbstractDetector.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
dispose()
dispose
|
String |
getIpMatch()
getIpMatch
|
int |
getPort()
getPort
|
int |
getRetries()
getRetries
|
String |
getServiceName()
getServiceName
|
int |
getTimeout()
getTimeout
|
void |
init()
init
|
protected abstract void |
onInit()
onInit
|
void |
setIpMatch(String ipMatch)
Set the IPLIKE rule for detecting the service.
|
void |
setPort(int port)
setPort
|
void |
setRetries(int retries)
setRetries
|
void |
setServiceName(String serviceName)
Service name is mutable so that we can create new instances of each implementation
and define a new service detector using the underlying protocol.
|
void |
setTimeout(int timeout)
setTimeout
|
protected AbstractDetector(String serviceName, int port, int timeout, int retries)
Constructor for AbstractDetector.
serviceName
- a String
object.port
- a int.timeout
- a int.retries
- a int.public final void init()
init
init
in interface ServiceDetector
protected abstract void onInit()
onInit
public abstract void dispose()
dispose
dispose
in interface ServiceDetector
public final void setPort(int port)
setPort
setPort
in interface ServiceDetector
port
- a int.public final int getPort()
getPort
getPort
in interface ServiceDetector
public void setRetries(int retries)
setRetries
retries
- a int.public int getRetries()
getRetries
public final void setTimeout(int timeout)
setTimeout
setTimeout
in interface ServiceDetector
timeout
- a int.public final int getTimeout()
getTimeout
getTimeout
in interface ServiceDetector
public final void setServiceName(String serviceName)
setServiceName
in interface ServiceDetector
serviceName
- a String
object.public final String getServiceName()
getServiceName
getServiceName
in interface ServiceDetector
String
object.public String getIpMatch()
getIpMatch
getIpMatch
in interface ServiceDetector
String
object.public void setIpMatch(String ipMatch)
setIpMatch
in interface ServiceDetector
Copyright © 2021. All rights reserved.