/**
 * Copyright (c) 2001/2003 Distributed Systems Research Group.
 * All rights reserved.
 *
 * For more information on Distributed Systems Research Group (DSRG),
 * please see <http://www.ics.agh.edu.pl/>.
 *
 * @author radzisz
 * file name: BoardServer.java
 *
 */
package edu.agh.sr.madej;

import java.net.MalformedURLException;
import java.rmi.AlreadyBoundException;
import java.rmi.Naming;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
import java.rmi.RMISecurityManager;
import java.util.Date;

/**
 * Klasa serwera
 */
public class NoteBoardServer {

	/**
 	 * Metoda pozwalajaca na uruchomienie programu
 	 *
 	 * @param args tablica argumentow
 	 */
	public static void main(String[] args) {
		new NoteBoardServer();
	}

	/**
 	 * Konstruktor bezargumentowy.
 	 */
	NoteBoardServer() {
		NoteBoard noteBoard = new NoteBoardImpl();
		try {
			UnicastRemoteObject.exportObject(noteBoard);
			Naming.rebind("madej", noteBoard);
		} catch (Exception e) {
			System.err.println(e);
		}
	}
}