Package org.jpos.q2.qbean
Class QExec
- java.lang.Object
-
- org.jpos.q2.QBeanSupport
-
- org.jpos.q2.qbean.QExec
-
- All Implemented Interfaces:
Configurable
,QBean
,QExecMBean
,QBeanSupportMBean
,QPersist
public class QExec extends QBeanSupport implements QExecMBean
QBean for starting and stopping scripts or programs.Example xml: <exec class="org.jpos.q2.qbean.QExec"> <attr name="start">YOUR PATH TO PROGRAM</attr> <attr name="shutdown">YOUR PATH TO PROGRAM</attr> </exec>
-
-
Field Summary
-
Fields inherited from class org.jpos.q2.QBeanSupport
cfg, log, scheduledThreadPoolExecutor
-
-
Constructor Summary
Constructors Constructor Description QExec()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getShutdownScript()
java.lang.String
getStartScript()
void
setShutdownScript(java.lang.String scriptPath)
void
setStartScript(java.lang.String scriptPath)
protected void
startService()
protected void
stopService()
-
Methods inherited from class org.jpos.q2.QBeanSupport
addAttr, close, createElement, destroy, destroyService, getAttrs, getAttrs, getConfiguration, getDump, getFactory, getLoader, getLoaderURLS, getLog, getLogger, getName, getPersist, getProperties, getProperty, getRealm, getScheduledThreadPoolExecutor, getServer, getState, getStateAsString, init, initService, isModified, running, setAttr, setConfiguration, setLogger, setModified, setName, setPersist, setProperty, setRealm, setServer, setState, start, stop
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jpos.q2.QBean
destroy, getState, getStateAsString, init, start, stop
-
Methods inherited from interface org.jpos.q2.QBeanSupportMBean
getDump, getLoader, getLoaderURLS, getLogger, getName, getRealm, getServer, setLogger, setName, setPersist, setRealm, setServer
-
Methods inherited from interface org.jpos.q2.QPersist
getPersist, isModified
-
-
-
-
Constructor Detail
-
QExec
public QExec()
-
-
Method Detail
-
startService
protected void startService() throws java.lang.Exception
- Overrides:
startService
in classQBeanSupport
- Throws:
java.lang.Exception
-
stopService
protected void stopService() throws java.lang.Exception
- Overrides:
stopService
in classQBeanSupport
- Throws:
java.lang.Exception
-
setStartScript
public void setStartScript(java.lang.String scriptPath)
- Specified by:
setStartScript
in interfaceQExecMBean
-
getStartScript
public java.lang.String getStartScript()
- Specified by:
getStartScript
in interfaceQExecMBean
-
setShutdownScript
public void setShutdownScript(java.lang.String scriptPath)
- Specified by:
setShutdownScript
in interfaceQExecMBean
-
getShutdownScript
public java.lang.String getShutdownScript()
- Specified by:
getShutdownScript
in interfaceQExecMBean
-
-