net.groboclown.eventbus.v2
Class EventBusEvent
java.lang.Object
|
+--net.groboclown.eventbus.v2.EventBusEvent
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- RemoteEventBusEvent
- public class EventBusEvent
- extends Object
- implements Serializable
The event object which is passed around.
The source of the event should be a Remoteable object - the
network face of the object (if one exists), so that the event can
be sent over the network correctly.
- Version:
- Alpha 0.9.0
- Author:
- Matt Albrecht
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
serialVersionUID
static final long serialVersionUID
eventSource
private EventBusId eventSource
eventData
private Serializable eventData
EventBusEvent
public EventBusEvent()
- Deprecated. this isn't really deprecated, but a class should never
use this method explicitly.
- Default constructor - should only be used for serialization.
EventBusEvent
public EventBusEvent(EventBusId source,
Serializable data)
- Real constructor. Only called by EventBus and distributors.
- Parameters:
data
- may be null.
getEventSource
public EventBusId getEventSource()
getEventData
public Serializable getEventData()
- Returns:
- the data, which may be null.
toString
public String toString()
- Overrides:
toString
in class Object
writeObject
private void writeObject(ObjectOutputStream out)
throws IOException
- Explicitly write the output so we can always maintain
backwards compatibility.
readObject
private void readObject(ObjectInputStream in)
throws IOException,
ClassNotFoundException
- Explicitly read the input so we can always maintain
backwards compatibility.
Written under the LGPL