|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.keridwen.core.messaging.internal.DefaultEvent<ResultType,MessageType>
ResultType
- type of the value returned by the Command
.MessageType
- the type of the message transported by the Event
public class DefaultEvent<ResultType,MessageType>
This is the default implementation of the Event
interface.
Constructor Summary | |
---|---|
DefaultEvent(EventKey anEventKey,
MessageType aMessage)
Builds an Event with the given unique EventKey and a message to transport. |
|
DefaultEvent(EventKey anEventKey,
MessageType aMessage,
Object aSource)
Builds an Event with the given unique EventKey and a message to transport. |
|
DefaultEvent(EventKey anEventKey,
MessageType aMessage,
Object aSource,
BundleController aDestination)
Builds an Event with the given unique EventKey and a message to transport. |
Method Summary | |
---|---|
BundleController |
getDestination()
Gets the BundleController to which this Event should be sent (if known). |
EventKey |
getKey()
Returns the unique EventKey of this Event . |
MessageType |
getMessage()
Gets the message transmitted with by the Event . |
Object |
getSource()
Gets the sender of the Event . |
Supervisor<ResultType> |
getSupervisor()
Gets the supervisor of the associated Command . |
void |
setMessage(MessageType aMessage)
Sets the message of the Event . |
void |
setSupervisor(Supervisor<ResultType> aSupervisor)
Sets the supervisor of the associated Command . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultEvent(EventKey anEventKey, MessageType aMessage)
Event
with the given unique EventKey
and a message to transport.
anEventKey
- the unique event key of the eventaMessage
- the message to transportpublic DefaultEvent(EventKey anEventKey, MessageType aMessage, Object aSource)
Event
with the given unique EventKey
and a message to transport.
anEventKey
- the unique event key of the eventaMessage
- the message to transportaSource
- the emitter of the messagepublic DefaultEvent(EventKey anEventKey, MessageType aMessage, Object aSource, BundleController aDestination)
Event
with the given unique EventKey
and a message to transport.
anEventKey
- the unique event key of the eventaMessage
- the message to transportaSource
- the emitter of the messageaDestination
- the controlleron which the event should be executedMethod Detail |
---|
public final EventKey getKey()
Event
EventKey
of this Event
.
getKey
in interface Event<ResultType,MessageType>
Event
public final MessageType getMessage()
Event
Event
.
getMessage
in interface Event<ResultType,MessageType>
Event
public final void setMessage(MessageType aMessage)
Event
Event
.
setMessage
in interface Event<ResultType,MessageType>
aMessage
- the message to set.public final BundleController getDestination()
Event
BundleController
to which this Event
should be sent (if known).
getDestination
in interface Event<ResultType,MessageType>
BundleController
that should process this Event
.public final Object getSource()
Event
Event
.
getSource
in interface Event<ResultType,MessageType>
Event
.public final Supervisor<ResultType> getSupervisor()
Event
Command
.
getSupervisor
in interface Event<ResultType,MessageType>
public final void setSupervisor(Supervisor<ResultType> aSupervisor)
Event
Command
.
setSupervisor
in interface Event<ResultType,MessageType>
aSupervisor
- the command supervisor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |