Class SimpleServletComponent
- java.lang.Object
-
- nl.gx.webmanager.wcb.foundation.ComponentBase
-
- nl.gx.webmanager.wcb.servlettype.impl.SimpleServletComponent
-
- All Implemented Interfaces:
DelegatedControllerAware
,Component
,ServletComponent
public class SimpleServletComponent extends ComponentBase implements ServletComponent
This class provides a basic implementation for a GX WebManager servlet component. Custom components may either use this implementation or extend it to implement additional service interface.
-
-
Field Summary
-
Fields inherited from class nl.gx.webmanager.wcb.foundation.ComponentBase
myBundleContext, myComponentBundle, myComponentDefinition
-
-
Constructor Summary
Constructors Constructor Description SimpleServletComponent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getInstance()
Overrides the default implementation to support the (deprecated
) servlet classname property of the servlet component definition.void
start()
This method is invoked on startup of the component.void
stop()
This method is invoked on shutdown of the component.-
Methods inherited from class nl.gx.webmanager.wcb.foundation.ComponentBase
dependencyAdded, dependencyRemoved, exportContent, extensionAdded, extensionRemoved, getBundleContext, getClassesFromBundle, getClassForName, getComponentBundle, getComponentDefinition, getComponentManager, getDelegatedController, getExtensions, getId, getInstanceForName, getPrivateNode, getPrivateNode, getTypeId, getWrapperDefinitions, importContent, internalDoStart, internalDoStop, onDestroy, onInit, onInstall, onPurge, onStart, onStop, onUninstall, onUpdate, purgeContent, setBundleContext, setComponentBundle, setComponentBundle, setComponentDefinition, setComponentManager, setDelegatedController
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface nl.gx.webmanager.wcb.Component
exportContent, getClassesFromBundle, getClassForName, getComponentBundle, getComponentDefinition, getExtensions, getId, getInstanceForName, getPrivateNode, getTypeId, getWrapperDefinitions, importContent, onDestroy, onInit, onInstall, onPurge, onStart, onStop, onUninstall, onUpdate, purgeContent, setBundleContext, setComponentBundle, setComponentDefinition, setComponentManager
-
-
-
-
Method Detail
-
getInstance
public final Object getInstance()
Overrides the default implementation to support the (deprecated
) servlet classname property of the servlet component definition. Additionally, type checking is done on the instantiated class.- Specified by:
getInstance
in interfaceComponent
- Overrides:
getInstance
in classComponentBase
- Returns:
- an instance of the component's class
- See Also:
ComponentBase.getInstance()
-
start
public void start()
This method is invoked on startup of the component. It will create the servlet instance, if it was not yet created before, and invoke the init() method on that servlet.
-
stop
public void stop()
This method is invoked on shutdown of the component. It will destroy the servlet instance, if it was instantiated before, and invoke the destroy() method on that servlet.
-
-