com.sun.sgs.impl.service.session
Class ClientSessionImpl.SendEvent

java.lang.Object
  extended by com.sun.sgs.impl.service.session.ClientSessionImpl.SendEvent
All Implemented Interfaces:
ManagedObject, Serializable
Enclosing class:
ClientSessionImpl

static class ClientSessionImpl.SendEvent
extends Object

A client session 'send' event, enqueued by a ClientSession.send invocation. When this event commits, a task is scheduled to deliver the message, specified during construction, to the client session.


Field Summary
(package private)  Delivery delivery
           
(package private)  byte[] message
           
 
Constructor Summary
ClientSessionImpl.SendEvent(byte[] message, Delivery delivery)
          Constructs a send event with the given message.
 
Method Summary
(package private)  int getCost()
          Use the message length as the cost for sending messages.
(package private)  void serviceEvent(com.sun.sgs.impl.service.session.ClientSessionImpl.EventQueue eventQueue, ClientSessionServiceImpl sessionService, ClientSessionHandler handler)
          Services this event, taken from the head of the given eventQueue.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

message

final byte[] message

delivery

final Delivery delivery
Constructor Detail

ClientSessionImpl.SendEvent

ClientSessionImpl.SendEvent(byte[] message,
                            Delivery delivery)
Constructs a send event with the given message.

Method Detail

serviceEvent

void serviceEvent(com.sun.sgs.impl.service.session.ClientSessionImpl.EventQueue eventQueue,
                  ClientSessionServiceImpl sessionService,
                  ClientSessionHandler handler)
Services this event, taken from the head of the given eventQueue.


getCost

int getCost()
Use the message length as the cost for sending messages.

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