public static final class ImmutableHelper.Builder extends Object implements ProcessListener.Helper.Builder
ImmutableHelper.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
| Modifier and Type | Method and Description |
|---|---|
ImmutableHelper |
build()
Builds a new
ImmutableHelper. |
ImmutableHelper.Builder |
from(ProcessListener.Helper instance)
Fill a builder with attribute values from the provided
Helper instance. |
ImmutableHelper.Builder |
onStateChange(ProcessOnStateChange onStateChange)
Initializes the value for the
onStateChange attribute. |
ImmutableHelper.Builder |
onStateChangeFailedWithRetry(ProcessOnStateChangeFailedWithRetry onStateChangeFailedWithRetry)
Initializes the value for the
onStateChangeFailedWithRetry attribute. |
public final ImmutableHelper.Builder from(ProcessListener.Helper instance)
Helper instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final ImmutableHelper.Builder onStateChange(ProcessOnStateChange onStateChange)
onStateChange attribute.
If not set, this attribute will have a default value as returned by the initializer of onStateChange.
onStateChange in interface ProcessListener.Helper.BuilderonStateChange - The value for onStateChangethis builder for use in a chained invocationpublic final ImmutableHelper.Builder onStateChangeFailedWithRetry(ProcessOnStateChangeFailedWithRetry onStateChangeFailedWithRetry)
onStateChangeFailedWithRetry attribute.
If not set, this attribute will have a default value as returned by the initializer of onStateChangeFailedWithRetry.
onStateChangeFailedWithRetry in interface ProcessListener.Helper.BuilderonStateChangeFailedWithRetry - The value for onStateChangeFailedWithRetrythis builder for use in a chained invocationpublic ImmutableHelper build()
ImmutableHelper.build in interface ProcessListener.Helper.BuilderIllegalStateException - if any required attributes are missingCopyright © 2017. All rights reserved.