org.apache.servicemix.jbi.logging
Class LogService

java.lang.Object
  extended by org.apache.servicemix.jbi.management.BaseLifeCycle
      extended by org.apache.servicemix.jbi.management.BaseSystemService
          extended by org.apache.servicemix.jbi.logging.LogService
All Implemented Interfaces:
javax.jbi.management.LifeCycleMBean, LogServiceMBean, MBeanInfoProvider, org.springframework.beans.factory.InitializingBean

public class LogService
extends BaseSystemService
implements org.springframework.beans.factory.InitializingBean, LogServiceMBean


Field Summary
 
Fields inherited from class org.apache.servicemix.jbi.management.BaseSystemService
container
 
Fields inherited from class org.apache.servicemix.jbi.management.BaseLifeCycle
currentState, INITIALIZED, listener
 
Fields inherited from interface javax.jbi.management.LifeCycleMBean
SHUTDOWN, STARTED, STOPPED, UNKNOWN
 
Constructor Summary
LogService()
           
 
Method Summary
 void afterPropertiesSet()
           
 MBeanAttributeInfo[] getAttributeInfos()
          Get an array of MBeanAttributeInfo
 boolean getAutoStart()
           
 String getConfigUrl()
           
 JBIContainer getContainer()
           
 String getDescription()
          Get the Description of the item
 MBeanOperationInfo[] getOperationInfos()
          Get an array of MBeanOperationInfo
 int getRefreshPeriod()
           
protected  Class getServiceMBean()
           
 void reconfigureLogSystem()
          reconfigure the log4j system if something has changed in the config file
 void setAutoStart(boolean autoStart)
           
 void setConfigUrl(String url)
          set new location for log4j config
 void setContainer(JBIContainer container)
           
 void setRefreshPeriod(int seconds)
           
 void setUp()
           
 void start()
          Start the item.
 void stop()
          Stop the item.
 
Methods inherited from class org.apache.servicemix.jbi.management.BaseSystemService
getName, getType, init, shutDown
 
Methods inherited from class org.apache.servicemix.jbi.management.BaseLifeCycle
firePropertyChanged, getCurrentState, getObjectToManage, getSubType, init, isInitialized, isShutDown, isStarted, isStopped, isUnknown, setCurrentState, setPropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogService

public LogService()
Method Detail

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception

getContainer

public JBIContainer getContainer()
Overrides:
getContainer in class BaseSystemService

setContainer

public void setContainer(JBIContainer container)

getDescription

public String getDescription()
Description copied from interface: MBeanInfoProvider
Get the Description of the item

Specified by:
getDescription in interface MBeanInfoProvider
Returns:
the description

setRefreshPeriod

public void setRefreshPeriod(int seconds)
Specified by:
setRefreshPeriod in interface LogServiceMBean
Parameters:
seconds - Refresh period for the log4j system.

getRefreshPeriod

public int getRefreshPeriod()
Specified by:
getRefreshPeriod in interface LogServiceMBean
Returns:
returns the time in seconds for the refresh period

setConfigUrl

public void setConfigUrl(String url)
set new location for log4j config

Specified by:
setConfigUrl in interface LogServiceMBean
Parameters:
url - Location for log4j config file example: file:conf/log4j.xml

getConfigUrl

public String getConfigUrl()
Specified by:
getConfigUrl in interface LogServiceMBean

setAutoStart

public void setAutoStart(boolean autoStart)

getAutoStart

public boolean getAutoStart()

reconfigureLogSystem

public void reconfigureLogSystem()
reconfigure the log4j system if something has changed in the config file

Specified by:
reconfigureLogSystem in interface LogServiceMBean

getServiceMBean

protected Class getServiceMBean()
Specified by:
getServiceMBean in class BaseSystemService

start

public void start()
           throws javax.jbi.JBIException
Description copied from class: BaseLifeCycle
Start the item.

Specified by:
start in interface javax.jbi.management.LifeCycleMBean
Overrides:
start in class BaseLifeCycle
Throws:
javax.jbi.JBIException - if the item fails to start.

stop

public void stop()
          throws javax.jbi.JBIException
Description copied from class: BaseLifeCycle
Stop the item. This suspends current messaging activities.

Specified by:
stop in interface javax.jbi.management.LifeCycleMBean
Overrides:
stop in class BaseLifeCycle
Throws:
javax.jbi.JBIException - if the item fails to stop.

setUp

public void setUp()
           throws javax.jbi.JBIException
Throws:
javax.jbi.JBIException

getOperationInfos

public MBeanOperationInfo[] getOperationInfos()
                                       throws JMException
Description copied from class: BaseLifeCycle
Get an array of MBeanOperationInfo

Specified by:
getOperationInfos in interface MBeanInfoProvider
Overrides:
getOperationInfos in class BaseLifeCycle
Returns:
array of OperationInfos
Throws:
JMException

getAttributeInfos

public MBeanAttributeInfo[] getAttributeInfos()
                                       throws JMException
Description copied from class: BaseLifeCycle
Get an array of MBeanAttributeInfo

Specified by:
getAttributeInfos in interface MBeanInfoProvider
Overrides:
getAttributeInfos in class BaseLifeCycle
Returns:
array of AttributeInfos
Throws:
JMException


Copyright © 2005-2010 The Apache Software Foundation. All Rights Reserved.