candy.conf
Class Channel

java.lang.Object
  |
  +--candy.conf.Channel

public class Channel
extends java.lang.Object

Channel object used for sending/receiving Chat, Meeting,
and Whiteboard messages

Author:
Jeremy Mullendore (jeremy@cs.jhu.edu)

Constructor Summary
Channel(net.jini.space.JavaSpace space, java.lang.String ID, net.jini.core.transaction.server.TransactionManager m)
          construct channel
 
Method Summary
 void append(candy.core.packet.ChannelPacket message)
          append a message onto another Member's Channel
 void create(net.jini.core.transaction.Transaction txn)
          create the Channel and put in the JavaSpace
 candy.core.packet.ChannelPacket getMessage(net.jini.core.transaction.Transaction txn)
          get a message on this Channel
 java.util.Enumeration getMessages()
          get all messages on this Channel
 void killChannel(net.jini.core.transaction.Transaction txn)
          kill this Channel, removing it from the JavaSpace
 int readTail()
          read the tail of this Channel
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Channel

public Channel(net.jini.space.JavaSpace space,
               java.lang.String ID,
               net.jini.core.transaction.server.TransactionManager m)
construct channel
Method Detail

create

public void create(net.jini.core.transaction.Transaction txn)
            throws java.rmi.RemoteException,
                   net.jini.core.transaction.TransactionException
create the Channel and put in the JavaSpace

killChannel

public void killChannel(net.jini.core.transaction.Transaction txn)
kill this Channel, removing it from the JavaSpace

append

public void append(candy.core.packet.ChannelPacket message)
append a message onto another Member's Channel
Parameters:
message - the ChannelPacket to be appended

readTail

public int readTail()
read the tail of this Channel
Returns:
int representing the index of the last entry in this Channel

getMessage

public candy.core.packet.ChannelPacket getMessage(net.jini.core.transaction.Transaction txn)
get a message on this Channel
Returns:
a ChannelPacket containing a new message on this Channel

getMessages

public java.util.Enumeration getMessages()
get all messages on this Channel
Returns:
an Enumeration of the new messages (ChannelPacket)s