public abstract class MBeanImplBase extends Object implements MBeanRegistration, NotificationSender
Modifier and Type | Field and Description |
---|---|
protected static String[] |
EMPTY_STRING_ARRAY |
protected ObjectName |
mSelfObjectName
The ObjectName by which this object is registered (if registered).
|
protected MBeanServer |
mServer
The MBeanServer in which this object is registered (if any)
|
Constructor and Description |
---|
MBeanImplBase() |
MBeanImplBase(MBeanServer mbeanServer)
Some subclasses need the MBeanServer set in advance.
|
Modifier and Type | Method and Description |
---|---|
protected Level |
_getMBeanLogLevel() |
void |
addNotificationListener(NotificationListener listener) |
void |
addNotificationListener(NotificationListener listener,
NotificationFilter filter,
Object handback) |
protected NotificationBuilder |
createNotificationBuilder(String notificationType) |
protected void |
debug(Object... args) |
protected void |
debug(Object o) |
protected void |
debugMethod(String methodName,
Object... args) |
protected void |
debugMethod(String msg,
String methodName,
Object... args) |
boolean |
enableAMXDebug(boolean enabled) |
boolean |
getAMXDebug()
Although unusual, a subclass may override the debug state.
|
protected String |
getDebugID() |
protected Output |
getDebugOutput() |
String |
getJMXDomain() |
int |
getListenerCount() |
protected Logger |
getMBeanLogger() |
String |
getMBeanLoggerName() |
String |
getMBeanLogLevel() |
protected int |
getMBeanLogLevelInt() |
MBeanServer |
getMBeanServer() |
protected NotificationBuilder |
getNotificationBuilder(String notificationType)
Get a NotificationBuilder for the specified type of Notification
whose source is this object.
|
protected NotificationEmitterSupport |
getNotificationEmitter() |
int |
getNotificationTypeListenerCount(String type) |
ObjectName |
getObjectName() |
protected void |
logFine(Object o) |
protected void |
logFiner(Object o) |
protected void |
logFinest(Object o) |
protected void |
logInfo(Object o) |
protected void |
logSevere(Object o) |
protected void |
logWarning(Object o) |
void |
postDeregister() |
protected void |
postDeregisterHook() |
void |
postRegister(Boolean registrationSucceeded) |
protected void |
postRegisterHook(Boolean registrationSucceeded) |
void |
preDeregister() |
protected void |
preDeregisterHook() |
ObjectName |
preRegister(MBeanServer server,
ObjectName nameIn) |
protected static String |
quote(Object o) |
void |
removeNotificationListener(NotificationListener listener) |
void |
removeNotificationListener(NotificationListener listener,
NotificationFilter filter,
Object handback) |
void |
sendNotification(Notification notification) |
protected void |
sendNotification(String notificationType)
Send a Notification of the specified type containing no data.
|
protected void |
sendNotification(String notificationType,
String key,
Serializable value)
Send a Notification of the specified type containing a single
key/value pair for data.
|
protected void |
sendNotification(String notificationType,
String message,
String key,
Serializable value)
Send a Notification of the specified type containing a single
key/value pair for data.
|
void |
setAMXDebug(boolean debug) |
void |
setMBeanLogLevel(String level) |
protected boolean |
shouldOmitObjectNameForDebug() |
protected boolean |
sleepMillis(long millis) |
protected static String |
toString(Object o) |
protected void |
trace(Object o) |
protected static final String[] EMPTY_STRING_ARRAY
protected volatile MBeanServer mServer
protected volatile ObjectName mSelfObjectName
public MBeanImplBase()
public MBeanImplBase(MBeanServer mbeanServer)
public final int getListenerCount()
public final int getNotificationTypeListenerCount(String type)
protected final NotificationEmitterSupport getNotificationEmitter()
public void addNotificationListener(NotificationListener listener)
public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)
public void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException
ListenerNotFoundException
public void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException
ListenerNotFoundException
public void sendNotification(Notification notification)
sendNotification
in interface NotificationSender
protected NotificationBuilder createNotificationBuilder(String notificationType)
protected NotificationBuilder getNotificationBuilder(String notificationType)
protected void sendNotification(String notificationType)
protected void sendNotification(String notificationType, String key, Serializable value)
protected void sendNotification(String notificationType, String message, String key, Serializable value)
public final ObjectName getObjectName()
public String getJMXDomain()
public final MBeanServer getMBeanServer()
protected final void trace(Object o)
protected final void logSevere(Object o)
protected final void logWarning(Object o)
protected final void logInfo(Object o)
protected final void logFine(Object o)
protected final void logFiner(Object o)
protected final void logFinest(Object o)
protected final Logger getMBeanLogger()
protected final Level _getMBeanLogLevel()
public final String getMBeanLogLevel()
public final void setMBeanLogLevel(String level)
protected final int getMBeanLogLevelInt()
public final String getMBeanLoggerName()
public ObjectName preRegister(MBeanServer server, ObjectName nameIn) throws Exception
preRegister
in interface MBeanRegistration
Exception
protected void postRegisterHook(Boolean registrationSucceeded)
public final void postRegister(Boolean registrationSucceeded)
postRegister
in interface MBeanRegistration
public final void preDeregister() throws Exception
preDeregister
in interface MBeanRegistration
Exception
protected void postDeregisterHook()
public final void postDeregister()
postDeregister
in interface MBeanRegistration
protected String getDebugID()
public final boolean getAMXDebug()
public boolean enableAMXDebug(boolean enabled)
protected Output getDebugOutput()
public final void setAMXDebug(boolean debug)
protected boolean shouldOmitObjectNameForDebug()
protected final void debug(Object o)
protected void debug(Object... args)
protected boolean sleepMillis(long millis)
Copyright © 2018. All rights reserved.