public class DSPRegistry
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
DSPRegistry.Registration |
| Modifier and Type | Field and Description |
|---|---|
static boolean |
FIRST |
static boolean |
LAST |
protected static java.lang.ClassLoader |
loader |
protected java.util.List<DSPRegistry.Registration> |
registry
Define a map of known DSP classes.
|
| Constructor and Description |
|---|
DSPRegistry() |
| Modifier and Type | Method and Description |
|---|---|
D4DSP |
findMatchingDSP(java.lang.String path,
DapContext cxt) |
void |
register(java.lang.Class<? extends D4DSP> klass,
boolean last)
Register a DSP class.
|
void |
register(java.lang.String className,
boolean last)
Register a DSP, using its class string name.
|
boolean |
registered(java.lang.Class<? extends D4DSP> klass)
See if a specific DSP is registered
|
static void |
setLoader(java.lang.ClassLoader ldr) |
void |
unregister(java.lang.Class<? extends D4DSP> klass)
Unregister dsp.
|
public static final boolean LAST
public static final boolean FIRST
protected static java.lang.ClassLoader loader
protected java.util.List<DSPRegistry.Registration> registry
public static void setLoader(java.lang.ClassLoader ldr)
public void register(java.lang.String className,
boolean last)
throws DapException
className - Name of class that implements DSP.java.lang.IllegalAccessException - if class is not accessible.java.lang.InstantiationException - if class doesnt have a no-arg constructor.java.lang.ClassNotFoundException - if class not found.DapExceptionpublic void register(java.lang.Class<? extends D4DSP> klass, boolean last)
klass - Class that implements DSP.last - true=>insert at the end of the list; otherwise frontjava.lang.IllegalAccessException - if class is not accessible.java.lang.InstantiationException - if class doesnt have a no-arg constructor.java.lang.ClassCastException - if class doesnt implement DSP interface.public boolean registered(java.lang.Class<? extends D4DSP> klass)
klass - Class for which to searchpublic void unregister(java.lang.Class<? extends D4DSP> klass)
klass - Class for which to searchpublic D4DSP findMatchingDSP(java.lang.String path, DapContext cxt) throws DapException
path - DapException