|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.asmatron.messengine.engines.DefaultEngine
public class DefaultEngine
| Constructor Summary | |
|---|---|
|
DefaultEngine()
|
protected |
DefaultEngine(ActionDelegate actionDelegate,
EventDelegate eventDelegate,
MessagingDelegate messagingDelegate,
ModelDelegate modelDelegate)
|
| Method Summary | ||
|---|---|---|
|
addActionHandler(ActionId<T> actionType,
ActionHandler<T> actionHandler)
|
|
|
addListener(EventId<T> type,
Listener<T> listener)
|
|
void |
addMessageListener(java.lang.String type,
MessageListener<? extends Message<?>> listener)
|
|
void |
fireEvent(EventId<EmptyEvent> type)
Fires an event and allows all event listeners to handle it. |
|
|
fireEvent(EventId<T> eventType,
T argument)
Fires the event with an argument passed to listeners. |
|
|
fireValueEvent(EventId<ValueEvent<T>> type,
T argument)
Convenience method that fires a value event (a wrapper of a simple class into an eventObject). |
|
|
get(ModelId<T> type)
Gets a value from the engine model repository. |
|
|
removeActionHandler(ActionId<T> action)
|
|
|
removeListener(EventId<T> type,
Listener<T> listener)
|
|
void |
removeMessageListener(java.lang.String type,
MessageListener<? extends Message<?>> listener)
|
|
|
request(ActionId<RequestAction<java.lang.Void,T>> type,
ResponseCallback<T> callback)
|
|
|
request(ActionId<RequestAction<V,T>> type,
V requestParameter,
ResponseCallback<T> callback)
|
|
java.util.concurrent.Future<Message<?>> |
request(Message<?> message,
java.lang.String responseType,
long timeout)
|
|
void |
send(ActionId<EmptyAction> type)
|
|
|
send(ActionId<T> type,
T arg)
|
|
void |
send(Message<?> message)
|
|
|
sendValueAction(ActionId<ValueAction<T>> action,
T argument)
|
|
|
set(ModelId<T> type,
T value,
EventId<ValueEvent<T>> event)
|
|
void |
start()
|
|
void |
stop()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultEngine()
protected DefaultEngine(ActionDelegate actionDelegate,
EventDelegate eventDelegate,
MessagingDelegate messagingDelegate,
ModelDelegate modelDelegate)
| Method Detail |
|---|
public <T extends ActionObject> void send(ActionId<T> type,
T arg)
send in interface ViewEnginepublic void send(ActionId<EmptyAction> type)
send in interface ViewEngine
public <V,T> void request(ActionId<RequestAction<V,T>> type,
V requestParameter,
ResponseCallback<T> callback)
request in interface ViewEngine
public <T> void request(ActionId<RequestAction<java.lang.Void,T>> type,
ResponseCallback<T> callback)
request in interface ViewEngine
public <T extends EventObject> void fireEvent(EventId<T> eventType,
T argument)
ControlEngine
fireEvent in interface ControlEngineT - The type of the argument, it must extend the EventObject class.eventType - The id of the eventargument - The argument of matching T type that will be passed to event
listenerspublic void fireEvent(EventId<EmptyEvent> type)
ControlEngine
fireEvent in interface ControlEnginetype - The id of the event (must be an EmptyEvent)public <T> T get(ModelId<T> type)
ControlEngine
get in interface ControlEngineget in interface ViewEngineT - The type of the value storedtype - the id of the model variable stored in the engine
public <T> void set(ModelId<T> type,
T value,
EventId<ValueEvent<T>> event)
set in interface ControlEngine
public <T extends ActionObject> void addActionHandler(ActionId<T> actionType,
ActionHandler<T> actionHandler)
addActionHandler in interface ControlEnginepublic <T extends ActionObject> void removeActionHandler(ActionId<T> action)
removeActionHandler in interface ControlEngine
public <T extends EventObject> void removeListener(EventId<T> type,
Listener<T> listener)
removeListener in interface ViewEngine
public <T extends EventObject> void addListener(EventId<T> type,
Listener<T> listener)
addListener in interface ViewEnginepublic void start()
start in interface EngineControllerpublic void stop()
stop in interface EngineController
public <T> void fireValueEvent(EventId<ValueEvent<T>> type,
T argument)
ControlEngine
fireValueEvent in interface ControlEngineT - Anything that we want to send to eventListeners.type - The id of the event (must be a ValueEvent)argument - the argument that will be wrapped on a valueEvent
public <T> void sendValueAction(ActionId<ValueAction<T>> action,
T argument)
sendValueAction in interface ViewEnginepublic void send(Message<?> message)
send in interface MessEngine
public java.util.concurrent.Future<Message<?>> request(Message<?> message,
java.lang.String responseType,
long timeout)
request in interface MessEngine
public void addMessageListener(java.lang.String type,
MessageListener<? extends Message<?>> listener)
addMessageListener in interface MessEngine
public void removeMessageListener(java.lang.String type,
MessageListener<? extends Message<?>> listener)
removeMessageListener in interface MessEngine
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||