@API(status=EXPERIMENTAL,
since="1.6")
public class SelectorResolutionResult
extends java.lang.Object
SelectorResolutionResult encapsulates the result of resolving a
DiscoverySelector by a TestEngine.
A SelectorResolutionResult consists of a mandatory
Status and an optional Throwable.
| Modifier and Type | Class and Description |
|---|---|
static class |
SelectorResolutionResult.Status
Status of resolving a
DiscoverySelector. |
| Modifier and Type | Field and Description |
|---|---|
private static SelectorResolutionResult |
RESOLVED_RESULT |
private SelectorResolutionResult.Status |
status |
private java.lang.Throwable |
throwable |
private static SelectorResolutionResult |
UNRESOLVED_RESULT |
| Modifier | Constructor and Description |
|---|---|
private |
SelectorResolutionResult(SelectorResolutionResult.Status status,
java.lang.Throwable throwable) |
| Modifier and Type | Method and Description |
|---|---|
static SelectorResolutionResult |
failed(java.lang.Throwable throwable)
Create a
SelectorResolutionResult for a failed
selector resolution. |
SelectorResolutionResult.Status |
getStatus()
Get the status of this result.
|
java.util.Optional<java.lang.Throwable> |
getThrowable()
Get the throwable that caused this result, if available.
|
static SelectorResolutionResult |
resolved()
Create a
SelectorResolutionResult for a resolved
selector. |
java.lang.String |
toString() |
static SelectorResolutionResult |
unresolved()
Create a
SelectorResolutionResult for an unresolved
selector. |
private static final SelectorResolutionResult RESOLVED_RESULT
private static final SelectorResolutionResult UNRESOLVED_RESULT
private final SelectorResolutionResult.Status status
private final java.lang.Throwable throwable
private SelectorResolutionResult(SelectorResolutionResult.Status status, java.lang.Throwable throwable)
public static SelectorResolutionResult resolved()
SelectorResolutionResult for a resolved
selector.SelectorResolutionResult; never nullpublic static SelectorResolutionResult unresolved()
SelectorResolutionResult for an unresolved
selector.SelectorResolutionResult; never nullpublic static SelectorResolutionResult failed(java.lang.Throwable throwable)
SelectorResolutionResult for a failed
selector resolution.SelectorResolutionResult; never nullpublic SelectorResolutionResult.Status getStatus()
nullpublic java.util.Optional<java.lang.Throwable> getThrowable()
Optional containing the throwable; never null
but potentially emptypublic java.lang.String toString()
toString in class java.lang.Object