at.ac.tuwien.infosys.rnue.interfaces
Interface IHTTPServer

All Superinterfaces:
java.lang.Runnable

public interface IHTTPServer
extends java.lang.Runnable

An object implementing the IHTTPserver interface represents the HTTP server of a ShareMe peer.

A class implementing this interface should also provide a constructor taking a java.lang.Integer variable representing the HTTP port.


Method Summary
 void register(java.lang.String path, IHTTPServerEntry url)
          Register a URL with the HTTP component's database.
 void stop()
          Stop the HTTPServer thread from running.
 void unregister(java.lang.String path)
          Unregister a URL from the HTTP component's database.
 
Methods inherited from interface java.lang.Runnable
run
 

Method Detail

register

public void register(java.lang.String path,
                     IHTTPServerEntry url)
              throws ShareMeException
Register a URL with the HTTP component's database. This makes the URL available via the WWW server.

Parameters:
path - the absolute URL path on the server, e.g. /airline/aua
url - the class implementing the URL's functionality
Throws:
ShareMeException - If either path or server entry is null, or a handler for this path was already registered.

unregister

public void unregister(java.lang.String path)
                throws ShareMeException
Unregister a URL from the HTTP component's database. The URL is no longer available via the WWW server.

Parameters:
path - the absolute URL path on the server, e.g. /airline/aua
Throws:
ShareMeException - If path is null or no handler for this path was registered.

stop

public void stop()
Stop the HTTPServer thread from running.