com.sun.sgs.impl.service.channel
Class ChannelImpl.SendEvent

java.lang.Object
  extended by com.sun.sgs.impl.service.channel.ChannelImpl.ChannelEvent
      extended by 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.


Field Summary
 
Fields inherited from class com.sun.sgs.impl.service.channel.ChannelImpl.ChannelEvent
timestamp
 
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()
          
 
Methods inherited from class com.sun.sgs.impl.service.channel.ChannelImpl.ChannelEvent
completed, isCompleted, isProcessing, processing, toStringFieldsOnly
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 null
message - a message
eventQueue - the channel's event queue
isChannelMember - true if the sender is currently known to be a member of the associated channel
Method Detail

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

RedDwarf, Version 0.10.1
2010-03-14 10:56:12

Copyright © 2010 The RedDwarf Authors. All rights reserved
Copyright © 2007-2010 Sun Microsystems, Inc. All rights reserved