jPOS 1.6.7 API Documentation

org.jpos.q2.qbean
Class QExec

java.lang.Object
  extended by org.jpos.q2.QBeanSupport
      extended by 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>
 

Version:
$Revision: 2854 $ $Date: 2010-01-02 02:34:31 -0800 (Sat, 02 Jan 2010) $
Author:
Alwyn Schoeman

Field Summary
 
Fields inherited from interface org.jpos.q2.QBean
DESTROYED, FAILED, STARTED, STARTING, stateString, STOPPED, STOPPING
 
Constructor Summary
QExec()
           
 
Method Summary
 java.lang.String getShutdownScript()
           
 java.lang.String getStartScript()
           
 void initService()
           
 void setShutdownScript(java.lang.String scriptPath)
           
 void setStartScript(java.lang.String scriptPath)
           
 void startService()
           
 void stopService()
           
 
Methods inherited from class org.jpos.q2.QBeanSupport
destroy, getConfiguration, getFactory, getLoader, getLoaderURLS, getLog, getLogger, getName, getPersist, getRealm, getServer, getState, getStateAsString, init, isModified, running, setConfiguration, setLogger, setModified, setName, setPersist, setRealm, setServer, setState, shutdownQ2, start, stop
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jpos.q2.QBeanSupportMBean
getLoader, getLoaderURLS, getLogger, getName, getRealm, getServer, setLogger, setName, setPersist, setRealm, setServer, shutdownQ2
 
Methods inherited from interface org.jpos.q2.QBean
destroy, getState, getStateAsString, init, start, stop
 
Methods inherited from interface org.jpos.q2.QPersist
getPersist, isModified
 

Constructor Detail

QExec

public QExec()
Method Detail

initService

public void initService()
                 throws java.lang.Exception
Throws:
java.lang.Exception

startService

public void startService()
                  throws java.lang.Exception
Throws:
java.lang.Exception

stopService

public void stopService()
                 throws java.lang.Exception
Throws:
java.lang.Exception

setStartScript

public void setStartScript(java.lang.String scriptPath)
Specified by:
setStartScript in interface QExecMBean

getStartScript

public java.lang.String getStartScript()
Specified by:
getStartScript in interface QExecMBean

setShutdownScript

public void setShutdownScript(java.lang.String scriptPath)
Specified by:
setShutdownScript in interface QExecMBean

getShutdownScript

public java.lang.String getShutdownScript()
Specified by:
getShutdownScript in interface QExecMBean

jPOS.org