net.groboclown.eventbus.v2
Class EventBusId

java.lang.Object
  |
  +--net.groboclown.eventbus.v2.EventBusId
All Implemented Interfaces:
Serializable

public class EventBusId
extends Object
implements Serializable

Contains unique references to both the EventBus, and the local object. Note that this object is non-mutable.

See Also:
Serialized Form

Field Summary
private  String busId
           
private  String objId
           
(package private) static long serialVersionUID
           
 
Constructor Summary
private EventBusId()
          The serializable needs a default constructor
  EventBusId(String busId, String objId)
          The public interface to create a new ID instance.
 
Method Summary
 boolean equals(Object o)
           
static String generateUniqueIdentifier(String prepend)
          Generator for unique identifiers.
 String getEventBusId()
           
 String getInstanceId()
           
 int hashCode()
           
private  void readObject(ObjectInputStream in)
          Explicitly read the input so we can always maintain backwards compatibility.
 String toString()
           
private  void writeObject(ObjectOutputStream out)
          Explicitly write the output so we can always maintain backwards compatibility.
 
Methods inherited from class java.lang.Object
, clone, finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID

busId

private String busId

objId

private String objId
Constructor Detail

EventBusId

private EventBusId()
The serializable needs a default constructor

EventBusId

public EventBusId(String busId,
                  String objId)
The public interface to create a new ID instance.
Method Detail

getEventBusId

public String getEventBusId()

getInstanceId

public String getInstanceId()

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

generateUniqueIdentifier

public static String generateUniqueIdentifier(String prepend)
Generator for unique identifiers.

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