Class DetectorFutureImpl
- java.lang.Object
-
- org.opennms.features.apilayer.detectors.DetectorFutureImpl
-
- All Implemented Interfaces:
DetectFuture,DetectResults
public class DetectorFutureImpl extends java.lang.Object implements DetectFuture
MapsDetectResultsfuture withDetectFuture
-
-
Constructor Summary
Constructors Constructor Description DetectorFutureImpl(java.util.concurrent.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()awaitForUninterruptiblyjava.lang.ThrowablegetException()getExceptionjava.util.Map<java.lang.String,java.lang.String>getServiceAttributes()booleanisDone()isDonebooleanisServiceDetected()voidsetException(java.lang.Throwable throwable)setExceptionvoidsetServiceDetected(boolean serviceDetected)setServiceDetected
-
-
-
Method Detail
-
getException
public java.lang.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(java.lang.Throwable throwable)
Description copied from interface:DetectFuturesetException
- Specified by:
setExceptionin interfaceDetectFuture- Parameters:
throwable- aThrowableobject.
-
awaitFor
public void awaitFor() throws java.lang.InterruptedExceptionDescription copied from interface:DetectFutureawaitFor
- Specified by:
awaitForin interfaceDetectFuture- Throws:
java.lang.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 java.util.Map<java.lang.String,java.lang.String> getServiceAttributes()
- Specified by:
getServiceAttributesin interfaceDetectResults- Returns:
- additional attributes from the detector invocation
-
-