org.directwebremoting.datasync
Class Directory

java.lang.Object
  extended by org.directwebremoting.datasync.Directory

public class Directory
extends java.lang.Object

A way to find StoreProviders that people wish to expose to the outside world. Warning. This API may well get wrapped in a Factory like the other DWR services. TODO: decide if we want to wrap this

Author:
Joe Walker [joe at getahead dot ltd dot uk]

Constructor Summary
Directory()
           
 
Method Summary
static
<T> StoreProvider<T>
getRegistration(java.lang.String storeId, java.lang.Class<T> type)
          Look up the StoreProvider by ID.
static void register(java.lang.String storeId, StoreProvider<?> provider)
          Register a StoreProvider for access by the outside world
static void unregister(java.lang.String storeId)
          Remove the registration of a StoreProvider
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Directory

public Directory()
Method Detail

register

public static void register(java.lang.String storeId,
                            StoreProvider<?> provider)
Register a StoreProvider for access by the outside world

Parameters:
storeId - The id by which the store can be reached
provider - The store provider that holds the Map of data

unregister

public static void unregister(java.lang.String storeId)
Remove the registration of a StoreProvider

Parameters:
storeId - The id by which the store can be reached

getRegistration

public static <T> StoreProvider<T> getRegistration(java.lang.String storeId,
                                                   java.lang.Class<T> type)
Look up the StoreProvider by ID.

Parameters:
storeId - The id by which the store can be reached
Returns:
The found StoreProvider or null if one is not found.

Copyright 2008