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 Object implements ServiceDetector
AbstractDetector class.
- Author:
- ranger
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractDetector(String serviceName, int port)Constructor for AbstractDetector.protectedAbstractDetector(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 voiddispose()disposeStringgetIpMatch()getIpMatchintgetPort()getPortintgetRetries()getRetriesStringgetServiceName()getServiceNameintgetTimeout()getTimeoutvoidinit()initprotected abstract voidonInit()onInitvoidsetIpMatch(String ipMatch)Set the IPLIKE rule for detecting the service.voidsetPort(int port)setPortvoidsetRetries(int retries)setRetriesvoidsetServiceName(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.voidsetTimeout(int timeout)setTimeout
-
-
-
Method Detail
-
init
public final void init()
init
- Specified by:
initin interfaceServiceDetector
-
onInit
protected abstract void onInit()
onInit
-
dispose
public abstract void dispose()
dispose
- Specified by:
disposein interfaceServiceDetector
-
setPort
public final void setPort(int port)
setPort
- Specified by:
setPortin interfaceServiceDetector- Parameters:
port- a int.
-
getPort
public final int getPort()
getPort
- Specified by:
getPortin 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:
setTimeoutin interfaceServiceDetector- Parameters:
timeout- a int.
-
getTimeout
public final int getTimeout()
getTimeout
- Specified by:
getTimeoutin interfaceServiceDetector- Returns:
- a int.
-
setServiceName
public final 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.- Specified by:
setServiceNamein interfaceServiceDetector- Parameters:
serviceName- aStringobject.
-
getServiceName
public final String getServiceName()
getServiceName
- Specified by:
getServiceNamein interfaceServiceDetector- Returns:
- a
Stringobject.
-
getIpMatch
public String getIpMatch()
getIpMatch
- Specified by:
getIpMatchin interfaceServiceDetector- Returns:
- a
Stringobject.
-
setIpMatch
public void setIpMatch(String ipMatch)
Set the IPLIKE rule for detecting the service.- Specified by:
setIpMatchin interfaceServiceDetector
-
-