public class Block
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected Body |
bodyMethod
Lambda representing code to be executed as the contents of the
body() method. |
protected Enter |
enterMethod
Lambda representing code to be executed as the contents of the
enter() method. |
protected Fini |
finiMethod
Lambda representing code to be executed as the contents of the
fini() method. |
protected Init |
initMethod
Lambda representing code to be executed as the contents of the
init() method. |
protected Pre |
preMethod
Lambda representing code to be executed as the contents of the
pre() method. |
Constructor and Description |
---|
Block()
Default constructor, equivalent to an empty block (one with no code).
|
Block(Body body)
Constructor.
|
Block(Body body,
Fini fini)
Constructor.
|
Block(Enter enter)
Constructor.
|
Block(Enter enter,
Body body)
Constructor.
|
Block(Enter enter,
Body body,
Fini fini)
Constructor.
|
Block(Enter enter,
Fini fini)
Constructor.
|
Block(Fini fini)
Constructor.
|
Block(Init init)
Constructor.
|
Block(Init init,
Body body)
Constructor.
|
Block(Init init,
Body body,
Fini fini)
Constructor.
|
Block(Init init,
Enter enter)
Constructor.
|
Block(Init init,
Enter enter,
Body body)
Constructor.
|
Block(Init init,
Enter enter,
Body body,
Fini fini)
Constructor.
|
Block(Init init,
Enter enter,
Fini fini)
Constructor.
|
Block(Init init,
Fini fini)
Constructor.
|
Block(Pre pre)
Constructor.
|
Block(Pre pre,
Body body)
Constructor.
|
Block(Pre pre,
Body body,
Fini fini)
Constructor.
|
Block(Pre pre,
Enter enter)
Constructor.
|
Block(Pre pre,
Enter enter,
Body body)
Constructor.
|
Block(Pre pre,
Enter enter,
Body body,
Fini fini)
Constructor.
|
Block(Pre pre,
Enter enter,
Fini fini)
Constructor.
|
Block(Pre pre,
Fini fini)
Constructor.
|
Block(Pre pre,
Init init)
Constructor.
|
Block(Pre pre,
Init init,
Body body)
Constructor.
|
Block(Pre pre,
Init init,
Body body,
Fini fini)
Constructor.
|
Block(Pre pre,
Init init,
Enter enter)
Constructor.
|
Block(Pre pre,
Init init,
Enter enter,
Body body)
Constructor.
|
Block(Pre pre,
Init init,
Enter enter,
Body body,
Fini fini)
Constructor.
|
Block(Pre pre,
Init init,
Fini fini)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
body()
This implements the delegated code to be executed as part of this instance.
|
void |
enter()
Provides a callback to execute user-defined logic at the top of the block body but before
the block body is executed.
|
void |
fini()
Provides a callback that is guaranteed to be called AFTER every block executes and
BEFORE the body can iterated, retried or exited.
|
void |
init()
Provides a callback to initialize state ONCE before the body gets executed.
|
void |
pre()
Provides a callback to initialize state ONCE before the body gets executed.
|
protected Pre preMethod
pre()
method.protected Init initMethod
init()
method.protected Enter enterMethod
enter()
method.protected Body bodyMethod
body()
method.public Block()
public Block(Body body)
body
- The code to be executed as the block's body()
method.public Block(Pre pre)
pre
- The code to be executed as the block's pre()
method.public Block(Init init)
init
- The code to be executed as the block's init()
method.public Block(Enter enter)
enter
- The code to be executed as the block's enter()
method.public Block(Fini fini)
fini
- The code to be executed as the block's fini()
method.public Block(Pre pre, Init init, Enter enter, Body body, Fini fini)
pre
- The code to be executed as the block's pre()
method.init
- The code to be executed as the block's init()
method.enter
- The code to be executed as the block's enter()
method.body
- The code to be executed as the block's body()
method.fini
- The code to be executed as the block's fini()
method.public void pre()
public void init()
public void enter()
public void fini()
public void body()