org.keridwen.core.messaging
Interface Event<ResultType,MessageType>

Type Parameters:
ResultType - type of the value returned by the Command.
MessageType - the type of the message transported by the Event
All Known Subinterfaces:
SerializableEvent<ResultType,MessageType>
All Known Implementing Classes:
DefaultEvent, ViewEvent

public interface Event<ResultType,MessageType>

This interface defines a Keridwen Event. An Event is a container that transports an array of parameters.


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 message)
          Sets the message of the Event.
 void setSupervisor(Supervisor<ResultType> aSupervisor)
          Sets the supervisor of the associated Command.
 

Method Detail

getKey

EventKey getKey()
Returns the unique EventKey of this Event.

Returns:
the unique Id of the Event

getMessage

MessageType getMessage()
Gets the message transmitted with by the Event.

Returns:
the message of the Event

setMessage

void setMessage(MessageType message)
Sets the message of the Event.

Parameters:
message - the message to set.

getDestination

BundleController getDestination()
Gets the BundleController to which this Event should be sent (if known).

Returns:
the BundleController that should process this Event.

getSource

Object getSource()
Gets the sender of the Event.

Returns:
the object sending the Event.

getSupervisor

Supervisor<ResultType> getSupervisor()
Gets the supervisor of the associated Command.

Returns:
the event supervisor.

setSupervisor

void setSupervisor(Supervisor<ResultType> aSupervisor)
Sets the supervisor of the associated Command.

Parameters:
aSupervisor - the command supervisor


Copyright © 2010-2013 Artenum. All Rights Reserved.