Top Inners Methods
org.glassfish.pfl.basic.fsm

public Interface Guard

Known Direct Implementers
org.glassfish.pfl.basic.fsm.Guard.Base
Imports
org.glassfish.pfl.basic.func.BinaryFunction, .BinaryPredicate

Author
Ken Cavanaugh

Nested and Inner Type Summary

Modifier and TypeClass and Description
public abstract static class
public static enum

Method Summary

Modifier and TypeMethod and Description
public Guard.Result
evaluate(FSM
is the state machine causing this action.
fsm
,
Input
is the input that caused the transition.
in
)

Called by the state engine to determine whether a transition is enabled, deferred, or disabled.

Method Detail

evaluateback to summary
public Guard.Result evaluate(FSM fsm, Input in)

Called by the state engine to determine whether a transition is enabled, deferred, or disabled. The result is interpreted as follows:

  • ENABLED if the transition is ready to proceed
  • DISABLED if the transition is not ready to proceed
  • DEFERED if the action associated with the transition is to be deferred. This means that the input will not be acted upon, but rather it will be saved for later execution. Typically this is implemented using a CondVar wait, and the blocked thread represents the deferred input. The deferred input is retried when the thread runs again.
Parameters
fsm:FSM

is the state machine causing this action.

in:Input

is the input that caused the transition.

org.glassfish.pfl.basic.fsm back to summary

public abstract Class Guard.Base

extends NameBase
implements Guard
Class Inheritance
All Implemented Interfaces
org.glassfish.pfl.basic.fsm.Guard

Nested and Inner Type Summary

Modifier and TypeClass and Description
public abstract static class
Guard.Base.IntFunc

References Deprecated BinaryFunction is deprecated or references (maybe indirectly) at least one deprecated element.
public abstract static class
Guard.Base.Predicate

References Deprecated BinaryPredicate is deprecated or references (maybe indirectly) at least one deprecated element.
public abstract static class

Constructor Summary

AccessConstructor and Description
public
Base(String name)

Method Summary

Modifier and TypeMethod and Description
public static Guard.Base.Predicate
and(final Guard.Base.Predicate arg1, final Guard.Base.Predicate arg2)
References Deprecated Guard.Base.Predicate is deprecated or references (maybe indirectly) at least one deprecated element.

public static Guard.Base.IntFunc
constant(final int val)
References Deprecated Guard.Base.IntFunc is deprecated or references (maybe indirectly) at least one deprecated element.

public static Guard.Base.Predicate
eq(final Guard.Base.IntFunc arg1, final Guard.Base.IntFunc arg2)
References Deprecated Guard.Base.IntFunc and Guard.Base.Predicate are deprecated or reference (maybe indirectly) at least one deprecated element.

public static Guard.Base.Predicate
ge(final Guard.Base.IntFunc arg1, final Guard.Base.IntFunc arg2)
References Deprecated Guard.Base.IntFunc and Guard.Base.Predicate are deprecated or reference (maybe indirectly) at least one deprecated element.

public static Guard.Base.Predicate
gt(final Guard.Base.IntFunc arg1, final Guard.Base.IntFunc arg2)
References Deprecated Guard.Base.IntFunc and Guard.Base.Predicate are deprecated or reference (maybe indirectly) at least one deprecated element.

public static Guard.Base.Predicate
le(final Guard.Base.IntFunc arg1, final Guard.Base.IntFunc arg2)
References Deprecated Guard.Base.IntFunc and Guard.Base.Predicate are deprecated or reference (maybe indirectly) at least one deprecated element.

public static Guard.Base.Predicate
lt(final Guard.Base.IntFunc arg1, final Guard.Base.IntFunc arg2)
References Deprecated Guard.Base.IntFunc and Guard.Base.Predicate are deprecated or reference (maybe indirectly) at least one deprecated element.

public static Guard
makeGuard(final Guard.Base.Predicate pred)
References Deprecated Guard.Base.Predicate is deprecated or references (maybe indirectly) at least one deprecated element.

public static Guard.Base.Predicate
ne(final Guard.Base.IntFunc arg1, final Guard.Base.IntFunc arg2)
References Deprecated Guard.Base.IntFunc and Guard.Base.Predicate are deprecated or reference (maybe indirectly) at least one deprecated element.

public static Guard.Base.Predicate
not(final Guard.Base.Predicate pred)
References Deprecated Guard.Base.Predicate is deprecated or references (maybe indirectly) at least one deprecated element.

public static Guard.Base.Predicate
or(final Guard.Base.Predicate arg1, final Guard.Base.Predicate arg2)
References Deprecated Guard.Base.Predicate is deprecated or references (maybe indirectly) at least one deprecated element.

Inherited from org.glassfish.pfl.basic.fsm.NameBase:
getNametoString

Constructor Detail

Baseback to summary
public Base(String name)

Method Detail

andback to summary
public static Guard.Base.Predicate and(final Guard.Base.Predicate arg1, final Guard.Base.Predicate arg2)

References Deprecated

Guard.Base.Predicate is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

constantback to summary
public static Guard.Base.IntFunc constant(final int val)

References Deprecated

Guard.Base.IntFunc is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

eqback to summary
public static Guard.Base.Predicate eq(final Guard.Base.IntFunc arg1, final Guard.Base.IntFunc arg2)

References Deprecated

Guard.Base.IntFunc and Guard.Base.Predicate are deprecated or reference (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

geback to summary
public static Guard.Base.Predicate ge(final Guard.Base.IntFunc arg1, final Guard.Base.IntFunc arg2)

References Deprecated

Guard.Base.IntFunc and Guard.Base.Predicate are deprecated or reference (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

gtback to summary
public static Guard.Base.Predicate gt(final Guard.Base.IntFunc arg1, final Guard.Base.IntFunc arg2)

References Deprecated

Guard.Base.IntFunc and Guard.Base.Predicate are deprecated or reference (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

leback to summary
public static Guard.Base.Predicate le(final Guard.Base.IntFunc arg1, final Guard.Base.IntFunc arg2)

References Deprecated

Guard.Base.IntFunc and Guard.Base.Predicate are deprecated or reference (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

ltback to summary
public static Guard.Base.Predicate lt(final Guard.Base.IntFunc arg1, final Guard.Base.IntFunc arg2)

References Deprecated

Guard.Base.IntFunc and Guard.Base.Predicate are deprecated or reference (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

makeGuardback to summary
public static Guard makeGuard(final Guard.Base.Predicate pred)

References Deprecated

Guard.Base.Predicate is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

neback to summary
public static Guard.Base.Predicate ne(final Guard.Base.IntFunc arg1, final Guard.Base.IntFunc arg2)

References Deprecated

Guard.Base.IntFunc and Guard.Base.Predicate are deprecated or reference (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

notback to summary
public static Guard.Base.Predicate not(final Guard.Base.Predicate pred)

References Deprecated

Guard.Base.Predicate is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

orback to summary
public static Guard.Base.Predicate or(final Guard.Base.Predicate arg1, final Guard.Base.Predicate arg2)

References Deprecated

Guard.Base.Predicate is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

org.glassfish.pfl.basic.fsm back to summary

public abstract Class Guard.Base.IntFunc

extends SimpleName
implements BinaryFunction<FSM, Input, Integer>
Class Inheritance
All Implemented Interfaces
org.glassfish.pfl.basic.func.BinaryFunction, java.util.function.BiFunction

References Deprecated

BinaryFunction is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Constructor Summary

AccessConstructor and Description
public

Constructor Detail

IntFuncback to summary
public IntFunc(String name)
org.glassfish.pfl.basic.fsm back to summary

public abstract Class Guard.Base.Predicate

extends SimpleName
implements BinaryPredicate<FSM, Input>
Class Inheritance
All Implemented Interfaces
org.glassfish.pfl.basic.func.BinaryPredicate, java.util.function.BiPredicate

References Deprecated

BinaryPredicate is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Constructor Summary

AccessConstructor and Description
public

Constructor Detail

Predicateback to summary
public Predicate(String name)
org.glassfish.pfl.basic.fsm back to summary

public abstract Class Guard.Base.SimpleName

extends Object
Class Inheritance
Known Direct Subclasses
org.glassfish.pfl.basic.fsm.Guard.Base.Predicate, org.glassfish.pfl.basic.fsm.Guard.Base.IntFunc

Field Summary

Modifier and TypeField and Description
private String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

nameback to summary
private String name

Constructor Detail

SimpleNameback to summary
public SimpleName(String name)

Method Detail

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
org.glassfish.pfl.basic.fsm back to summary

public final Enum Guard.Result

extends Enum<Guard.Result>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final Guard.Result
public static final Guard.Result
public static final Guard.Result

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static Guard.Result
public static Guard.Result[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

DEFERREDback to summary
public static final Guard.Result DEFERRED
DISABLEDback to summary
public static final Guard.Result DISABLED
ENABLEDback to summary
public static final Guard.Result ENABLED

Constructor Detail

Resultback to summary
private Result()

Method Detail

valueOfback to summary
public static Guard.Result valueOf(String name)
valuesback to summary
public static Guard.Result[] values()