com.sun.sgs.impl.service.channel
Class ChannelImpl.SendEvent
java.lang.Object
com.sun.sgs.impl.service.channel.ChannelImpl.ChannelEvent
com.sun.sgs.impl.service.channel.ChannelImpl.SendEvent
- All Implemented Interfaces:
- ManagedObject, Serializable
- Enclosing class:
- ChannelImpl
static class ChannelImpl.SendEvent
- extends ChannelImpl.ChannelEvent
A channel send event.
|
Constructor Summary |
ChannelImpl.SendEvent(BigInteger senderRefId,
byte[] message,
com.sun.sgs.impl.service.channel.ChannelImpl.EventQueue eventQueue,
boolean isChannelMember)
Constructs a send event with the given senderRefId and
message. |
|
Method Summary |
(package private) int |
getCost()
Use the message length as the cost for sending messages. |
boolean |
serviceEvent(ChannelImpl channel)
Services this event (taken from the head of the event queue) for
the specified channel, and returns true if the
event has completed processing and can be removed from the event
queue. |
String |
toString()
|
ChannelImpl.SendEvent
ChannelImpl.SendEvent(BigInteger senderRefId,
byte[] message,
com.sun.sgs.impl.service.channel.ChannelImpl.EventQueue eventQueue,
boolean isChannelMember)
- Constructs a send event with the given
senderRefId and
message.
- Parameters:
senderRefId - a sender's session ID, or nullmessage - a messageeventQueue - the channel's event queueisChannelMember - true if the sender is currently
known to be a member of the associated channel
serviceEvent
public boolean serviceEvent(ChannelImpl channel)
- Services this event (taken from the head of the event queue) for
the specified
channel, and returns true if the
event has completed processing and can be removed from the event
queue.
- Specified by:
serviceEvent in class ChannelImpl.ChannelEvent
getCost
int getCost()
- Use the message length as the cost for sending messages.
- Overrides:
getCost in class ChannelImpl.ChannelEvent
- Returns:
- the cost of this event
toString
public String toString()
-
- Overrides:
toString in class Object
Copyright © 2010 The RedDwarf Authors. All rights reserved
Copyright © 2007-2010 Sun Microsystems, Inc. All rights reserved