gvsu/cs656/lab2/src/PresenceService.java
josh 5c35389192 added lab2 directory
git-svn-id: svn://anubis/gvsu@138 45c1a28c-8058-47b2-ae61-ca45b979098e
2008-09-13 19:56:21 +00:00

49 lines
1.6 KiB
Java

/**
* <p>Title: Lab2</p>
* <p>Description: Simple Chat System </p>
* <p>Copyright: Copyright (c) 2007</p>
* <p>Company: Grand Vally State University</p>
* @author Jonathan Engelsma
* @version 2.0
*/
import java.rmi.Remote;
import java.rmi.RemoteException;
/**
* The abstract interface that is to implemented by a remote
* presence server. ChatClients will use this interface to
* register themselves with the presence server, and also to
* determine and locate other users who are available for chat
* sessions.
*/
public interface PresenceService extends Remote {
/**
* Register a client with the presence service.
* @param reg The information that is to be registered about a client.
*/
void register(RegistrationInfo reg) throws RemoteException;
/**
* Unregister a client from the presence service. Client must call this
* method when it terminates execution.
* @param userName The name of the user to be unregistered.
*/
void unregister(String userName) throws RemoteException;
/**
* Lookup the registration information of another client.
* @name The name of the client that is to be located.
* @return The RegistrationInfo info for the client, or null if
* no such client was found.
*/
RegistrationInfo lookup(String name) throws RemoteException;
/**
* Determine all users who are currently registered in the system.
* @return An array of RegistrationInfo objects - one for each client
* present in the system.
*/
RegistrationInfo[] listRegisteredUsers() throws RemoteException;
}