Class BasicDetector<Request,Response>
- java.lang.Object
-
- org.opennms.netmgt.provision.support.AbstractDetector
-
- org.opennms.netmgt.provision.support.SyncAbstractDetector
-
- org.opennms.netmgt.provision.support.BasicDetector<Request,Response>
-
- All Implemented Interfaces:
ServiceDetector
,SyncServiceDetector
- Direct Known Subclasses:
AbstractJdbcDetector
,BSFDetector
,DhcpDetector
,DnsDetector
,GpDetector
,LineOrientedDetector
,LoopDetector
,MSExchangeDetector
,MultilineOrientedDetector
,NrpeDetector
,NsclientDetector
,NtpDetector
,RadiusAuthDetector
,SmbDetector
,SshDetector
,TrivialTimeDetector
,WebDetector
public abstract class BasicDetector<Request,Response> extends SyncAbstractDetector
Abstract BasicDetector class.
- Version:
- $Id: $
- Author:
- Donald Desloge
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BasicDetector(java.lang.String serviceName, int port)
Constructor for BasicDetector.protected
BasicDetector(java.lang.String serviceName, int port, int timeout, int retries)
Constructor for BasicDetector.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
dispose()
disposeprotected void
expectBanner(ResponseValidator<Response> bannerValidator)
expectBannerprotected abstract Client<Request,Response>
getClient()
getClientprotected ClientConversation<Request,Response>
getConversation()
getConversationboolean
isServiceDetected(java.net.InetAddress address)
isServiceDetectedprotected void
send(RequestBuilder<Request> requestBuilder, ResponseValidator<Response> responseValidator)
sendprotected void
send(Request request, ResponseValidator<Response> responseValidator)
send-
Methods inherited from class org.opennms.netmgt.provision.support.SyncAbstractDetector
detect
-
Methods inherited from class org.opennms.netmgt.provision.support.AbstractDetector
getIpMatch, getPort, getRetries, getServiceName, getTimeout, init, onInit, setIpMatch, setPort, setRetries, setServiceName, setTimeout
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opennms.netmgt.provision.ServiceDetector
getIpMatch, getPort, getServiceName, getTimeout, init, setIpMatch, setPort, setServiceName, setTimeout
-
-
-
-
Constructor Detail
-
BasicDetector
protected BasicDetector(java.lang.String serviceName, int port, int timeout, int retries)
Constructor for BasicDetector.
- Type Parameters:
Request
- a Request object.Response
- a Response object.- Parameters:
serviceName
- aString
object.port
- a int.timeout
- a int.retries
- a int.
-
BasicDetector
protected BasicDetector(java.lang.String serviceName, int port)
Constructor for BasicDetector.
- Parameters:
serviceName
- aString
object.port
- a int.
-
-
Method Detail
-
isServiceDetected
public final boolean isServiceDetected(java.net.InetAddress address)
isServiceDetected
- Specified by:
isServiceDetected
in classSyncAbstractDetector
- Parameters:
address
- aInetAddress
object.- Returns:
- a boolean.
-
dispose
public void dispose()
dispose
- Specified by:
dispose
in interfaceServiceDetector
- Specified by:
dispose
in classAbstractDetector
-
getClient
protected abstract Client<Request,Response> getClient()
getClient
- Returns:
- a
Client
object.
-
expectBanner
protected final void expectBanner(ResponseValidator<Response> bannerValidator)
expectBanner
- Parameters:
bannerValidator
- aResponseValidator
object.
-
send
protected final void send(RequestBuilder<Request> requestBuilder, ResponseValidator<Response> responseValidator)
send
- Parameters:
requestBuilder
- aRequestBuilder
object.responseValidator
- aResponseValidator
object.
-
send
protected void send(Request request, ResponseValidator<Response> responseValidator)
send
- Parameters:
request
- a Request object.responseValidator
- aResponseValidator
object.
-
getConversation
protected final ClientConversation<Request,Response> getConversation()
getConversation
- Returns:
- a
ClientConversation
object.
-
-