net.sf.appia.core.events
Class SendableEvent
java.lang.Object
net.sf.appia.core.Event
net.sf.appia.core.events.SendableEvent
- All Implemented Interfaces:
- java.lang.Cloneable
- Direct Known Subclasses:
- AckEvent, ConfirmEvent, ExitEvent, FragEvent, GossipOutEvent, GroupSendableEvent, HelloEvent, IgnoreEvent, JGCSSendableEvent, MergeEvent, MyEccoEvent, NackEvent, PingEvent, UpdateEvent
public class SendableEvent
- extends Event
- implements java.lang.Cloneable
This class defines a SendableEvent
- Version:
- 1.0
- Author:
- Alexandre Pinto
Methods inherited from class net.sf.appia.core.Event |
asyncGo, currentSession, debug, getChannel, getDir, getPriority, getSchedulerData, getSource, getSourceSession, go, init, isAccepted, popSession, setDir, setPriority, setSchedulerData, setSource, setSourceSession |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
dest
public java.lang.Object dest
source
public java.lang.Object source
message
protected Message message
SendableEvent
public SendableEvent()
SendableEvent
public SendableEvent(Channel channel,
int dir,
Session source)
throws AppiaEventException
- Throws:
AppiaEventException
SendableEvent
public SendableEvent(Message msg)
SendableEvent
public SendableEvent(Channel channel,
int dir,
Session source,
Message msg)
throws AppiaEventException
- Throws:
AppiaEventException
getMessage
public Message getMessage()
setMessage
public void setMessage(Message message)
setChannel
public void setChannel(Channel channel)
- Description copied from class:
Event
- Sets the channel of the event.
- Overrides:
setChannel
in class Event
detachFromMemory
public void detachFromMemory()
- Detaches the amount of memory occupied by the Message of
This SendableEvent from the MemoryManager.
This is used when we need to use flow control in the channel with
good performance.
This method is called by the Appia kernel when the event route ends.
This method should be called if we want to destroy the event before
he reaches the end of his route or if we dont call the go() method in
the last session. If this is not done by the protocol programmer, it is
done in the finalizer of the message, but the performance is not so good.
- See Also:
Message
,
MemoryManager
cloneEvent
public Event cloneEvent()
throws java.lang.CloneNotSupportedException
- Clones the sendable event.
- Overrides:
cloneEvent
in class Event
- Returns:
- Event
- Throws:
java.lang.CloneNotSupportedException
- See Also:
Event.cloneEvent()
finalize
protected void finalize()
throws java.lang.Throwable
- Called when the garbage Collector runs and this object is going to
be destroyed.
- Overrides:
finalize
in class java.lang.Object
- Throws:
java.lang.Throwable
- See Also:
Object.finalize()
COPYRIGHT 2006-2009, University of Lisbon and INESC-ID
For updates and related information please see Appia Home Page
Send questions, sugestions or remarks to the appia-users mailing list