public static interface DatabaseClientFactory.HandleFactoryRegistry
A HandleFactoryRegistry associates IO representation classes with handle factories. The API uses the registry to create a content handle to act as an adapter for a supported IO representation class. The IO class and its instances can then be passed directly to convenience methods. The default registry associates the content handles provided by the API and the supported IO representation classes. Create instances of this interface only if you need to modify the default registry.
| Modifier and Type | Method and Description |
|---|---|
DatabaseClientFactory.HandleFactoryRegistry |
copy()
Create a copy of the current registry
|
boolean |
isRegistered(Class<?> ioClass)
Returns whether the registry associates the class with a factory.
|
Set<Class<?>> |
listRegistered()
Returns the classes for the IO representations for which a factory has been registered.
|
<C> ContentHandle<C> |
makeHandle(Class<C> type)
Creates a ContentHandle if the registry has a factory for the class of the IO representation.
|
void |
register(ContentHandleFactory factory)
Associates a factory for content handles with the classes for IO representations known to the factory.
|
void |
register(ContentHandleFactory factory,
Class<?>... ioClasses)
Associates a factory for content handles with the specified classes for IO representations.
|
void |
unregister(Class<?>... ioClasses)
Removes the classes from the registry
|
void register(ContentHandleFactory factory)
Associates a factory for content handles with the classes for IO representations known to the factory.
factory - a factory for creating content handle instancesvoid register(ContentHandleFactory factory, Class<?>... ioClasses)
Associates a factory for content handles with the specified classes for IO representations.
factory - a factory for creating content handle instancesioClasses - the IO classes for which the factory should create handlesboolean isRegistered(Class<?> ioClass)
Returns whether the registry associates the class with a factory.
ioClass - the class for an IO representationSet<Class<?>> listRegistered()
Returns the classes for the IO representations for which a factory has been registered.
<C> ContentHandle<C> makeHandle(Class<C> type)
Creates a ContentHandle if the registry has a factory for the class of the IO representation.
C - the registered type for the returned handletype - the class for an IO representationvoid unregister(Class<?>... ioClasses)
Removes the classes from the registry
ioClasses - one or more registered classes for an IO representationDatabaseClientFactory.HandleFactoryRegistry copy()
Create a copy of the current registry
Copyright © 2013-2017 MarkLogic Corporation.