Class AsyncBasicDetector<Request,Response>
- java.lang.Object
-
- org.opennms.netmgt.provision.support.AbstractDetector
-
- org.opennms.netmgt.provision.support.AsyncAbstractDetector
-
- org.opennms.netmgt.provision.support.AsyncBasicDetector<Request,Response>
-
- All Implemented Interfaces:
AsyncServiceDetector
,ServiceDetector
- Direct Known Subclasses:
AsyncBasicDetectorMinaImpl
,AsyncBasicDetectorNettyImpl
public abstract class AsyncBasicDetector<Request,Response> extends AsyncAbstractDetector
Abstract AsyncBasicDetector class.
- Version:
- $Id: $
- Author:
- Donald Desloge
-
-
Constructor Summary
Constructors Constructor Description AsyncBasicDetector(String serviceName, int port)
Constructor for AsyncBasicDetector.AsyncBasicDetector(String serviceName, int port, int timeout, int retries)
Constructor for AsyncBasicDetector.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
expectBanner(ResponseValidator<Response> bannerValidator)
expectBannerprotected ResponseValidator<Response>
find(String regex)
findprotected AsyncClientConversation<Request,Response>
getConversation()
getConversationint
getIdleTime()
getIdleTimeboolean
isUseSSLFilter()
isUseSSLFilterprotected void
send(Request request, ResponseValidator<Response> responseValidator)
sendvoid
setIdleTime(int idleTime)
Set the time limit in milliseconds that the connection can wait before transitioning to theIdleStatus.BOTH_IDLE
,IdleStatus.READER_IDLE
, orIdleStatus.WRITER_IDLE
states.void
setUseSSLFilter(boolean useSSLFilter)
Setter for the fielduseSSLFilter
.protected ResponseValidator<Response>
startsWith(String prefix)
startsWith-
Methods inherited from class org.opennms.netmgt.provision.support.AsyncAbstractDetector
detect, isServiceDetected
-
Methods inherited from class org.opennms.netmgt.provision.support.AbstractDetector
dispose, 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
dispose, getIpMatch, getPort, getServiceName, getTimeout, init, setIpMatch, setPort, setServiceName, setTimeout
-
-
-
-
Method Detail
-
expectBanner
protected void expectBanner(ResponseValidator<Response> bannerValidator)
expectBanner
- Parameters:
bannerValidator
- aorg.opennms.netmgt.provision.support.AsyncClientConversation.ResponseValidator
object.
-
send
protected void send(Request request, ResponseValidator<Response> responseValidator)
send
- Parameters:
request
- a Request object.responseValidator
- aorg.opennms.netmgt.provision.support.AsyncClientConversation.ResponseValidator
object.
-
setIdleTime
public final void setIdleTime(int idleTime)
Set the time limit in milliseconds that the connection can wait before transitioning to theIdleStatus.BOTH_IDLE
,IdleStatus.READER_IDLE
, orIdleStatus.WRITER_IDLE
states.- Parameters:
idleTime
- a int.
-
getIdleTime
public final int getIdleTime()
getIdleTime
- Returns:
- a int.
-
getConversation
protected final AsyncClientConversation<Request,Response> getConversation()
getConversation
- Returns:
- a
AsyncClientConversation
object.
-
startsWith
protected ResponseValidator<Response> startsWith(String prefix)
startsWith
- Parameters:
prefix
- aString
object.- Returns:
- a
org.opennms.netmgt.provision.support.AsyncClientConversation.ResponseValidator
object.
-
find
protected ResponseValidator<Response> find(String regex)
find
- Parameters:
regex
- aString
object.- Returns:
- a
org.opennms.netmgt.provision.support.AsyncClientConversation.ResponseValidator
object.
-
setUseSSLFilter
public final void setUseSSLFilter(boolean useSSLFilter)
Setter for the field
useSSLFilter
.- Parameters:
useSSLFilter
- a boolean.
-
isUseSSLFilter
public final boolean isUseSSLFilter()
isUseSSLFilter
- Returns:
- a boolean.
-
-