Class AbstractDetector
- java.lang.Object
-
- org.opennms.netmgt.provision.support.AbstractDetector
-
- All Implemented Interfaces:
ServiceDetector
- Direct Known Subclasses:
AgentBasedSyncAbstractDetector
,AsyncAbstractDetector
,SyncAbstractDetector
public abstract class AbstractDetector extends java.lang.Object implements ServiceDetector
AbstractDetector class.
- Author:
- ranger
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractDetector(java.lang.String serviceName, int port)
Constructor for AbstractDetector.protected
AbstractDetector(java.lang.String serviceName, int port, int timeout, int retries)
Constructor for AbstractDetector.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
dispose()
disposejava.lang.String
getIpMatch()
getIpMatchint
getPort()
getPortint
getRetries()
getRetriesjava.lang.String
getServiceName()
getServiceNameint
getTimeout()
getTimeoutvoid
init()
initprotected abstract void
onInit()
onInitvoid
setIpMatch(java.lang.String ipMatch)
Set the IPLIKE rule for detecting the service.void
setPort(int port)
setPortvoid
setRetries(int retries)
setRetriesvoid
setServiceName(java.lang.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
-
-
-
Constructor Detail
-
AbstractDetector
protected AbstractDetector(java.lang.String serviceName, int port, int timeout, int retries)
Constructor for AbstractDetector.
- Parameters:
serviceName
- aString
object.port
- a int.timeout
- a int.retries
- a int.
-
AbstractDetector
protected AbstractDetector(java.lang.String serviceName, int port)
Constructor for AbstractDetector.
- Parameters:
serviceName
- aString
object.port
- a int.
-
-
Method Detail
-
init
public final void init()
init
- Specified by:
init
in interfaceServiceDetector
-
onInit
protected abstract void onInit()
onInit
-
dispose
public abstract void dispose()
dispose
- Specified by:
dispose
in interfaceServiceDetector
-
setPort
public final void setPort(int port)
setPort
- Specified by:
setPort
in interfaceServiceDetector
- Parameters:
port
- a int.
-
getPort
public final int getPort()
getPort
- Specified by:
getPort
in interfaceServiceDetector
- Returns:
- a int.
-
setRetries
public void setRetries(int retries)
setRetries
- Parameters:
retries
- a int.
-
getRetries
public int getRetries()
getRetries
- Returns:
- a int.
-
setTimeout
public final void setTimeout(int timeout)
setTimeout
- Specified by:
setTimeout
in interfaceServiceDetector
- Parameters:
timeout
- a int.
-
getTimeout
public final int getTimeout()
getTimeout
- Specified by:
getTimeout
in interfaceServiceDetector
- Returns:
- a int.
-
setServiceName
public final void setServiceName(java.lang.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.- Specified by:
setServiceName
in interfaceServiceDetector
- Parameters:
serviceName
- aString
object.
-
getServiceName
public final java.lang.String getServiceName()
getServiceName
- Specified by:
getServiceName
in interfaceServiceDetector
- Returns:
- a
String
object.
-
getIpMatch
public java.lang.String getIpMatch()
getIpMatch
- Specified by:
getIpMatch
in interfaceServiceDetector
- Returns:
- a
String
object.
-
setIpMatch
public void setIpMatch(java.lang.String ipMatch)
Set the IPLIKE rule for detecting the service.- Specified by:
setIpMatch
in interfaceServiceDetector
-
-