jgroup.relacs.events
Class DeliveryEvent

java.lang.Object
  extended by jgroup.relacs.events.Event
      extended by jgroup.relacs.events.DeliveryEvent
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, EventTags

public final class DeliveryEvent
extends Event

The DeliveryEvent class represents a local message exchanged between members and the daemon; it is used by a daemon to notify members that a message is ready to be delivered.

Since:
Jgroup 0.2
Author:
Alberto Montresor
See Also:
Serialized Form

Field Summary
 
Fields inherited from class jgroup.relacs.events.Event
gid, tag
 
Fields inherited from interface jgroup.relacs.events.EventTags
DAEMON_FAILURE_EVENT, DELIVERY_ACK, DELIVERY_EVENT, INSTALL_ACK, INSTALL_EVENT, JOIN_REQUEST, LEAVE_REQUEST, MEMBER_LEFT_EVENT, MULTICAST_REQUEST, PREPARE_ACK, PREPARE_EVENT
 
Constructor Summary
DeliveryEvent()
          Default constructor for externalization.
DeliveryEvent(int gid, boolean isObject, int mid, int hpos, MemberId sender, boolean ackRequired, InMessage payload)
          Builds a new DeliveryEvent object.
 
Method Summary
 int getHostIndex()
           
 int getMessageId()
          Returns the message identifier for this multicast message.
 InMessage getPayload()
           
 MemberId getSender()
          Returns the sender of this multicast message.
 boolean isAckRequired()
           
 boolean isObject()
           
 void readExternal(java.io.ObjectInput in)
          Restores the content of this object from the marshalled data contained in the specified input stream.
 java.lang.String toString()
           
 void writeExternal(java.io.ObjectOutput out)
          Marshals the content of this object to the specified output stream.
 
Methods inherited from class jgroup.relacs.events.Event
getGid, getTag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DeliveryEvent

public DeliveryEvent()
Default constructor for externalization.


DeliveryEvent

public DeliveryEvent(int gid,
                     boolean isObject,
                     int mid,
                     int hpos,
                     MemberId sender,
                     boolean ackRequired,
                     InMessage payload)
Builds a new DeliveryEvent object.

Parameters:
gid - Group identifier
isObject - True if the payload contains a single object; false if it contains a stream
mid - Message identifier
sender - Sender identifier
ackRequired - True if acknowledgement is required; false otherwise
payload - A stream or object payload
Method Detail

getSender

public MemberId getSender()
Returns the sender of this multicast message.


getHostIndex

public int getHostIndex()

getMessageId

public int getMessageId()
Returns the message identifier for this multicast message.


isObject

public boolean isObject()

isAckRequired

public boolean isAckRequired()

getPayload

public InMessage getPayload()

toString

public java.lang.String toString()
Overrides:
toString in class Event

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Restores the content of this object from the marshalled data contained in the specified input stream.

Specified by:
readExternal in interface java.io.Externalizable
Overrides:
readExternal in class Event
Parameters:
in - the stream to be read
Throws:
java.io.IOException
java.lang.ClassNotFoundException

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Marshals the content of this object to the specified output stream.

Specified by:
writeExternal in interface java.io.Externalizable
Overrides:
writeExternal in class Event
Parameters:
out - the stream to be written
Throws:
java.io.IOException


Copyright © 1998-2006 The Jgroup/ARM development team. All Rights Reserved.