B - The type of the concrete builder class deriving from this class.@InterfaceAudience.Private @InterfaceStability.Unstable public abstract class NodeBuilderBaseImpl<B extends NodeBuilderBaseImpl<B>> extends Object
Node. This class doesn't
implement the Builder interface as no type information as to the concrete node to build. The concrete node
builder classes of course should implement Builder.
The concrete builders should provide a fluent API, and to facilitate this, the methods in this base class have to
return the concrete builder. Therefore it is templated on the type of the concrete builder class. Although it cannot
be enforced that the provided generic parameter is the same as the class deriving from this class, it definitely
should be, and the constraint on the type parameter tries to minimize the chance that the class is subclassed
incorrectly.
The properties of the builder can only be set once, an attempt to set them a second time will trigger
an IllegalStateException. The properties that are lists are an exception to this rule, of course multiple
elements can be added / removed.| Modifier and Type | Method and Description |
|---|---|
protected void |
addAsChildToAllParents(Node child) |
B |
clearCredentials()
Removes all
Credentials registered with this builder. |
B |
clearParents()
Removes all parents registered with this builder.
|
protected abstract B |
getRuntimeSelfReference() |
B |
withCredential(Credential credential)
Registers a
Credential that will be the cred of the action built by this builder. |
B |
withErrorHandler(ErrorHandler errorHandler)
Registers an error handler with this builder.
|
B |
withName(String name)
Registers a name that will be the name of the action built by this builder.
|
B |
withoutCredential(Credential credential)
Removes a
Credential registered with this builder. |
B |
withoutErrorHandler()
Removes the currently registered error handler if any.
|
B |
withoutParent(Node parent)
Removes a parent registered with this builder.
|
B |
withParent(Node parent)
Registers an unconditional parent with this builder.
|
B |
withParentDefaultConditional(Node parent)
Registers a conditional parent for which this node is the default transition.
|
B |
withParentWithCondition(Node parent,
String condition)
Registers a conditional parent with this builder.
|
B |
withRetryInterval(Integer retryInterval)
Registers an
Integer that will be the retry-interval of the action built by this builder. |
B |
withRetryMax(Integer retryMax)
Registers an
Integer that will be the retry-max of the action built by this builder. |
B |
withRetryPolicy(String retryPolicy)
Registers a
String that will be the retry-policy of the action built by this builder. |
public B withErrorHandler(ErrorHandler errorHandler)
errorHandler - The error handler to register.public B withoutErrorHandler()
public B withName(String name)
name - The name of the action that will be built.public B withCredential(Credential credential)
Credential that will be the cred of the action built by this builder.credential - The Credential of the action that will be built.public B withoutCredential(Credential credential)
Credential registered with this builder. If the credential is not registered with this builder,
this method does nothing.credential - The Credential to remove.public B clearCredentials()
Credentials registered with this builder.public B withRetryMax(Integer retryMax)
Integer that will be the retry-max of the action built by this builder.retryMax - The retry-max of the action that will be built.public B withRetryInterval(Integer retryInterval)
Integer that will be the retry-interval of the action built by this builder.retryInterval - The retry-interval of the action that will be built.public B withRetryPolicy(String retryPolicy)
String that will be the retry-policy of the action built by this builder.retryPolicy - The retry-policy of the action that will be built.public B withParent(Node parent)
IllegalArgumentException is thrown.parent - The node that will be the parent of the built action.IllegalArgumentException - if the provided node is already registered as a parent.public B withParentWithCondition(Node parent, String condition)
IllegalArgumentException is thrown.parent - The node that will be the parent of the built action.condition - The condition of the parent.IllegalArgumentException - if the provided node is already registered as a parent.public B withParentDefaultConditional(Node parent)
IllegalArgumentException is thrown.
IllegalArgumentException is thrown.parent - The node that will be the parent of the built action.IllegalArgumentException - if the provided node is already registered as a parent.public B withoutParent(Node parent)
parent - The parent to remove.public B clearParents()
protected void addAsChildToAllParents(Node child)
protected abstract B getRuntimeSelfReference()
Copyright © 2021 Apache Software Foundation. All rights reserved.