|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.mx.util.JBossNotificationBroadcasterSupport
org.jboss.system.ServiceMBeanSupport
org.jboss.services.loggingmonitor.LoggingMonitor
public class LoggingMonitor
This class implements the LoggingMonitor service which provides the ability to create monitoring logs for various MBeans and their attributes.
Field Summary | |
---|---|
static String |
DEFAULT_PATTERN_LAYOUT
|
static String |
MBEAN_ATTRIBUTE_ELEMENT
|
static String |
MBEAN_LOGGER_ATTRIBUTE
|
static String |
MBEAN_NAME_ATTRIBUTE
|
static String |
MONITORED_MBEAN_ELEMENT
|
Fields inherited from class org.jboss.system.ServiceMBeanSupport |
---|
log, server, SERVICE_CONTROLLER_SIG, serviceName |
Fields inherited from interface org.jboss.system.ServiceMBean |
---|
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
Constructor Summary | |
---|---|
LoggingMonitor()
Default constructor. |
Method Summary | |
---|---|
boolean |
getAppendToFile()
|
String |
getFilename()
|
long |
getMonitorPeriod()
|
String |
getPatternLayout()
|
String |
getRolloverFormat()
This monitor's log file rollover format as determined by the RolloverPeriod attribute. |
String |
getRolloverPeriod()
|
void |
setAppendToFile(boolean appendToFile)
Flag to indicate whether or not this monitor's log file should have information appended to it, if it already exists. |
void |
setFilename(String filename)
The name of the file to which this monitor's information will be logged. |
void |
setMonitoredObjects(Element monitoredObjects)
Sets the monitored objects configuration. |
void |
setMonitorPeriod(long monitorPeriod)
The period to delay between monitoring snapshots. |
void |
setPatternLayout(String patternLayout)
The PatternLayout for logging entries (default is "%d %-5p [%c] %m%n") |
void |
setRolloverPeriod(String rolloverPeriod)
This monitor's log file rollover period. |
protected void |
startService()
|
protected void |
stopService()
|
Methods inherited from class org.jboss.system.ServiceMBeanSupport |
---|
create, createService, destroy, destroyService, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop |
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport |
---|
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jboss.system.ServiceMBean |
---|
getName, getState, getStateString, jbossInternalLifecycle |
Methods inherited from interface org.jboss.system.Service |
---|
create, destroy, start, stop |
Field Detail |
---|
public static final String MONITORED_MBEAN_ELEMENT
public static final String MBEAN_NAME_ATTRIBUTE
public static final String MBEAN_LOGGER_ATTRIBUTE
public static final String MBEAN_ATTRIBUTE_ELEMENT
public static final String DEFAULT_PATTERN_LAYOUT
Constructor Detail |
---|
public LoggingMonitor()
Method Detail |
---|
public void setFilename(String filename)
LoggingMonitorMBean
setFilename
in interface LoggingMonitorMBean
public String getFilename()
getFilename
in interface LoggingMonitorMBean
public void setAppendToFile(boolean appendToFile)
LoggingMonitorMBean
setAppendToFile
in interface LoggingMonitorMBean
public boolean getAppendToFile()
getAppendToFile
in interface LoggingMonitorMBean
public void setRolloverPeriod(String rolloverPeriod)
LoggingMonitorMBean
setRolloverPeriod
in interface LoggingMonitorMBean
public String getRolloverPeriod()
getRolloverPeriod
in interface LoggingMonitorMBean
public void setMonitorPeriod(long monitorPeriod)
LoggingMonitorMBean
setMonitorPeriod
in interface LoggingMonitorMBean
public long getMonitorPeriod()
getMonitorPeriod
in interface LoggingMonitorMBean
public void setPatternLayout(String patternLayout)
LoggingMonitorMBean
setPatternLayout
in interface LoggingMonitorMBean
public String getPatternLayout()
getPatternLayout
in interface LoggingMonitorMBean
public String getRolloverFormat()
LoggingMonitorMBean
RolloverPeriod
attribute.
getRolloverFormat
in interface LoggingMonitorMBean
public void setMonitoredObjects(Element monitoredObjects) throws javax.management.MalformedObjectNameException
LoggingMonitorMBean
setMonitoredObjects
in interface LoggingMonitorMBean
monitoredObjects
- the objects to be monitored specified in the
following format:
<attribute name="MonitoredObjects"> <configuration> <monitoredmbean name="[object name]" logger="[logger name]"> <attribute>[attribute name]</attribute> <attribute>[attribute name]</attribute> ... </monitoredmbean> </configuration> </attribute>
javax.management.MalformedObjectNameException
- if the monitored objects
configuration contains an invalid
object name.protected void startService()
startService
in class org.jboss.system.ServiceMBeanSupport
protected void stopService()
stopService
in class org.jboss.system.ServiceMBeanSupport
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |