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
Nested ClassesModifier and TypeClassDescriptionprotected classprotected classprotected class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected final ResourcePublisherService.FactoriesRegistrystatic final ComponentNameprotected final ResourcePublisherService.ResourcesRegistryprotected ServerLocatorServicestatic final Stringstatic final Stringprotected final ResourcePublisherService.ShortcutsRegistryprotected booleanFields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(ComponentContext context) Activates the component.protected voidbindForTest(MBeanServer server, ObjectName name, Object instance, Class<?> clazz) voidbindResource(ObjectName name) voidvoiddeactivate(ComponentContext context) Deactivates the component.protected voidprotected voidlookupName(String name) voidregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) voidregisterResource(String shortName, String qualifiedName, Class<?> managementClass, Object instance) voidregisterShortcut(String shortName, String qualifiedName) voidstart(ComponentContext context) Start the component.voidstop(ComponentContext context) Stop the component.voidunbindResource(ObjectName name) voidvoidunregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) voidunregisterResource(String shortName, String qualifiedName) voidunregisterShortcut(String shortName) Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
addRuntimeMessage, addRuntimeMessage, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerExtension, setLastModified, setModifiedNow, setName, unregister, unregisterExtensionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
registerContributionin classDefaultComponent
-
unregisterContribution
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) - Overrides:
unregisterContributionin classDefaultComponent
-
registerResource
public void registerResource(String shortName, String qualifiedName, Class<?> managementClass, Object instance) - Specified by:
registerResourcein interfaceResourcePublisher
-
unregisterResource
- Specified by:
unregisterResourcein interfaceResourcePublisher
-
registerShortcut
-
unregisterShortcut
-
getShortcutsName
- Specified by:
getShortcutsNamein interfaceResourcePublisher
-
getResourcesName
- Specified by:
getResourcesNamein interfaceResourcePublisher- Specified by:
getResourcesNamein interfaceResourcePublisherMBean
-
lookupName
- Specified by:
lookupNamein interfaceResourcePublisher
-
doBindResources
protected void doBindResources() -
bindResources
public void bindResources()- Specified by:
bindResourcesin interfaceResourcePublisherMBean
-
doUnbindResources
protected void doUnbindResources() -
unbindResources
public void unbindResources()- Specified by:
unbindResourcesin interfaceResourcePublisherMBean
-
start
Description copied from interface:ComponentStart the component. This method is called after all the components were resolved and activated- Specified by:
startin interfaceComponent- Overrides:
startin classDefaultComponent
-
stop
Description copied from interface:ComponentStop the component.- Specified by:
stopin interfaceComponent- Overrides:
stopin classDefaultComponent
-
activate
Description copied from interface:ComponentActivates the component.This method is called by the runtime when a component is activated.
- Specified by:
activatein interfaceComponent- Overrides:
activatein classDefaultComponent- Parameters:
context- the runtime context
-
deactivate
Description copied from interface:ComponentDeactivates the component.This method is called by the runtime when a component is deactivated.
- Specified by:
deactivatein interfaceComponent- Overrides:
deactivatein classDefaultComponent- Parameters:
context- the runtime context
-
bindResource
-
unbindResource
-
bindForTest
protected void bindForTest(MBeanServer server, ObjectName name, Object instance, Class<?> clazz) throws JMException, InvalidTargetObjectTypeException
-