| Package | Description |
|---|---|
| com.almasb.fxgl.ai.fsm | |
| com.almasb.fxgl.ai.msg |
| Modifier and Type | Interface and Description |
|---|---|
interface |
StateMachine<E,S extends State<E>>
A state machine manages the state transitions of its entity.
|
| Modifier and Type | Class and Description |
|---|---|
class |
DefaultStateMachine<E,S extends State<E>>
Default implementation of the
StateMachine interface. |
class |
StackStateMachine<E,S extends State<E>>
A
StateMachine implementation that keeps track of all previous States via a stack. |
| Modifier and Type | Class and Description |
|---|---|
class |
MessageDispatcher
A
MessageDispatcher is in charge of the creation, dispatch, and management of telegrams. |
class |
MessageManager
The
MessageManager is a singleton MessageDispatcher in charge of the creation, dispatch, and management of
telegrams. |
| Modifier and Type | Field and Description |
|---|---|
Telegraph |
Telegram.receiver
The agent that is to receive this telegram
|
Telegraph |
Telegram.sender
The agent that sent this telegram
|
| Modifier and Type | Method and Description |
|---|---|
void |
MessageDispatcher.addListener(Telegraph listener,
int msg)
Registers a listener for the specified message code.
|
void |
MessageDispatcher.addListeners(Telegraph listener,
int... msgs)
Registers a listener for a selection of message types.
|
void |
MessageDispatcher.dispatchMessage(float delay,
Telegraph sender,
int msg)
Sends a message to all registered listeners, with the specified delay but no extra info.
|
void |
MessageDispatcher.dispatchMessage(float delay,
Telegraph sender,
int msg,
boolean needsReturnReceipt)
Sends a message to all registered listeners, with the specified delay but no extra info.
|
void |
MessageDispatcher.dispatchMessage(float delay,
Telegraph sender,
int msg,
Object extraInfo)
Sends a message to all registered listeners, with the specified delay and extra info.
|
void |
MessageDispatcher.dispatchMessage(float delay,
Telegraph sender,
int msg,
Object extraInfo,
boolean needsReturnReceipt)
Sends a message to all registered listeners, with the specified delay and extra info.
|
void |
MessageDispatcher.dispatchMessage(float delay,
Telegraph sender,
Telegraph receiver,
int msg)
Sends a message to the specified receiver, with the specified delay but no extra info.
|
void |
MessageDispatcher.dispatchMessage(float delay,
Telegraph sender,
Telegraph receiver,
int msg,
boolean needsReturnReceipt)
Sends a message to the specified receiver, with the specified delay but no extra info.
|
void |
MessageDispatcher.dispatchMessage(float delay,
Telegraph sender,
Telegraph receiver,
int msg,
Object extraInfo)
Sends a message to the specified receiver, with the specified delay but no extra info.
|
void |
MessageDispatcher.dispatchMessage(float delay,
Telegraph sender,
Telegraph receiver,
int msg,
Object extraInfo,
boolean needsReturnReceipt)
Given a message, a receiver, a sender and any time delay, this method routes the message to the correct agents (if no delay)
or stores in the message queue to be dispatched at the correct time.
|
void |
MessageDispatcher.dispatchMessage(Telegraph sender,
int msg)
Sends an immediate message to all registered listeners, with no extra info.
|
void |
MessageDispatcher.dispatchMessage(Telegraph sender,
int msg,
boolean needsReturnReceipt)
Sends an immediate message to all registered listeners, with no extra info.
|
void |
MessageDispatcher.dispatchMessage(Telegraph sender,
int msg,
Object extraInfo)
Sends an immediate message to all registered listeners, with extra info.
|
void |
MessageDispatcher.dispatchMessage(Telegraph sender,
int msg,
Object extraInfo,
boolean needsReturnReceipt)
Sends an immediate message to all registered listeners, with extra info.
|
void |
MessageDispatcher.dispatchMessage(Telegraph sender,
Telegraph receiver,
int msg)
Sends an immediate message to the specified receiver with no extra info.
|
void |
MessageDispatcher.dispatchMessage(Telegraph sender,
Telegraph receiver,
int msg,
boolean needsReturnReceipt)
Sends an immediate message to the specified receiver with no extra info.
|
void |
MessageDispatcher.dispatchMessage(Telegraph sender,
Telegraph receiver,
int msg,
Object extraInfo)
Sends an immediate message to the specified receiver with extra info.
|
void |
MessageDispatcher.dispatchMessage(Telegraph sender,
Telegraph receiver,
int msg,
Object extraInfo,
boolean needsReturnReceipt)
Sends an immediate message to the specified receiver with extra info.
|
Object |
TelegramProvider.provideMessageInfo(int msg,
Telegraph receiver)
Provides
Telegram.extraInfo to dispatch immediately when a Telegraph is registered for the given message
type. |
void |
MessageDispatcher.removeListener(Telegraph listener,
int... msgs)
Unregister the specified listener for the selection of message codes.
|
void |
MessageDispatcher.removeListener(Telegraph listener,
int msg)
Unregister the specified listener for the specified message code.
|
void |
MessageDispatcher.PendingMessageCallback.report(float delay,
Telegraph sender,
Telegraph receiver,
int message,
Object extraInfo,
int returnReceiptStatus)
Reports a pending message.
|
Copyright © 2017. All rights reserved.