public class QBeanSupport extends java.lang.Object implements QBean, QPersist, QBeanSupportMBean, Configurable
Modifier and Type | Field and Description |
---|---|
protected Configuration |
cfg |
protected Log |
log |
protected java.util.concurrent.ScheduledThreadPoolExecutor |
scheduledThreadPoolExecutor |
Constructor and Description |
---|
QBeanSupport() |
Modifier and Type | Method and Description |
---|---|
protected void |
addAttr(org.jdom2.Element e,
java.lang.String name,
java.lang.Object obj,
java.lang.String type) |
protected void |
close(java.io.Closeable... closeables) |
protected org.jdom2.Element |
createElement(java.lang.String name,
java.lang.Class mbeanClass) |
void |
destroy()
destroy the service
|
protected void |
destroyService() |
protected java.util.Iterator |
getAttrs() |
protected java.util.Iterator |
getAttrs(java.lang.String parent) |
Configuration |
getConfiguration() |
java.lang.String |
getDump() |
QFactory |
getFactory() |
QClassLoader |
getLoader() |
java.net.URL[] |
getLoaderURLS() |
Log |
getLog() |
java.lang.String |
getLogger() |
java.lang.String |
getName() |
org.jdom2.Element |
getPersist() |
protected java.util.Iterator |
getProperties(java.lang.String parent) |
protected java.lang.String |
getProperty(java.util.Iterator props,
java.lang.String name) |
java.lang.String |
getRealm() |
protected java.util.concurrent.ScheduledThreadPoolExecutor |
getScheduledThreadPoolExecutor() |
Q2 |
getServer() |
int |
getState() |
java.lang.String |
getStateAsString() |
void |
init()
init the service
|
protected void |
initService() |
boolean |
isModified() |
boolean |
running() |
protected void |
setAttr(java.util.Iterator attrs,
java.lang.String name,
java.lang.Object obj) |
void |
setConfiguration(Configuration cfg) |
void |
setLogger(java.lang.String loggerName) |
void |
setModified(boolean modified) |
void |
setName(java.lang.String name) |
void |
setPersist(org.jdom2.Element persist) |
protected void |
setProperty(java.util.Iterator props,
java.lang.String name,
java.lang.String value) |
void |
setRealm(java.lang.String realm) |
void |
setServer(Q2 server) |
void |
setState(int state) |
void |
start()
start the service
|
protected void |
startService() |
void |
stop()
stop the service
|
protected void |
stopService() |
protected Log log
protected Configuration cfg
protected java.util.concurrent.ScheduledThreadPoolExecutor scheduledThreadPoolExecutor
public void setServer(Q2 server)
setServer
in interface QBeanSupportMBean
public Q2 getServer()
getServer
in interface QBeanSupportMBean
public QFactory getFactory()
public void setName(java.lang.String name)
setName
in interface QBeanSupportMBean
public void setLogger(java.lang.String loggerName)
setLogger
in interface QBeanSupportMBean
public void setRealm(java.lang.String realm)
setRealm
in interface QBeanSupportMBean
public java.lang.String getRealm()
getRealm
in interface QBeanSupportMBean
public java.lang.String getLogger()
getLogger
in interface QBeanSupportMBean
public Log getLog()
public java.lang.String getName()
getName
in interface QBeanSupportMBean
public void init()
QBean
public void start()
QBean
public void stop()
QBean
public void destroy()
QBean
public int getState()
public java.net.URL[] getLoaderURLS()
getLoaderURLS
in interface QBeanSupportMBean
public QClassLoader getLoader()
getLoader
in interface QBeanSupportMBean
public java.lang.String getStateAsString()
getStateAsString
in interface QBean
public void setState(int state)
public void setPersist(org.jdom2.Element persist)
setPersist
in interface QBeanSupportMBean
public org.jdom2.Element getPersist()
getPersist
in interface QPersist
public void setModified(boolean modified)
public boolean isModified()
isModified
in interface QPersist
public boolean running()
public void setConfiguration(Configuration cfg) throws ConfigurationException
setConfiguration
in interface Configurable
cfg
- Configuration objectConfigurationException
public Configuration getConfiguration()
public java.lang.String getDump()
getDump
in interface QBeanSupportMBean
protected void initService() throws java.lang.Exception
java.lang.Exception
protected void startService() throws java.lang.Exception
java.lang.Exception
protected void stopService() throws java.lang.Exception
java.lang.Exception
protected void destroyService() throws java.lang.Exception
java.lang.Exception
protected java.util.concurrent.ScheduledThreadPoolExecutor getScheduledThreadPoolExecutor()
protected org.jdom2.Element createElement(java.lang.String name, java.lang.Class mbeanClass)
protected void addAttr(org.jdom2.Element e, java.lang.String name, java.lang.Object obj, java.lang.String type)
protected java.util.Iterator getAttrs()
protected java.util.Iterator getAttrs(java.lang.String parent)
protected void setAttr(java.util.Iterator attrs, java.lang.String name, java.lang.Object obj)
protected java.util.Iterator getProperties(java.lang.String parent)
protected void setProperty(java.util.Iterator props, java.lang.String name, java.lang.String value)
protected java.lang.String getProperty(java.util.Iterator props, java.lang.String name)
protected void close(java.io.Closeable... closeables)