Package com.xebialabs.xlrelease.utils
Class BaseConditionAwaiter
- java.lang.Object
-
- com.xebialabs.xlrelease.utils.BaseConditionAwaiter
-
- All Implemented Interfaces:
java.lang.AutoCloseable
- Direct Known Subclasses:
TaskCommentsAwaiter
public abstract class BaseConditionAwaiter extends java.lang.Object implements java.lang.AutoCloseable
-
-
Field Summary
Fields Modifier and Type Field Description protected static longDEFAULT_TIMEOUTprotected booleanfailedprotected java.util.concurrent.CountDownLatchlatchprotected longtimeout
-
Constructor Summary
Constructors Constructor Description BaseConditionAwaiter(com.xebialabs.xlrelease.events.XLReleaseEventBus eventBus, long timeout)BaseConditionAwaiter(com.xebialabs.xlrelease.events.XLReleaseEventBus eventBus, long timeout, int latchCount)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidawait()voidclose()protected java.lang.ThrowablegetErrorCause()protected abstract java.lang.StringgetErrorMessage()voidstartListening()
-
-
-
Field Detail
-
DEFAULT_TIMEOUT
protected static final long DEFAULT_TIMEOUT
- See Also:
- Constant Field Values
-
failed
protected boolean failed
-
latch
protected java.util.concurrent.CountDownLatch latch
-
timeout
protected long timeout
-
-
Method Detail
-
startListening
public void startListening()
-
await
public void await() throws java.lang.InterruptedException, java.util.concurrent.TimeoutException- Throws:
java.lang.InterruptedExceptionjava.util.concurrent.TimeoutException
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable
-
getErrorMessage
protected abstract java.lang.String getErrorMessage()
-
getErrorCause
protected java.lang.Throwable getErrorCause()
-
-