jbora
Class Event

java.lang.Object
  extended byjbora.Event
All Implemented Interfaces:
Serializable

public class Event
extends Object
implements Serializable

A JBora event: An event may be a view change, a message, or a local message. WARNING: in the previous vs.the get() methods could throw a NoXXXEventException, where XXX = event, view, etc. (too many classes!) Now they can only throw the EventException.

Author:
Milan Prica
See Also:
Serialized Form

Method Summary
 Message getLocalMessage()
          Returns the local call message.
 Message getMessage()
          Returns the related message.
 ProcessID getSender()
          Returns the sender of the message related to the event received.
 View getView()
          Returns the related view.
 boolean isLocalCall()
          Checks if this event is a local call.
 boolean isMessage()
          Checks if this event is a message.
 boolean isView()
          Checks if this event is a view.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isMessage

public boolean isMessage()
Checks if this event is a message.

Returns:
True if this event is a message

isView

public boolean isView()
Checks if this event is a view.

Returns:
True if this event is a view

isLocalCall

public boolean isLocalCall()
Checks if this event is a local call.

Returns:
True if this event is a local call

getMessage

public Message getMessage()
                   throws EventException
Returns the related message.

Returns:
Message
Throws:
EventException - This event is not a message

getView

public View getView()
             throws EventException
Returns the related view.

Returns:
View
Throws:
EventException - This event is not a view change

getLocalMessage

public Message getLocalMessage()
                        throws EventException
Returns the local call message.

Returns:
Local message
Throws:
EventException - This event is not a local message

getSender

public ProcessID getSender()
                    throws EventException
Returns the sender of the message related to the event received.

Returns:
Sender
Throws:
EventException - This event is not a message