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 SummaryNested Classes Modifier and Type Class Description protected classResourcePublisherService.FactoriesRegistryprotected classResourcePublisherService.ResourcesRegistryprotected classResourcePublisherService.ShortcutsRegistry
 - 
Field SummaryFields Modifier and Type Field Description static StringFACTORIES_EXT_KEYprotected ResourcePublisherService.FactoriesRegistryfactoriesRegistrystatic ComponentNameNAMEprotected ResourcePublisherService.ResourcesRegistryresourcesRegistryprotected ServerLocatorServiceserverLocatorServicestatic StringSERVICES_EXT_KEYstatic StringSHORTCUTS_EXT_KEYprotected ResourcePublisherService.ShortcutsRegistryshortcutsRegistryprotected booleanstarted- 
Fields inherited from class org.nuxeo.runtime.model.DefaultComponentlastModified, name
 
- 
 - 
Constructor SummaryConstructors Constructor Description ResourcePublisherService()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivate(ComponentContext context)Activates the component.protected voidbindForTest(MBeanServer server, ObjectName name, Object instance, Class<?> clazz)voidbindResource(ObjectName name)voidbindResources()voiddeactivate(ComponentContext context)Deactivates the component.protected voiddoBindResources()protected voiddoUnbindResources()Set<ObjectName>getResourcesName()Set<String>getShortcutsName()ObjectNamelookupName(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)voidunbindResources()voidunregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)voidunregisterResource(String shortName, String qualifiedName)voidunregisterShortcut(String shortName)- 
Methods inherited from class org.nuxeo.runtime.model.DefaultComponentaddRuntimeMessage, addRuntimeMessage, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerExtension, setLastModified, setModifiedNow, setName, unregister, unregisterExtension
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.nuxeo.runtime.model.ComponentapplicationStarted, getApplicationStartedOrder
 
- 
 
- 
- 
- 
Field Detail- 
SERVICES_EXT_KEYpublic static final String SERVICES_EXT_KEY - See Also:
- Constant Field Values
 
 - 
FACTORIES_EXT_KEYpublic static final String FACTORIES_EXT_KEY - See Also:
- Constant Field Values
 
 - 
SHORTCUTS_EXT_KEYpublic static final String SHORTCUTS_EXT_KEY - See Also:
- Constant Field Values
 
 - 
NAMEpublic static final ComponentName NAME 
 - 
shortcutsRegistryprotected final ResourcePublisherService.ShortcutsRegistry shortcutsRegistry 
 - 
factoriesRegistryprotected final ResourcePublisherService.FactoriesRegistry factoriesRegistry 
 - 
resourcesRegistryprotected final ResourcePublisherService.ResourcesRegistry resourcesRegistry 
 - 
serverLocatorServiceprotected ServerLocatorService serverLocatorService 
 - 
startedprotected boolean started 
 
- 
 - 
Constructor Detail- 
ResourcePublisherServicepublic ResourcePublisherService() 
 
- 
 - 
Method Detail- 
registerContributionpublic void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) - Overrides:
- registerContributionin class- DefaultComponent
 
 - 
unregisterContributionpublic void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) - Overrides:
- unregisterContributionin class- DefaultComponent
 
 - 
registerResourcepublic void registerResource(String shortName, String qualifiedName, Class<?> managementClass, Object instance) - Specified by:
- registerResourcein interface- ResourcePublisher
 
 - 
unregisterResourcepublic void unregisterResource(String shortName, String qualifiedName) - Specified by:
- unregisterResourcein interface- ResourcePublisher
 
 - 
registerShortcutpublic void registerShortcut(String shortName, String qualifiedName) 
 - 
unregisterShortcutpublic void unregisterShortcut(String shortName) 
 - 
getShortcutsNamepublic Set<String> getShortcutsName() - Specified by:
- getShortcutsNamein interface- ResourcePublisher
 
 - 
getResourcesNamepublic Set<ObjectName> getResourcesName() - Specified by:
- getResourcesNamein interface- ResourcePublisher
- Specified by:
- getResourcesNamein interface- ResourcePublisherMBean
 
 - 
lookupNamepublic ObjectName lookupName(String name) - Specified by:
- lookupNamein interface- ResourcePublisher
 
 - 
doBindResourcesprotected void doBindResources() 
 - 
bindResourcespublic void bindResources() - Specified by:
- bindResourcesin interface- ResourcePublisherMBean
 
 - 
doUnbindResourcesprotected void doUnbindResources() 
 - 
unbindResourcespublic void unbindResources() - Specified by:
- unbindResourcesin interface- ResourcePublisherMBean
 
 - 
startpublic void start(ComponentContext context) Description copied from interface:ComponentStart the component. This method is called after all the components were resolved and activated- Specified by:
- startin interface- Component
- Overrides:
- startin class- DefaultComponent
 
 - 
stoppublic void stop(ComponentContext context) Description copied from interface:ComponentStop the component.- Specified by:
- stopin interface- Component
- Overrides:
- stopin class- DefaultComponent
 
 - 
activatepublic void activate(ComponentContext context) Description copied from interface:ComponentActivates the component.This method is called by the runtime when a component is activated. - Specified by:
- activatein interface- Component
- Overrides:
- activatein class- DefaultComponent
- Parameters:
- context- the runtime context
 
 - 
deactivatepublic void deactivate(ComponentContext context) Description copied from interface:ComponentDeactivates the component.This method is called by the runtime when a component is deactivated. - Specified by:
- deactivatein interface- Component
- Overrides:
- deactivatein class- DefaultComponent
- Parameters:
- context- the runtime context
 
 - 
bindResourcepublic void bindResource(ObjectName name) 
 - 
unbindResourcepublic void unbindResource(ObjectName name) 
 - 
bindForTestprotected void bindForTest(MBeanServer server, ObjectName name, Object instance, Class<?> clazz) throws JMException, InvalidTargetObjectTypeException 
 
- 
 
-