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$ $Date$
Author:
Alwyn Schoeman

Field Summary
 
Fields inherited from class org.jpos.q2.QBeanSupport
cfg, log
 
Fields inherited from interface org.jpos.q2.QBean
DESTROYED, FAILED, STARTED, STARTING, stateString, STOPPED, STOPPING
 
Constructor Summary
QExec()
           
 
Method Summary
 String getShutdownScript()
           
 String getStartScript()
           
 void initService()
           
 void setShutdownScript(String scriptPath)
           
 void setStartScript(String scriptPath)
           
 void startService()
           
 void stopService()
           
 
Methods inherited from class org.jpos.q2.QBeanSupport
addAttr, createElement, destroy, destroyService, getAttrs, getAttrs, getConfiguration, getFactory, getLoader, getLoaderURLS, getLog, getLogger, getName, getPersist, getProperties, getProperty, getRealm, getServer, getState, getStateAsString, init, isModified, running, setAttr, setConfiguration, setLogger, setModified, setName, setPersist, setProperty, setRealm, setServer, setState, shutdownQ2, 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.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 Exception
Overrides:
initService in class QBeanSupport
Throws:
Exception

startService

public void startService()
                  throws Exception
Overrides:
startService in class QBeanSupport
Throws:
Exception

stopService

public void stopService()
                 throws Exception
Overrides:
stopService in class QBeanSupport
Throws:
Exception

setStartScript

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

getStartScript

public String getStartScript()
Specified by:
getStartScript in interface QExecMBean

setShutdownScript

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

getShutdownScript

public String getShutdownScript()
Specified by:
getShutdownScript in interface QExecMBean


Copyright © 1998-2012 jPOS.org. All Rights Reserved.