public class TransportLoggerView extends Object implements TransportLoggerViewMBean
TransportLoggerViewMBean.
Constructor and Description |
---|
TransportLoggerView(TransportLogger transportLogger,
String nextTransportName,
int id,
ManagementContext managementContext)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static String |
createTransportLoggerObjectNameRoot(ManagementContext managementContext)
Creates the part of the ObjectName that will be used by all MBeans.
|
static void |
disableAllTransportLoggers()
Disable logging for all Transport Loggers at once.
|
void |
disableLogging()
Disables logging for the managed TransportLogger.
|
static void |
enableAllTransportLoggers()
Enable logging for all Transport Loggers at once.
|
void |
enableLogging()
Enables logging for the managed TransportLogger.
|
boolean |
isLogging()
Returns if the managed TransportLogger is currently active
(writing to a log) or not.
|
void |
setLogging(boolean logging)
Enables or disables logging for the managed TransportLogger.
|
void |
unregister()
Unregisters the MBean from the MBeanServer of the management context
provided at creation time.
|
public TransportLoggerView(TransportLogger transportLogger, String nextTransportName, int id, ManagementContext managementContext)
transportLogger
- The TransportLogger object which is to be managed by this MBean.nextTransportName
- The name of the next TransportLayer. This is used to give a unique
name for each MBean of the TransportLoggerView class.id
- The id of the TransportLogger to be watched.managementContext
- The management context who has the MBeanServer where this MBean will be registered.public static void enableAllTransportLoggers()
public static void disableAllTransportLoggers()
public void enableLogging()
TransportLoggerViewMBean
enableLogging
in interface TransportLoggerViewMBean
public void disableLogging()
TransportLoggerViewMBean
disableLogging
in interface TransportLoggerViewMBean
public boolean isLogging()
TransportLoggerViewMBean
isLogging
in interface TransportLoggerViewMBean
public void setLogging(boolean logging)
TransportLoggerViewMBean
setLogging
in interface TransportLoggerViewMBean
logging
- Boolean value to enable or disable logging for
the managed TransportLogger.
true to enable logging, false to disable logging.public void unregister()
public static String createTransportLoggerObjectNameRoot(ManagementContext managementContext)
managementContext
- Copyright © 2005–2013 The Apache Software Foundation. All rights reserved.