Package org.nuxeo.runtime.management
Class ResourcePublisherService
java.lang.Object
org.nuxeo.runtime.model.DefaultComponent
org.nuxeo.runtime.management.ResourcePublisherService
- All Implemented Interfaces:
ResourcePublisher
,ResourcePublisherMBean
,Adaptable
,Component
,Extensible
,TimestampedService
public class ResourcePublisherService
extends DefaultComponent
implements ResourcePublisher, ResourcePublisherMBean
- Author:
- Stephane Lacoin (Nuxeo EP Software Engineer)
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected class
protected class
protected class
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
protected final ResourcePublisherService.FactoriesRegistry
static final ComponentName
protected final ResourcePublisherService.ResourcesRegistry
protected ServerLocatorService
static final String
static final String
protected final ResourcePublisherService.ShortcutsRegistry
protected boolean
Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
activate
(ComponentContext context) Activates the component.protected void
bindForTest
(MBeanServer server, ObjectName name, Object instance, Class<?> clazz) void
bindResource
(ObjectName name) void
void
deactivate
(ComponentContext context) Deactivates the component.protected void
protected void
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
void
unregisterContribution
(Object contribution, String extensionPoint, ComponentInstance contributor) void
unregisterResource
(String shortName, String qualifiedName) void
unregisterShortcut
(String shortName) Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
addRuntimeMessage, addRuntimeMessage, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerExtension, setLastModified, setModifiedNow, setName, unregister, unregisterExtension
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.nuxeo.runtime.model.Component
getApplicationStartedOrder
-
Field Details
-
SERVICES_EXT_KEY
- See Also:
-
FACTORIES_EXT_KEY
- See Also:
-
SHORTCUTS_EXT_KEY
- See Also:
-
NAME
-
shortcutsRegistry
-
factoriesRegistry
-
resourcesRegistry
-
serverLocatorService
-
started
protected boolean started
-
-
Constructor Details
-
ResourcePublisherService
public ResourcePublisherService()
-
-
Method Details
-
registerContribution
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) - Overrides:
registerContribution
in classDefaultComponent
-
unregisterContribution
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) - Overrides:
unregisterContribution
in classDefaultComponent
-
registerResource
public void registerResource(String shortName, String qualifiedName, Class<?> managementClass, Object instance) - Specified by:
registerResource
in interfaceResourcePublisher
-
unregisterResource
- Specified by:
unregisterResource
in interfaceResourcePublisher
-
registerShortcut
-
unregisterShortcut
-
getShortcutsName
- Specified by:
getShortcutsName
in interfaceResourcePublisher
-
getResourcesName
- Specified by:
getResourcesName
in interfaceResourcePublisher
- Specified by:
getResourcesName
in interfaceResourcePublisherMBean
-
lookupName
- Specified by:
lookupName
in interfaceResourcePublisher
-
doBindResources
protected void doBindResources() -
bindResources
public void bindResources()- Specified by:
bindResources
in interfaceResourcePublisherMBean
-
doUnbindResources
protected void doUnbindResources() -
unbindResources
public void unbindResources()- Specified by:
unbindResources
in interfaceResourcePublisherMBean
-
start
Description copied from interface:Component
Start the component. This method is called after all the components were resolved and activated- Specified by:
start
in interfaceComponent
- Overrides:
start
in classDefaultComponent
-
stop
Description copied from interface:Component
Stop the component.- Specified by:
stop
in interfaceComponent
- Overrides:
stop
in classDefaultComponent
-
activate
Description copied from interface:Component
Activates the component.This method is called by the runtime when a component is activated.
- Specified by:
activate
in interfaceComponent
- Overrides:
activate
in classDefaultComponent
- Parameters:
context
- the runtime context
-
deactivate
Description copied from interface:Component
Deactivates the component.This method is called by the runtime when a component is deactivated.
- Specified by:
deactivate
in interfaceComponent
- Overrides:
deactivate
in classDefaultComponent
- Parameters:
context
- the runtime context
-
bindResource
-
unbindResource
-
bindForTest
protected void bindForTest(MBeanServer server, ObjectName name, Object instance, Class<?> clazz) throws JMException, InvalidTargetObjectTypeException
-