Class DetectorFutureImpl
- java.lang.Object
-
- org.opennms.features.apilayer.detectors.DetectorFutureImpl
-
- All Implemented Interfaces:
DetectFuture
,DetectResults
public class DetectorFutureImpl extends Object implements DetectFuture
MapsDetectResults
future 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 DetectFuture
addListener(DetectFutureListener<DetectFuture> listener)
addListenervoid
awaitFor()
awaitForvoid
awaitForUninterruptibly()
awaitForUninterruptiblyThrowable
getException()
getExceptionMap<String,String>
getServiceAttributes()
boolean
isDone()
isDoneboolean
isServiceDetected()
void
setException(Throwable throwable)
setExceptionvoid
setServiceDetected(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: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(Throwable throwable)
Description copied from interface:DetectFuture
setException
- Specified by:
setException
in interfaceDetectFuture
- Parameters:
throwable
- aThrowable
object.
-
awaitFor
public void awaitFor() throws InterruptedException
Description copied from interface:DetectFuture
awaitFor
- Specified by:
awaitFor
in interfaceDetectFuture
- Throws:
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 Map<String,String> getServiceAttributes()
- Specified by:
getServiceAttributes
in interfaceDetectResults
- Returns:
- additional attributes from the detector invocation
-
-