agenda.java

来自「ssd7 练习4」· Java 代码 · 共 78 行

JAVA
78 行
字号
import java.rmi.*;
import java.util.*;

/**
 * This interface extends java.rmi.Remote to allow functions to be used via RMI.
 * 
 * @author 
 * @version 1.0
 */
public interface Agenda extends java.rmi.Remote {

	/**
	 * Register a new user
	 * 
	 * @param username
	 *            new user's name
	 * @param password
	 *            new user's password
	 * @return boolean represent whether successfully registered
	 * @throws RemoteException
	 */
	public boolean register(String username, String password)
			throws RemoteException;

	/**
	 * Registered users may add meetings to their agenda
	 * 
	 * @param username
	 * @param password
	 * @param otherUser
	 * @param start
	 * @param end
	 * @param title
	 * @return
	 * @throws RemoteException
	 */
	public boolean add(String username, String password, String otherUser,
			Calendar start, Calendar end, String title) throws RemoteException;

	/**
	 * Registered users may look up all meetings in their agenda in a given
	 * interval of time
	 * 
	 * @param username
	 * @param password
	 * @param start
	 * @param end
	 * @return
	 * @throws RemoteException
	 */
	public Vector query(String username, String password, Calendar start,
			Calendar end) throws RemoteException;

	/**
	 * Registered users may delete entries that they have created.
	 * 
	 * @param username
	 * @param password
	 * @param meetingId
	 * @return
	 * @throws RemoteException
	 */
	public boolean delete(String username, String password, int meetingId)
			throws RemoteException;

	/**
	 * Registered users may delete entries that they have created.
	 * 
	 * @param username
	 * @param password
	 * @return
	 * @throws RemoteException
	 */
	public boolean clear(String username, String password)
			throws RemoteException;

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?