public class WaveBase extends Object implements Wave, LinkMessages
| Type | Property and Description |
|---|---|
ObjectProperty<Wave.Status> |
status
Return the status property to allow binding.
|
Wave.Status| Modifier and Type | Field and Description |
|---|---|
private Class<?> |
fromClass
The from class to used for create waves.
|
private static JRLogger |
LOGGER
The class logger.
|
private int |
priority
The priority used to process wave according to a custom order.
|
private Class<?> |
relatedClass
The related class to used for create waves.
|
private Wave |
relatedWave
The related wave to the current wave, cold be a parent wave or child wave according context.
|
private static String |
SPACE_SEP
The space separator.
|
private ObjectProperty<Wave.Status> |
statusProperty
The wave status (can be bound).
|
private long |
timestamp
The Wave timestamp.
|
private WaveBean |
waveBean
The wave bean.
|
private Class<? extends WaveBean> |
waveBeanClass
The type extending WaveBean to use to embed some values.
|
private List<WaveData<?>> |
waveDataList
A sorted list that contains all data.
|
private WaveGroup |
waveGroup
The group of the wave used to dispatch the right event.
|
private Map<WaveItem<?>,WaveData<?>> |
waveItemsMap
A map used to contain all data.
|
private List<WaveListener> |
waveListeners
The list of wave Listener to warn when wave status changed.
|
private WaveType |
waveType
The type of the wave used to call the right method name of the receiver object.
|
private String |
wuid
The Wave Unique Identifier.
|
CALL_ANNOTATED_METHOD_ERROR, COMMAND_NOT_FOUND_ERROR, COMMAND_NOT_FOUND_MESSAGE, COMPONENT_INJECTION_FAILURE, CUSTOM_METHOD_NOT_FOUND, LISTEN_WAVE_TYPE, MODEL_NOT_FOUND_ERROR, MODEL_NOT_FOUND_MESSAGE, NO_WAVE_LISTENER, NOTIFIER_CONSUMES, SEND_WAVE, SERVICE_NOT_FOUND_ERROR, SERVICE_NOT_FOUND_MESSAGE, UNLISTEN_WAVE_TYPE, USE_DEFAULT_WAVE_HANDLER, WAVE_BEAN_CREATION_ERROR, WAVE_DISPATCH_ERROR, WAVE_HANDLING_ERROR, WAVE_LOST, WAVE_LOST_CONTEXT, WAVE_SENDING_ERROR| Constructor and Description |
|---|
WaveBase()
Default Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
<T> void |
add(WaveItem<T> waveItem,
T value)
Add a wave data.
|
<T> void |
addData(WaveData<T> waveData)
Add a wave data.
|
void |
addDatas(WaveData<?>[] waveDatas)
Add a list of wave data.
|
void |
addWaveListener(WaveListener waveListener)
Add a wave listener.
|
boolean |
contains(WaveItem<?> waveItem)
Check if an object exists.
|
boolean |
containsNotNull(WaveItem<?> waveItem)
Check if an object exists and if it isn't null.
|
private void |
fireStatusChanged()
Fire a wave status change.
|
<T> T |
get(WaveItem<T> waveItem)
Retrieve a value.
|
<T> WaveData<T> |
getData(WaveItem<T> waveItem)
Retrieve a wave data object.
|
Class<?> |
getFromClass() |
int |
getPriority() |
Class<?> |
getRelatedClass() |
Wave |
getRelatedWave() |
Wave.Status |
getStatus() |
long |
getTimestamp() |
WaveBean |
getWaveBean()
Return the wave bean used to wrap wave properties.
|
Class<? extends WaveBean> |
getWaveBeanClass() |
WaveGroup |
getWaveGroup() |
List<WaveData<?>> |
getWaveItems()
Return all wave items sorted by order.
|
WaveType |
getWaveType() |
String |
getWUID() |
void |
linkWaveBean(WaveBean waveBean)
Link a wave bean.
|
void |
removeWaveListener(WaveListener waveListener)
Remove a wave listener.
|
void |
setFromClass(Class<?> fromClass) |
void |
setPriority(int priority) |
void |
setRelatedClass(Class<?> relatedClass) |
void |
setRelatedWave(Wave nextWave) |
void |
setStatus(Wave.Status status) |
void |
setWaveBeanClass(Class<? extends WaveBean> waveBeanClass) |
void |
setWaveGroup(WaveGroup waveGroup) |
void |
setWaveType(WaveType waveType) |
ObjectProperty<Wave.Status> |
statusProperty()
Return the status property to allow binding.
|
String |
toString() |
statusProperty in interface Waveprivate static final JRLogger LOGGER
private static final String SPACE_SEP
private final String wuid
private final long timestamp
private final ObjectProperty<Wave.Status> statusProperty
private WaveGroup waveGroup
private WaveType waveType
private Class<?> fromClass
private Class<?> relatedClass
private int priority
private Wave relatedWave
private final Map<WaveItem<?>,WaveData<?>> waveItemsMap
private WaveBean waveBean
private Class<? extends WaveBean> waveBeanClass
private final List<WaveListener> waveListeners
public WaveGroup getWaveGroup()
getWaveGroup in interface Wavepublic void setWaveGroup(WaveGroup waveGroup)
setWaveGroup in interface WavewaveGroup - The waveGroup to set.public WaveType getWaveType()
getWaveType in interface Wavepublic void setWaveType(WaveType waveType)
setWaveType in interface WavewaveType - The waveType to set.public Class<?> getFromClass()
getFromClass in interface Wavepublic void setFromClass(Class<?> fromClass)
setFromClass in interface WavefromClass - The fromClass to set.public Class<?> getRelatedClass()
getRelatedClass in interface Wavepublic void setRelatedClass(Class<?> relatedClass)
setRelatedClass in interface WaverelatedClass - The relatedClass to set.public int getPriority()
getPriority in interface Wavepublic void setPriority(int priority)
setPriority in interface Wavepriority - The priority to set.public Wave getRelatedWave()
getRelatedWave in interface Wavepublic void setRelatedWave(Wave nextWave)
setRelatedWave in interface WavenextWave - The related Wave to set.public List<WaveData<?>> getWaveItems()
getWaveItems in interface Wavepublic <T> void addData(WaveData<T> waveData)
public void addDatas(WaveData<?>[] waveDatas)
public <T> void add(WaveItem<T> waveItem, T value)
public <T> T get(WaveItem<T> waveItem)
public boolean contains(WaveItem<?> waveItem)
public boolean containsNotNull(WaveItem<?> waveItem)
containsNotNull in interface WavewaveItem - the waveItem of the object to checkpublic String getWUID()
public long getTimestamp()
getTimestamp in interface Wavepublic WaveBean getWaveBean()
getWaveBean in interface Wavepublic Class<? extends WaveBean> getWaveBeanClass()
public void setWaveBeanClass(Class<? extends WaveBean> waveBeanClass)
waveBeanClass - The waveBeanClass to set.public void addWaveListener(WaveListener waveListener)
addWaveListener in interface WavewaveListener - the wave listener that will be notified of wave statuspublic void removeWaveListener(WaveListener waveListener)
removeWaveListener in interface WavewaveListener - the wave listener to removedpublic Wave.Status getStatus()
public ObjectProperty<Wave.Status> statusProperty()
statusProperty in interface Wavepublic void setStatus(Wave.Status status)
private void fireStatusChanged()
public void linkWaveBean(WaveBean waveBean)
linkWaveBean in interface WavewaveBean - the wave bean already built to linkCopyright © 2011–2014 JRebirth OSS. All rights reserved.