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
MapsDetectResults
future 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 DetectFuture
addListener(DetectFutureListener<DetectFuture> listener)
addListenervoid
awaitFor()
awaitForvoid
awaitForUninterruptibly()
awaitForUninterruptiblyjava.lang.Throwable
getException()
getExceptionjava.util.Map<java.lang.String,java.lang.String>
getServiceAttributes()
boolean
isDone()
isDoneboolean
isServiceDetected()
void
setException(java.lang.Throwable throwable)
setExceptionvoid
setServiceDetected(boolean serviceDetected)
setServiceDetected
-
-
-
Method Detail
-
getException
public java.lang.Throwable getException()
Description copied from interface:DetectFuture
getException
- Specified by:
getException
in interfaceDetectFuture
- Returns:
- a
Throwable
object.
-
setServiceDetected
public void setServiceDetected(boolean serviceDetected)
Description copied from interface:DetectFuture
setServiceDetected
- Specified by:
setServiceDetected
in interfaceDetectFuture
- Parameters:
serviceDetected
- a boolean.
-
setException
public void setException(java.lang.Throwable throwable)
Description copied from interface:DetectFuture
setException
- Specified by:
setException
in interfaceDetectFuture
- Parameters:
throwable
- aThrowable
object.
-
awaitFor
public void awaitFor() throws java.lang.InterruptedException
Description copied from interface:DetectFuture
awaitFor
- Specified by:
awaitFor
in interfaceDetectFuture
- Throws:
java.lang.InterruptedException
-
awaitForUninterruptibly
public void awaitForUninterruptibly()
Description copied from interface:DetectFuture
awaitForUninterruptibly
- Specified by:
awaitForUninterruptibly
in interfaceDetectFuture
-
isDone
public boolean isDone()
Description copied from interface:DetectFuture
isDone
- Specified by:
isDone
in interfaceDetectFuture
-
addListener
public DetectFuture addListener(DetectFutureListener<DetectFuture> listener)
Description copied from interface:DetectFuture
addListener
- Specified by:
addListener
in interfaceDetectFuture
-
isServiceDetected
public boolean isServiceDetected()
- Specified by:
isServiceDetected
in interfaceDetectResults
- Returns:
- true if the service was detected, false otherwise
-
getServiceAttributes
public java.util.Map<java.lang.String,java.lang.String> getServiceAttributes()
- Specified by:
getServiceAttributes
in interfaceDetectResults
- Returns:
- additional attributes from the detector invocation
-
-