public class StandardInstrumentRegistry extends Object implements IStartStop, INotificationSupport, IAttributeSupport
The instrument registry loads and controls the instruments for Stage. First all instruments are loaded in the registry. When all instruments are available, they are started. In this process all instrument object are started, thereby starting their prerequisites.
| Modifier and Type | Class and Description |
|---|---|
class |
StandardInstrumentRegistry.Facade
The public portion of the InstrumentRegistry, which itself is never
leaked to client code.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
ACTION_DEFAULT |
static String |
ACTION_FAIL |
static String |
ACTION_IGNORE |
static String |
ACTION_SKIP |
static String |
XE_EXTENSIONPOINT |
static String |
XP_EXTENSIONPOINTS |
| Constructor and Description |
|---|
StandardInstrumentRegistry() |
| Modifier and Type | Method and Description |
|---|---|
void |
addInstrumentStore(IInstrumentStore store) |
void |
addNotificationListener(EventType type,
INotificationListener listener)
Add
listener to the collection of objects to be informed
when the receiver triggers an event of type name. |
IInstrument |
createInstrument(String id,
IInstrumentStore store) |
void |
flush() |
Object |
getAttribute(Object key)
Get an attribute value from the context
|
ClassLoader |
getClassLoader() |
IInstrumentRegistry |
getFacade() |
List<IInstrumentStore> |
getStores() |
boolean |
isReadOnly() |
boolean |
isStarted()
Answer
true if this object is started |
void |
load(IInstrumentStore store) |
StandardExtensionPoint |
lookupExtensionPoint(String name) |
StandardInstrument |
lookupInstrument(String name) |
void |
ppDefine(String symbolList) |
Set<String> |
ppGetDefines() |
boolean |
ppIsDefined(String symbolList)
true if ALL of the defines in expr are set. |
boolean |
ppIsNotDefined(String symbolList)
true if NONE of the defines in expr are set. |
void |
ppUndefine(String symbolList) |
void |
registerInstrument(StandardInstrument instrument)
Register a new instrument implementation along with its instrument in the
registry.
|
Object |
removeAttribute(Object key)
Remove an attribute binding in the context
|
void |
removeNotificationListener(EventType type,
INotificationListener listener)
Remove
listener from the collection of objects to be
informed about events of type name. |
Object |
setAttribute(Object key,
Object value)
Set the value of an attribute in the context
|
void |
start()
Start the component lifecycle.
|
void |
stop()
Stop the component lifecycle.
|
boolean |
stopRequested(Set visited)
Ask the component if it agrees to end its lifecycle at the very moment.
|
public static final String XE_EXTENSIONPOINT
public static final String XP_EXTENSIONPOINTS
public static final String ACTION_DEFAULT
public static final String ACTION_FAIL
public static final String ACTION_IGNORE
public static final String ACTION_SKIP
public void addInstrumentStore(IInstrumentStore store)
public void addNotificationListener(EventType type, INotificationListener listener)
INotificationSupportlistener to the collection of objects to be informed
when the receiver triggers an event of type name.addNotificationListener in interface INotificationSupporttype - The event type we are interested in.listener - The object to be informed about an event occurrencepublic IInstrument createInstrument(String id, IInstrumentStore store)
public void flush()
throws IOException
IOExceptionpublic Object getAttribute(Object key)
IAttributeSupportgetAttribute in interface IAttributeSupportkey - the name of the attribute to getkeypublic ClassLoader getClassLoader()
public IInstrumentRegistry getFacade()
public List<IInstrumentStore> getStores()
public boolean isReadOnly()
public boolean isStarted()
IStartStoptrue if this object is startedisStarted in interface IStartStoptrue if this object is started.public void load(IInstrumentStore store) throws InstrumentRegistryException
InstrumentRegistryExceptionpublic StandardExtensionPoint lookupExtensionPoint(String name)
public StandardInstrument lookupInstrument(String name)
public void ppDefine(String symbolList)
public boolean ppIsDefined(String symbolList)
true if ALL of the defines in expr are set.
Be especially aware that this is NOT equal to !ppIsNotDefined(expr)
symbolList - public boolean ppIsNotDefined(String symbolList)
true if NONE of the defines in expr are set.
Be especially aware that this is NOT equal to !ppIsDefined(expr)
symbolList - public void ppUndefine(String symbolList)
public void registerInstrument(StandardInstrument instrument) throws InstrumentRegistryException
The registry will start the instrument before registration.
instrument - InstrumentRegistryExceptionpublic Object removeAttribute(Object key)
IAttributeSupportremoveAttribute in interface IAttributeSupportkey - the name of the attribute to removekeypublic void removeNotificationListener(EventType type, INotificationListener listener)
INotificationSupportlistener from the collection of objects to be
informed about events of type name.removeNotificationListener in interface INotificationSupporttype - The event type we are no longer interested in.listener - The object registered for the event till now.public Object setAttribute(Object key, Object value)
IAttributeSupportsetAttribute in interface IAttributeSupportkey - the name of the attribute to setvalue - the new value the attributekeypublic void start()
IStartStopstart in interface IStartStoppublic void stop()
IStartStopstop in interface IStartStoppublic boolean stopRequested(Set visited)
IStartStopstopRequested in interface IStartStopvisited - The optional set of already visited objects in the stop
request cycle.Copyright © 2013 intarsys consulting GmbH. All Rights Reserved.