import java.rmi.*;

/**
 * Java Chat - A simple chatroom application - Callback Interface.
 *
 * This is the Callback interface. It provides a client method which
 * the server may use to callback when new messages appear.
 *
 * @author Sean Handley
 * @version November, 2006
 */
public interface ICallback extends Remote
{
    /**
     * A method which the server can use for callbacks.
     * 
     * @throws java.rmi.RemoteException
     */
    public void doCallback()
        throws RemoteException;
    /**
     * A method used to extract the client's username.
     * 
     * @return username
     * @throws java.rmi.RemoteException
     */
    public String getUsername()
        throws RemoteException;
    /**
     * A method used to set the client's username.
     * 
     * @param username
     * @throws java.rmi.RemoteException
     */
    public void setUsername(String username)
        throws RemoteException;
    /**
     * Force the client to log out.
     * 
     * @throws java.rmi.RemoteException
     */
    public void forceLogout()
        throws RemoteException;
}