com.floranta.client
Interface MessageListener

All Superinterfaces:
TickListener
All Known Implementing Classes:
FlorantaApplet

public interface MessageListener
extends TickListener

The interface implemented by all parties interested in the messages that are received by the floranta messaging system

Author:
cscarlos

Method Summary
 void endRefresh(Persistence persistence)
          The end of transmission of a document
 void messageReceived(Message aMessage, Persistence persistence)
          Method called when a message is received.
 void startRefresh(Persistence persistence)
          The commencement of transmission of a document
 void tick()
          One second clock.
 void usersChanged(java.lang.String newUserCount)
          Method called when the user count changes
 

Method Detail

messageReceived

public void messageReceived(Message aMessage,
                            Persistence persistence)
Method called when a message is received. A message is a line of a document.

Parameters:
aMessage - Message received
persistence - The persistence of the message

usersChanged

public void usersChanged(java.lang.String newUserCount)
Method called when the user count changes

Parameters:
newUserCount - The number of users at the location

startRefresh

public void startRefresh(Persistence persistence)
The commencement of transmission of a document

Parameters:
persistence - The persistence of the message

endRefresh

public void endRefresh(Persistence persistence)
The end of transmission of a document

Parameters:
persistence - The persistence of the message

tick

public void tick()
One second clock. Clients can use this to count off seconds against soft state. This keeps the clients from having to run their own clock threads.

Specified by:
tick in interface TickListener