Class AbstractConnector.Library
- java.lang.Object
-
- com.priint.pubserver.plugin.PluginLibraryControl
-
- com.priint.pubserver.plugin.AbstractConnector.Library
-
- Enclosing class:
- AbstractConnector
public abstract static class AbstractConnector.Library extends PluginLibraryControl
Simple implementation of PluginLibraryControl for a connector.This class uses some ConcurrentHashMaps that are internally used for caching configuration and data objects related to connector instances. All functionality utilizing these maps is encapsulated within the AbstractConnector.
This class already contains implementations for startup and shutdown in @PostConstruct or @PreDestroy phase of EJB life-cycle. They may be overridden by your implementation.
In many cases subclasses of
AbstractConnector#Libraryneed no further methods or fields. Just create one subclass with appropriate annotations:Example
(replace <MyConnectorPackageName> etc. by your names)
@Singleton @Startup @PubServerPluginLibrary( id="<MyConnectorPackageName>", vendor="<MyCompany.com>", version="1.0", type = PluginType.CONNECTOR, configClasses = {<MyConnector>.class} ) public class DemoConnectorLibrary extends AbstractConnector.Library { // intentionally left empty }- Since:
- 4.0.5
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.priint.pubserver.plugin.PluginLibraryControl
PluginLibraryControl.PluginType
-
-
Field Summary
-
Fields inherited from class com.priint.pubserver.plugin.PluginLibraryControl
appName, pluginType
-
-
Constructor Summary
Constructors Constructor Description Library()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidshutdown()Called by the @preDestroy method of the plug-in library startup singleton bean Scans all classes in the library for @PubServerPlugin annotation unregister the plug-in library
unregister all classes with the @PubServerPlugin annotation as plug-insvoidstartup()Called by the @PostConstruct method of the plug-in library startup singleton bean-
Methods inherited from class com.priint.pubserver.plugin.PluginLibraryControl
beforeVersionChange, getAppName, getAuthManager, getClientManager, getConfigForPlugin, getConfigManager, getConfigsForPlugin, getDocumentLockManager, getDocumentManager, getJNDINameForPlugin, getMediaAssetManager, getPluginConfigsFromFolder, getPluginConfigsFromFolder, getPluginLibraryInfo, getPluginManager, getPluginTags, getSessionManager, getTraceManager, isPluginLibraryStarted, readConfigsForPluginLib, startupFailed, startupSuccess, validateConfigurations, validateConfigurations
-
-
-
-
Method Detail
-
startup
@PostConstruct public void startup()
Description copied from class:PluginLibraryControlCalled by the @PostConstruct method of the plug-in library startup singleton bean- Reads the plug-in library configuration from the @PubServerPluginLibrary annotation
- Scans all classes in the library for @PubServerPlugin annotation.
- Registers the plug-in library.
- Registers all classes with the @PubServerPlugin annotation as plug-ins.
- Checks for @PubServerRole and @PubServerPermission annotations and creates entries if necessary.
Throws LifeCycleException if something fails. This will also cause a failure of the application deployment in the JavaEE container.
- Overrides:
startupin classPluginLibraryControl
- Reads the plug-in library configuration from the @PubServerPluginLibrary annotation
-
shutdown
@PreDestroy public void shutdown()
Description copied from class:PluginLibraryControlCalled by the @preDestroy method of the plug-in library startup singleton bean- Scans all classes in the library for @PubServerPlugin annotation
- unregister the plug-in library
- unregister all classes with the @PubServerPlugin annotation as plug-ins
- Overrides:
shutdownin classPluginLibraryControl
-
-