public class ResourcePublisherService extends DefaultComponent implements ResourcePublisher, ResourcePublisherMBean
Modifier and Type | Class and Description |
---|---|
protected class |
ResourcePublisherService.FactoriesRegistry |
protected class |
ResourcePublisherService.ResourcesRegistry |
protected class |
ResourcePublisherService.ShortcutsRegistry |
Modifier and Type | Field and Description |
---|---|
static String |
FACTORIES_EXT_KEY |
protected ResourcePublisherService.FactoriesRegistry |
factoriesRegistry |
static ComponentName |
NAME |
protected ResourcePublisherService.ResourcesRegistry |
resourcesRegistry |
protected ServerLocatorService |
serverLocatorService |
static String |
SERVICES_EXT_KEY |
static String |
SHORTCUTS_EXT_KEY |
protected ResourcePublisherService.ShortcutsRegistry |
shortcutsRegistry |
protected boolean |
started |
lastModified
Constructor and Description |
---|
ResourcePublisherService() |
Modifier and Type | Method and Description |
---|---|
void |
activate(ComponentContext context)
Activates the component.
|
protected void |
bindForTest(MBeanServer server,
ObjectName name,
Object instance,
Class<?> clazz) |
void |
bindResource(ObjectName name) |
void |
bindResources() |
void |
deactivate(ComponentContext context)
Deactivates the component.
|
protected void |
doBindResources() |
protected void |
doUnbindResources() |
Set<ObjectName> |
getResourcesName() |
Set<String> |
getShortcutsName() |
ObjectName |
lookupName(String name) |
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
void |
registerResource(String shortName,
String qualifiedName,
Class<?> managementClass,
Object instance) |
void |
registerShortcut(String shortName,
String qualifiedName) |
void |
start(ComponentContext context)
Start the component.
|
void |
stop(ComponentContext context)
Stop the component.
|
void |
unbindResource(ObjectName name) |
void |
unbindResources() |
void |
unregisterContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
void |
unregisterResource(String shortName,
String qualifiedName) |
void |
unregisterShortcut(String shortName) |
getAdapter, getLastModified, registerExtension, setLastModified, setModifiedNow, unregisterExtension
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applicationStarted, getApplicationStartedOrder
public static final String SERVICES_EXT_KEY
public static final String FACTORIES_EXT_KEY
public static final String SHORTCUTS_EXT_KEY
public static final ComponentName NAME
protected final ResourcePublisherService.ShortcutsRegistry shortcutsRegistry
protected final ResourcePublisherService.FactoriesRegistry factoriesRegistry
protected final ResourcePublisherService.ResourcesRegistry resourcesRegistry
protected ServerLocatorService serverLocatorService
protected boolean started
public ResourcePublisherService()
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution
in class DefaultComponent
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
unregisterContribution
in class DefaultComponent
public void registerResource(String shortName, String qualifiedName, Class<?> managementClass, Object instance)
registerResource
in interface ResourcePublisher
public void unregisterResource(String shortName, String qualifiedName)
unregisterResource
in interface ResourcePublisher
public void registerShortcut(String shortName, String qualifiedName)
public void unregisterShortcut(String shortName)
public Set<String> getShortcutsName()
getShortcutsName
in interface ResourcePublisher
public Set<ObjectName> getResourcesName()
getResourcesName
in interface ResourcePublisher
getResourcesName
in interface ResourcePublisherMBean
public ObjectName lookupName(String name)
lookupName
in interface ResourcePublisher
protected void doBindResources()
public void bindResources()
bindResources
in interface ResourcePublisherMBean
protected void doUnbindResources()
public void unbindResources()
unbindResources
in interface ResourcePublisherMBean
public void start(ComponentContext context)
Component
start
in interface Component
start
in class DefaultComponent
public void stop(ComponentContext context)
Component
stop
in interface Component
stop
in class DefaultComponent
public void activate(ComponentContext context)
Component
This method is called by the runtime when a component is activated.
activate
in interface Component
activate
in class DefaultComponent
context
- the runtime contextpublic void deactivate(ComponentContext context)
Component
This method is called by the runtime when a component is deactivated.
deactivate
in interface Component
deactivate
in class DefaultComponent
context
- the runtime contextpublic void bindResource(ObjectName name)
public void unbindResource(ObjectName name)
protected void bindForTest(MBeanServer server, ObjectName name, Object instance, Class<?> clazz) throws JMException, InvalidTargetObjectTypeException
Copyright © 2018 Nuxeo. All rights reserved.