Lightweight Bartering Grid

lbg.searchengine.service
Class SimulatedSearchEngineHandle

java.lang.Object
  extended by lbg.searchengine.service.SimulatedSearchEngineHandle
All Implemented Interfaces:
SearchEngineHandle

public class SimulatedSearchEngineHandle
extends java.lang.Object
implements SearchEngineHandle

Simulated handle to the search engine.

Since:
2007-03-21
Author:
Xavier Dalem

Constructor Summary
SimulatedSearchEngineHandle(SimulatedSearchEngineService service)
           
 
Method Summary
 void add(ExternalPeerHandle handle)
          Adds a handle to this SearchEngine.
 SearchEngineResponse getHandles()
          Gets all handles that this engine currently knows.
 SearchEngineResponse getHandles(long since)
          Gets handles newer than a specified time.
 java.lang.String id()
          Returns this engine's ID.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimulatedSearchEngineHandle

public SimulatedSearchEngineHandle(SimulatedSearchEngineService service)
                            throws GridException
Throws:
GridException
Method Detail

add

public void add(ExternalPeerHandle handle)
         throws GridException
Description copied from interface: SearchEngineHandle
Adds a handle to this SearchEngine. The handle's state will be checked before addition.

Specified by:
add in interface SearchEngineHandle
Parameters:
handle - The handle to add
Throws:
GridException - If the handle is invalid

getHandles

public SearchEngineResponse getHandles()
                                throws GridException
Description copied from interface: SearchEngineHandle
Gets all handles that this engine currently knows.

Specified by:
getHandles in interface SearchEngineHandle
Returns:
A structured list of handles
Throws:
GridException

getHandles

public SearchEngineResponse getHandles(long since)
                                throws GridException
Description copied from interface: SearchEngineHandle
Gets handles newer than a specified time.

Specified by:
getHandles in interface SearchEngineHandle
Parameters:
since - Timestamp of the last response
Returns:
A structured list of handles
Throws:
GridException

id

public java.lang.String id()
Description copied from interface: SearchEngineHandle
Returns this engine's ID.

Specified by:
id in interface SearchEngineHandle

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Lightweight Bartering Grid

Copyright (c) 2005-2008, Cyril Briquet, parts Xavier Dalem.