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