Class PluginThread
java.lang.Object
ecmwf.common.technical.ThreadService.ConfigurableRunnable
ecmwf.common.plugin.PluginThread
- All Implemented Interfaces:
MBeanService, Runnable
- Direct Known Subclasses:
HttpPlugin, HttpPlugin, MqttPlugin, ServerPlugin
public abstract class PluginThread
extends ThreadService.ConfigurableRunnable
implements MBeanService
The Class PluginThread.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPluginThread(String ref, Map<String, String> params) Instantiates a new plugin thread. -
Method Summary
Modifier and TypeMethodDescriptionvoidcallerBack(boolean reset) Caller back.voidCaller gone.voidConfigurable run.getAttribute(String attributeName) Gets the attribute.static <T> TGets the caller.Gets the MBean info.final StringGets the param.Gets the plugin container.abstract StringGets the plugin name.final StringgetRef()Gets the ref.abstract StringGets the version.voidhandle(PluginEvent<?> event) Handle.protected final voidhandle(PluginEvent<?>[] events) Handle.Invoke.booleansetAttribute(String name, Object value) Sets the attribute.static final voidSets the caller.voidsetPluginContainer(PluginContainer container) Sets the plugin container.abstract booleanstart()Start.abstract voidstop()Stop.final voidSubscribe.final voidunSubscribe(String eventName) Un subscribe.Methods inherited from class ThreadService.ConfigurableRunnable
execute, execute, execute, getContextClassLoader, getPriority, getThreadName, interrupt, interrupted, isAlive, isStarted, join, join, run, setContextClassLoader, setForceCookie, setInheritCookie, setPriority, setThreadNameAndCookie
-
Field Details
-
_params
-
-
Constructor Details
-
PluginThread
-
-
Method Details
-
callerBack
public void callerBack(boolean reset) Caller back.- Parameters:
reset- the reset
-
callerGone
public void callerGone()Caller gone. -
getCaller
Gets the caller.- Type Parameters:
T- the generic type- Parameters:
clazz- the class- Returns:
- the caller
-
getPluginName
-
getParam
-
getRef
-
getVersion
-
setCaller
Sets the caller.- Parameters:
caller- the new caller
-
handle
-
handle
-
subscribe
-
unSubscribe
Un subscribe.- Parameters:
eventName- the event name
-
start
public abstract boolean start()Start.- Returns:
- true, if successful
-
stop
public abstract void stop()Stop. -
getAttribute
Gets the attribute. Gets the attribute.- Specified by:
getAttributein interfaceMBeanService- Parameters:
attributeName- the attribute name- Returns:
- the attribute
- Throws:
AttributeNotFoundException- the attribute not found exceptionMBeanException- the MBean exception
-
getMBeanInfo
Gets the MBean info. Gets the MBean info.- Specified by:
getMBeanInfoin interfaceMBeanService- Returns:
- the MBean info
-
getPluginContainer
Gets the plugin container.- Returns:
- the plugin container
-
invoke
public Object invoke(String operationName, Object[] params, String[] signature) throws NoSuchMethodException, MBeanException Invoke. Invoke.- Specified by:
invokein interfaceMBeanService- Parameters:
operationName- the operation nameparams- the paramssignature- the signature- Returns:
- the object
- Throws:
NoSuchMethodException- the no such method exceptionMBeanException- the MBean exception
-
setAttribute
public boolean setAttribute(String name, Object value) throws InvalidAttributeValueException, MBeanException Sets the attribute. Sets the attribute.- Specified by:
setAttributein interfaceMBeanService- Parameters:
name- the namevalue- the value- Returns:
- true, if successful
- Throws:
InvalidAttributeValueException- the invalid attribute value exceptionMBeanException- the MBean exception
-
setPluginContainer
Sets the plugin container.- Parameters:
container- the new plugin container
-
configurableRun
public void configurableRun()Configurable run. Configurable run.- Specified by:
configurableRunin classThreadService.ConfigurableRunnable
-