public class NotifierBase extends AbstractGlobalReady implements Notifier, LinkMessages
ADD_BEHAVIOR, CALL_ANNOTATED_METHOD_ERROR, COMMAND_NOT_FOUND_ERROR, COMMAND_NOT_FOUND_MESSAGE, COMPONENT_INJECTION_FAILURE, COMPONENT_RELEASE_ERROR, CUSTOM_METHOD_NOT_FOUND, LISTEN_WAVE_TYPE, MODEL_NOT_FOUND_ERROR, MODEL_NOT_FOUND_MESSAGE, NO_WAVE_LISTENER, NOTIFIER_CONSUMES, NOTIFIER_HANDLES, SEND_WAVE, SERVICE_NOT_FOUND_ERROR, SERVICE_NOT_FOUND_MESSAGE, UNLISTEN_WAVE_TYPE, WAVE_BEAN_CREATION_ERROR, WAVE_DISPATCH_ERROR, WAVE_HANDLING_ERROR, WAVE_LOST, WAVE_LOST_CONTEXT, WAVE_SENDING_ERROR
Constructor and Description |
---|
NotifierBase(GlobalFacade globalFacade)
Default Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
listen(Component<?> linkedObject,
WaveChecker waveChecker,
Method method,
WaveType... waveTypes)
Start to listen a defined type of wave.
|
void |
sendWave(Wave wave)
Send wave to all facade.
|
void |
unlisten(Component<?> linkedObject,
WaveType... waveTypes)
Stop to listen a defined type of wave.
|
void |
unlistenAll(Component<?> linkedObject)
Stop to listen all waveType listened by the component.
|
getGlobalFacade
public NotifierBase(GlobalFacade globalFacade)
globalFacade
- the global facade of the applicationpublic void sendWave(Wave wave) throws JRebirthThreadException
sendWave
in interface Notifier
wave
- the object that information dataJRebirthThreadException
- if called outside the JRebirthThreadpublic void listen(Component<?> linkedObject, WaveChecker waveChecker, Method method, WaveType... waveTypes) throws JRebirthThreadException
listen
in interface Notifier
linkedObject
- an object that can process the content of a wavewaveChecker
- the wave checker to filter unwanted wave to be processed by other componentsmethod
- the default method to callwaveTypes
- the type(s) of wave that interests the object (one or many)JRebirthThreadException
- if called outside the JRebirthThreadpublic void unlisten(Component<?> linkedObject, WaveType... waveTypes) throws JRebirthThreadException
unlisten
in interface Notifier
linkedObject
- an object that can process the content of a wavewaveTypes
- the type of wave that doesn't interest the object anymore (one or many)JRebirthThreadException
- if called outside the JRebirthThreadpublic void unlistenAll(Component<?> linkedObject) throws JRebirthThreadException
unlistenAll
in interface Notifier
linkedObject
- an object that can process the content of a waveJRebirthThreadException
- if called outside the JRebirthThreadCopyright © 2011–2016 JRebirth OSS. All rights reserved.