net.groboclown.eventbus.v1
Class EventBusObject

java.lang.Object
  |
  +--net.groboclown.eventbus.v1.EventBusObject
All Implemented Interfaces:
Serializable

public class EventBusObject
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

Field Summary
private  String eventClass
           
private  Object eventData
           
private  String eventMethod
           
private  Object eventSource
           
 
Constructor Summary
EventBusObject()
          Deprecated. this isn't really deprecated, but a class should never use this method explicitly.
EventBusObject(String clazz, String method, Object source, Object data)
          Real constructor
 
Method Summary
 String getEventClass()
          Retrieve the classification of the event.
 Object getEventData()
           
 String getEventMethod()
          Retrieve the method of the event.
 Object getEventSource()
           
private  void readObject(ObjectInputStream in)
          Explicitly read the input so we can always maintain backwards compatibility.
private  void writeObject(ObjectOutputStream out)
          Explicitly write the output so we can always maintain backwards compatibility.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

eventClass

private String eventClass

eventMethod

private String eventMethod

eventSource

private Object eventSource

eventData

private Object eventData
Constructor Detail

EventBusObject

public EventBusObject()
Deprecated. this isn't really deprecated, but a class should never use this method explicitly.

Default constructor - should only be used for serialization.

EventBusObject

public EventBusObject(String clazz,
                      String method,
                      Object source,
                      Object data)
Real constructor
Parameters:
data - may be null.
Method Detail

getEventClass

public String getEventClass()
Retrieve the classification of the event.

getEventMethod

public String getEventMethod()
Retrieve the method of the event.

getEventSource

public Object getEventSource()

getEventData

public Object getEventData()
Returns:
the data, which may be null.

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