net.i2p.client.naming

## Class DummyNamingService

- java.lang.Object
- - net.i2p.client.naming.NamingService
  - - net.i2p.client.naming.DummyNamingService

- Direct Known Subclasses:
    BlockfileNamingService, EepGetNamingService, ExecNamingService, MetaNamingService

       class DummyNamingService
      extends NamingService

  A Dummy naming service that can only handle base64 and b32 destinations.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static int` | `BASE32_HASH_LENGTH`
    `protected static int` | `CACHE_MAX_SIZE`
    `static int` | `DEST_SIZE`
    `static String` | `PROP_B32`

    - ### Fields inherited from class net.i2p.client.naming.NamingService

      `_context, _listeners, _log, _updaters, PROP_IMPL`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `DummyNamingService(I2PAppContext context)` The naming service should only be constructed and accessed through the application context.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected static void` | `clearCache()`
    `protected static Destination` | `getCache(String s)`
    `Destination` | `lookup(String hostname, Properties lookupOptions, Properties storedOptions)` Same as lookup(hostname) but with in and out options Note that whether this (and lookup(hostname)) resolve B32 addresses is NamingService-specific.
    `protected static void` | `putCache(String s, Destination d)` Provide basic static caching for all services
    `protected static void` | `removeCache(String s)`

    - ### Methods inherited from class net.i2p.client.naming.NamingService

      `addNamingService, addNamingService, createInstance, getBase64Entries, getConfiguration, getEntries, getEntries, getName, getNames, getNames, getNamingServices, getParent, lookup, lookup, lookupBase32, lookupBase64, put, put, putAll, putIfAbsent, putIfAbsent, registerListener, registerUpdater, remove, remove, removeNamingService, requestUpdate, reverseLookup, reverseLookup, reverseLookup, setConfiguration, shutdown, size, size, start, toString, unregisterListener, unregisterUpdater, update`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### BASE32_HASH_LENGTH

          protected static final int BASE32_HASH_LENGTH

      See Also:
        Constant Field Values

    - #### PROP_B32

          public static final String PROP_B32

      See Also:
        Constant Field Values

    - #### CACHE_MAX_SIZE

          protected static final int CACHE_MAX_SIZE

      See Also:
        Constant Field Values

    - #### DEST_SIZE

          public static final int DEST_SIZE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### DummyNamingService

          protected DummyNamingService(I2PAppContext context)

      The naming service should only be constructed and accessed through the application context. This constructor should only be used by the appropriate application context itself.

  - ### Method Detail

    - #### lookup

          public Destination lookup(String hostname,
                           Properties lookupOptions,
                           Properties storedOptions)

      Description copied from class: `NamingService`
      Same as lookup(hostname) but with in and out options Note that whether this (and lookup(hostname)) resolve B32 addresses is NamingService-specific.
      Specified by:
        `lookup` in class `NamingService`
      Parameters:
        `hostname` - mixed case as it could be a key
        `lookupOptions` - input parameter, NamingService-specific, can be null
        `storedOptions` - output parameter, NamingService-specific, any stored properties will be added if non-null
      Returns:
        dest or null
      Since:
        0.8.7

    - #### putCache

          protected static void putCache(String s,
                      Destination d)

      Provide basic static caching for all services
      Parameters:
        `s` - case-sensitive, could be a hostname or a full b64 string

    - #### getCache

          protected static Destination getCache(String s)

      Parameters:
        `s` - case-sensitive, could be a hostname or a full b64 string
      Returns:
        cached dest or null

    - #### removeCache

          protected static void removeCache(String s)

      Parameters:
        `s` - case-sensitive, could be a hostname or a full b64 string
      Since:
        0.8.7

    - #### clearCache

          protected static void clearCache()

      Since:
        0.8.1