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 ServiceDetectorprotected abstract void onInit()
onInit
public abstract void dispose()
dispose
dispose in interface ServiceDetectorpublic final void setPort(int port)
setPort
setPort in interface ServiceDetectorport - a int.public final int getPort()
getPort
getPort in interface ServiceDetectorpublic void setRetries(int retries)
setRetries
retries - a int.public int getRetries()
getRetries
public final void setTimeout(int timeout)
setTimeout
setTimeout in interface ServiceDetectortimeout - a int.public final int getTimeout()
getTimeout
getTimeout in interface ServiceDetectorpublic final void setServiceName(String serviceName)
setServiceName in interface ServiceDetectorserviceName - a String object.public final String getServiceName()
getServiceName
getServiceName in interface ServiceDetectorString object.public String getIpMatch()
getIpMatch
getIpMatch in interface ServiceDetectorString object.public void setIpMatch(String ipMatch)
setIpMatch in interface ServiceDetectorCopyright © 2022. All rights reserved.