org.jpos.q2
Class QBeanSupport

java.lang.Object
  extended by org.jpos.q2.QBeanSupport
All Implemented Interfaces:
Configurable, QBean, QBeanSupportMBean, QPersist
Direct Known Subclasses:
BSH, ChannelAdaptor, ContextMaker, DailyTaskAdaptor, DirPollAdaptor, KeyStoreAdaptor, LoggerAdaptor, MUXPool, OneShotChannelAdaptor, QBeanFactory, QExec, QMUX, QMUXProxyAdaptor, QServer, Shutdown, SMAdaptor, SpaceAdaptor, SpaceLet, SpaceProxyAdaptor, SystemMonitor, TaskAdaptor, TransactionManager, UI

public class QBeanSupport
extends Object
implements QBean, QPersist, QBeanSupportMBean, Configurable

Version:
$Revision$ $Date$
Author:
Alireza Taherkordi, Alejandro P. Revilla

Field Summary
protected  Configuration cfg
           
protected  Log log
           
 
Fields inherited from interface org.jpos.q2.QBean
DESTROYED, FAILED, STARTED, STARTING, stateString, STOPPED, STOPPING
 
Constructor Summary
QBeanSupport()
           
 
Method Summary
protected  void addAttr(org.jdom.Element e, String name, Object obj, String type)
           
protected  org.jdom.Element createElement(String name, Class mbeanClass)
           
 void destroy()
          destroy the service
protected  void destroyService()
           
protected  Iterator getAttrs()
           
protected  Iterator getAttrs(String parent)
           
 Configuration getConfiguration()
           
 QFactory getFactory()
           
 QClassLoader getLoader()
           
 URL[] getLoaderURLS()
           
 Log getLog()
           
 String getLogger()
           
 String getName()
           
 org.jdom.Element getPersist()
           
protected  Iterator getProperties(String parent)
           
protected  String getProperty(Iterator props, String name)
           
 String getRealm()
           
 Q2 getServer()
           
 int getState()
           
 String getStateAsString()
           
 void init()
          init the service
protected  void initService()
           
 boolean isModified()
           
 boolean running()
           
protected  void setAttr(Iterator attrs, String name, Object obj)
           
 void setConfiguration(Configuration cfg)
           
 void setLogger(String loggerName)
           
 void setModified(boolean modified)
           
 void setName(String name)
           
 void setPersist(org.jdom.Element persist)
           
protected  void setProperty(Iterator props, String name, String value)
           
 void setRealm(String realm)
           
 void setServer(Q2 server)
           
 void setState(int state)
           
 void shutdownQ2()
           
 void start()
          start the service
protected  void startService()
           
 void stop()
          stop the service
protected  void stopService()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected Log log

cfg

protected Configuration cfg
Constructor Detail

QBeanSupport

public QBeanSupport()
Method Detail

setServer

public void setServer(Q2 server)
Specified by:
setServer in interface QBeanSupportMBean

getServer

public Q2 getServer()
Specified by:
getServer in interface QBeanSupportMBean

getFactory

public QFactory getFactory()

setName

public void setName(String name)
Specified by:
setName in interface QBeanSupportMBean

setLogger

public void setLogger(String loggerName)
Specified by:
setLogger in interface QBeanSupportMBean

setRealm

public void setRealm(String realm)
Specified by:
setRealm in interface QBeanSupportMBean

getRealm

public String getRealm()
Specified by:
getRealm in interface QBeanSupportMBean

getLogger

public String getLogger()
Specified by:
getLogger in interface QBeanSupportMBean

getLog

public Log getLog()

getName

public String getName()
Specified by:
getName in interface QBeanSupportMBean

init

public void init()
Description copied from interface: QBean
init the service

Specified by:
init in interface QBean

start

public void start()
Description copied from interface: QBean
start the service

Specified by:
start in interface QBean

stop

public void stop()
Description copied from interface: QBean
stop the service

Specified by:
stop in interface QBean

destroy

public void destroy()
Description copied from interface: QBean
destroy the service

Specified by:
destroy in interface QBean

shutdownQ2

public void shutdownQ2()
Specified by:
shutdownQ2 in interface QBeanSupportMBean

getState

public int getState()
Specified by:
getState in interface QBean
Returns:
state (STARTING, STARTED, FAILED, DESTROYED ...)

getLoaderURLS

public URL[] getLoaderURLS()
Specified by:
getLoaderURLS in interface QBeanSupportMBean

getLoader

public QClassLoader getLoader()
Specified by:
getLoader in interface QBeanSupportMBean

getStateAsString

public String getStateAsString()
Specified by:
getStateAsString in interface QBean
Returns:
state (STARTING, STARTED, FAILED, DESTROYED ...)

setState

public void setState(int state)

setPersist

public void setPersist(org.jdom.Element persist)
Specified by:
setPersist in interface QBeanSupportMBean

getPersist

public org.jdom.Element getPersist()
Specified by:
getPersist in interface QPersist

setModified

public void setModified(boolean modified)

isModified

public boolean isModified()
Specified by:
isModified in interface QPersist

running

public boolean running()

initService

protected void initService()
                    throws Exception
Throws:
Exception

startService

protected void startService()
                     throws Exception
Throws:
Exception

stopService

protected void stopService()
                    throws Exception
Throws:
Exception

destroyService

protected void destroyService()
                       throws Exception
Throws:
Exception

createElement

protected org.jdom.Element createElement(String name,
                                         Class mbeanClass)

addAttr

protected void addAttr(org.jdom.Element e,
                       String name,
                       Object obj,
                       String type)

getAttrs

protected Iterator getAttrs()

getAttrs

protected Iterator getAttrs(String parent)

setAttr

protected void setAttr(Iterator attrs,
                       String name,
                       Object obj)

getProperties

protected Iterator getProperties(String parent)

setProperty

protected void setProperty(Iterator props,
                           String name,
                           String value)

getProperty

protected String getProperty(Iterator props,
                             String name)

setConfiguration

public void setConfiguration(Configuration cfg)
                      throws ConfigurationException
Specified by:
setConfiguration in interface Configurable
Parameters:
cfg - Configuration object
Throws:
ConfigurationException

getConfiguration

public Configuration getConfiguration()


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