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


public interface IShareMe

The IShareMe interface specifies the methods to start and stop your ShareMe peer as well as the method that allows users of this class to query the other peers.

A class implementing this interface should also provide a constructor taking a java.util.Properties object as argument and should throw the at.ac.tuwien.infosys.rnue.helpers.ShareMeException exception in case of an error (e.g., in case no properties are specified).


Method Summary
 ISearchResult search(java.lang.String searchString)
          This method queries all known hosts (i.e., all the hosts stored in the host list) for the given search string.
 void start()
          This method starts all the threads used by your ShareMe peer and should throw the at.ac.tuwien.infosys.rnue.helpers.ShareMeException in case of an error.
 void stop()
          This method stops all the threads used by your ShareMe peer and should throw the at.ac.tuwien.infosys.rnue.helpers.ShareMeException in case of an error.
 

Method Detail

start

public void start()
           throws ShareMeException
This method starts all the threads used by your ShareMe peer and should throw the at.ac.tuwien.infosys.rnue.helpers.ShareMeException in case of an error.

ShareMeException

stop

public void stop()
          throws ShareMeException
This method stops all the threads used by your ShareMe peer and should throw the at.ac.tuwien.infosys.rnue.helpers.ShareMeException in case of an error. This method should only exit after all of the threads have been terminated.

ShareMeException

search

public ISearchResult search(java.lang.String searchString)
                     throws ShareMeException
This method queries all known hosts (i.e., all the hosts stored in the host list) for the given search string.

Parameters:
searchString - a string describing the information we are looking for
Returns:
search result
Throws:
ShareMeException - If the search string is null.