Purple Code

com.purpletech.message.server
Interface Client

All Known Implementing Classes:
RemoteClient

public interface Client

This is the Client as seen by the server. It processes input and output for a single client. It's really a client proxy (local stub).

Version:
$Id: Client.java,v 1.2 2001/10/30 12:20:52 alex Exp $
Author:
Alex

Method Summary
 void close()
          tell this client to go bye-bye.
 int getID()
           
 long getLastReceived()
          system (local) time when the last message was received from this client
 long getLastSent()
          system (local) time when the last message was sent to this client
 Message receiveMessage()
          the server calls this method to find out if a message is available and, if so, to receive it
 void sendMessage(Message m)
          the server calls sendMessage to make this client stub send a message to its client
 

Method Detail

getID

public int getID()

sendMessage

public void sendMessage(Message m)
                 throws java.io.IOException
the server calls sendMessage to make this client stub send a message to its client

java.io.IOException

receiveMessage

public Message receiveMessage()
                       throws java.io.IOException
the server calls this method to find out if a message is available and, if so, to receive it

Returns:
the next message, or null if no message available
java.io.IOException

close

public void close()
tell this client to go bye-bye. What happens if it's in the middle of receiving or sending a message in another thread? I don't know.


getLastSent

public long getLastSent()
system (local) time when the last message was sent to this client


getLastReceived

public long getLastReceived()
system (local) time when the last message was received from this client


Documentation generated March 5 2003