public final class AttemptResults extends Object
AttemptResult.| 构造器和说明 |
|---|
AttemptResults() |
| 限定符和类型 | 方法和说明 |
|---|---|
static <V> AttemptResult<V> |
breakFor(String message)
Return an
AttemptResult that will break polling and throw an UserBreakException. |
static <V> AttemptResult<V> |
breakFor(Throwable cause)
Return an
AttemptResult that will break polling and throw an UserBreakException. |
static <V> AttemptResult<V> |
continueFor(Throwable cause) |
static <V> AttemptResult<V> |
finishWith(V result)
Return an
AttemptResult that will end polling with given result. |
static <V> AttemptResult<V> |
justContinue()
Return an
AttemptResult that makes polling continue. |
static AttemptResult<Void> |
justFinish()
Return an
AttemptResult that will end polling without result. |
public static AttemptResult<Void> justFinish()
AttemptResult that will end polling without result.public static <V> AttemptResult<V> finishWith(V result)
AttemptResult that will end polling with given result.V - return type of pollerresult - result of a successful attemptpublic static <V> AttemptResult<V> breakFor(String message)
AttemptResult that will break polling and throw an UserBreakException.V - return type of pollermessage - message about reasonpublic static <V> AttemptResult<V> breakFor(Throwable cause)
AttemptResult that will break polling and throw an UserBreakException.V - return type of pollercause - reason of user breakpublic static <V> AttemptResult<V> justContinue()
AttemptResult that makes polling continue.V - return type of pollerpublic static <V> AttemptResult<V> continueFor(Throwable cause)
Copyright © 2019. All rights reserved.