Class DetectorFutureImpl
- java.lang.Object
-
- org.opennms.features.apilayer.detectors.DetectorFutureImpl
-
- All Implemented Interfaces:
DetectFuture,DetectResults
public class DetectorFutureImpl extends Object implements DetectFuture
MapsDetectResultsfuture withDetectFuture
-
-
Constructor Summary
Constructors Constructor Description DetectorFutureImpl(CompletableFuture<org.opennms.integration.api.v1.detectors.DetectResults> future)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DetectFutureaddListener(DetectFutureListener<DetectFuture> listener)addListenervoidawaitFor()awaitForvoidawaitForUninterruptibly()awaitForUninterruptiblyThrowablegetException()getExceptionMap<String,String>getServiceAttributes()booleanisDone()isDonebooleanisServiceDetected()voidsetException(Throwable throwable)setExceptionvoidsetServiceDetected(boolean serviceDetected)setServiceDetected
-
-
-
Constructor Detail
-
DetectorFutureImpl
public DetectorFutureImpl(CompletableFuture<org.opennms.integration.api.v1.detectors.DetectResults> future)
-
-
Method Detail
-
getException
public Throwable getException()
Description copied from interface:DetectFuturegetException
- Specified by:
getExceptionin interfaceDetectFuture- Returns:
- a
Throwableobject.
-
setServiceDetected
public void setServiceDetected(boolean serviceDetected)
Description copied from interface:DetectFuturesetServiceDetected
- Specified by:
setServiceDetectedin interfaceDetectFuture- Parameters:
serviceDetected- a boolean.
-
setException
public void setException(Throwable throwable)
Description copied from interface:DetectFuturesetException
- Specified by:
setExceptionin interfaceDetectFuture- Parameters:
throwable- aThrowableobject.
-
awaitFor
public void awaitFor() throws InterruptedExceptionDescription copied from interface:DetectFutureawaitFor
- Specified by:
awaitForin interfaceDetectFuture- Throws:
InterruptedException
-
awaitForUninterruptibly
public void awaitForUninterruptibly()
Description copied from interface:DetectFutureawaitForUninterruptibly
- Specified by:
awaitForUninterruptiblyin interfaceDetectFuture
-
isDone
public boolean isDone()
Description copied from interface:DetectFutureisDone
- Specified by:
isDonein interfaceDetectFuture
-
addListener
public DetectFuture addListener(DetectFutureListener<DetectFuture> listener)
Description copied from interface:DetectFutureaddListener
- Specified by:
addListenerin interfaceDetectFuture
-
isServiceDetected
public boolean isServiceDetected()
- Specified by:
isServiceDetectedin interfaceDetectResults- Returns:
- true if the service was detected, false otherwise
-
getServiceAttributes
public Map<String,String> getServiceAttributes()
- Specified by:
getServiceAttributesin interfaceDetectResults- Returns:
- additional attributes from the detector invocation
-
-