IM269 Coursework 3: HitCounter.java


// IM269 - Coursework 3: RMI Client/Server
// Semester A, 7th December 1998
// Eamonn Martin (BSc Computing)
// Student ID: 96/D59682
// efm001@unl.ac.uk

// RMI Hit Counter Interface

package hitter;

import java.rmi.*;
import java.util.Date;

public interface HitCounter extends Remote {

	// Data structure returned by getInfo() (bulk data transfer)
	public class Info implements java.io.Serializable {
		String logfile = null;		// Log filename
		Date created = null;		// Log creation date
		String url = null;		// Target URL
		int hits = 0;			// Hit-count for URL
	}

	// Update and return hit-count for url (no log-info)
	public int getHits(String url, String log) throws RemoteException;

	// Update hit-count for url (if !null) and return log-info
	public Info getInfo(String url, String log) throws RemoteException;
}

Go To: IM269: Programming The Internet