Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Lightweight Bartering Grid
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## lbg.searchengine.service
Class SimulatedSearchEngineService

    java.lang.Object
      lbg.searchengine.service.SimulatedSearchEngineService

All Implemented Interfaces:
  SearchEngineHandle, SearchEngineService

    public class SimulatedSearchEngineService

extends java.lang.Object
implements SearchEngineService

Simulated service for the search engine

Since:
  2007-03-21
Author:
  Xavier Dalem

Constructor Summary
`protected` | `SimulatedSearchEngineService(SearchEngineServer server)`

Method Summary
`void` | `add(ExternalPeerHandle handle)` Adds a handle to this SearchEngine.
`SearchEngineHandle` | `createHandle()`
`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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SimulatedSearchEngineService

    protected SimulatedSearchEngineService(SearchEngineServer server)
                                    throws GridException

Throws:
  `GridException`

Method Detail

### createHandle

    public SearchEngineHandle createHandle()
                                    throws GridException

  Specified by:
    `createHandle` in interface `SearchEngineService`
  Throws:
    `GridException`

### 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Lightweight Bartering Grid
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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