|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.core.base.Referable
public class Referable
This is the default implementation and base class of referable MBeans maintaining their registration state and supporting direct references.
| Field Summary | |
|---|---|
static int |
ID_LENGTH
The id length. |
static ModelMBeanAttributeInfo[] |
REFERABLE_ATTRIBUTES
Referable attributes. |
static String |
REFERABLE_NOTIF_DESCRIPTION
The notification description. |
static ModelMBeanNotificationInfo[] |
REFERABLE_NOTIFICATIONS
Referable notifications. |
| Fields inherited from interface org.norther.tammi.core.base.ReferableMBean |
|---|
DEFAULT_ID, ID, MBEAN, MBEAN_DESCRIPTION, TYPE |
| Fields inherited from interface org.norther.tammi.core.base.MBeanDelegate |
|---|
ARRAY_TYPE, OBJECT_TYPE, PRIMITIVE_TYPE, STRING_TYPE |
| Constructor Summary | |
|---|---|
Referable()
Constructs a new referable MBean. |
|
Referable(ReferableMBean adaptee)
Constructs a new referable adapter. |
|
| Method Summary | |
|---|---|
void |
addNotificationListener(NotificationListener listener,
NotificationFilter filter,
Object handback)
|
AttributeSupport |
getAttributeSupport()
Gets the attribute support. |
Broker |
getBroker()
Gets the referent of the broker MBean. |
String |
getCanonicalName()
Gets the canonical object name of the MBean as a string. |
Domain |
getDomain()
Gets the referent of the domain MBean. |
Factory |
getFactory()
Gets the referent of the factory MBean. |
LoaderMBean |
getLoader()
Gets the referent of the loader MBean. |
Log |
getLog()
Gets an anonymous log. |
Log |
getLog(Object object)
Gets an object specific log. |
MBeanReference |
getMBean()
Gets a reference to the adapter MBean. |
MBeanServer |
getMBeanServer()
Gets the MBean server. |
String |
getNamePattern()
Gets the name pattern as a string. |
MBeanNotificationInfo[] |
getNotificationInfo()
|
ObjectName |
getObjectName()
Gets the object name. |
ObjectName |
getQueryPattern()
Gets the name pattern as an object name query. |
long |
getRegistrationTime()
Gets the registration time. |
long |
getSequenceNumber()
Gets the notification sequence number. |
protected ObjectName |
getUniqueName(MBeanServer server)
Gets a unique object name within the specified server. |
boolean |
hasListeners()
Checks whether there are registered notification listeners. |
protected boolean |
isUnregistered()
Checks whether this MBean is unregistered. |
void |
postDeregister()
Allows the MBean to perform any operations needed after having been de-registered in the MBean server. |
void |
postRegister(Boolean done)
Allows the MBean to perform any operations needed after having been registered in the MBean server or after the registration has failed. |
void |
preDeregister()
Allows the MBean to perform any operations it needs before being de-registered by the MBean server. |
ObjectName |
preRegister(MBeanServer server,
ObjectName name)
Allows the MBean to perform any operations it needs before being registered in the MBean server. |
void |
removeNotificationListener(NotificationListener listener)
|
void |
removeNotificationListener(NotificationListener listener,
NotificationFilter filter,
Object handback)
|
void |
sendNotification(Notification notif)
Sends the specified notification. |
void |
sendNotification(String message)
Sends a generic notification. |
void |
sendNotification(String message,
Object data)
Sends a generic notification with data. |
void |
sendNotification(String message,
String name,
String type,
Object oldValue,
Object newValue)
Sends a modification notification with values for object attributes. |
void |
setCanonicalName(String name)
Sets the canonical object name of the MBean as a string. |
void |
setMBeanServer(MBeanServer server)
Sets the MBean server. |
void |
setNamePattern(String pattern)
Sets the name pattern as a string. |
void |
setObjectName(ObjectName name)
Sets the object name. |
void |
setQueryPattern(ObjectName pattern)
Sets the name pattern as an object name query. |
void |
unregister()
Unregisters this MBean if it is still registered. |
protected void |
unregistered()
Marks this MBean as potentially unregistered. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String REFERABLE_NOTIF_DESCRIPTION
public static final ModelMBeanNotificationInfo[] REFERABLE_NOTIFICATIONS
public static final ModelMBeanAttributeInfo[] REFERABLE_ATTRIBUTES
public static final int ID_LENGTH
| Constructor Detail |
|---|
public Referable()
public Referable(ReferableMBean adaptee)
adaptee - the adaptee MBean.| Method Detail |
|---|
public ObjectName preRegister(MBeanServer server,
ObjectName name)
throws Exception
preRegister in interface MBeanRegistrationserver - the MBean server in which the MBean will be registered.name - the object name of the MBean (may be null).
Exception - for errors.public void postRegister(Boolean done)
postRegister in interface MBeanRegistrationdone - indicates whether or not the MBean has been registered.
public void preDeregister()
throws Exception
preDeregister in interface MBeanRegistrationException - on errors.public void postDeregister()
postDeregister in interface MBeanRegistrationpublic MBeanReference getMBean()
MBeanDelegate
getMBean in interface MBeanDelegategetMBean in interface ReferableMBeanpublic Domain getDomain()
MBeanDelegate
getDomain in interface MBeanDelegatepublic LoaderMBean getLoader()
MBeanDelegate
getLoader in interface MBeanDelegatepublic Broker getBroker()
MBeanDelegate
getBroker in interface MBeanDelegatepublic Factory getFactory()
MBeanDelegate
getFactory in interface MBeanDelegatepublic Log getLog(Object object)
MBeanDelegate
getLog in interface MBeanDelegateobject - the object.
public Log getLog()
MBeanDelegate
getLog in interface MBeanDelegatepublic long getRegistrationTime()
MBeanDelegate
getRegistrationTime in interface MBeanDelegatepublic void unregister()
MBeanDelegate
unregister in interface MBeanDelegatepublic long getSequenceNumber()
MBeanDelegate
getSequenceNumber in interface MBeanDelegatepublic void sendNotification(Notification notif)
MBeanDelegate
sendNotification in interface MBeanDelegatenotif - the notification to send.public void sendNotification(String message)
MBeanDelegate
sendNotification in interface MBeanDelegatemessage - the notification message.
public void sendNotification(String message,
Object data)
MBeanDelegate
sendNotification in interface MBeanDelegatemessage - the notification message.data - a user data object of any type.
public void sendNotification(String message,
String name,
String type,
Object oldValue,
Object newValue)
MBeanDelegate
Not that values may be nulls when applicable, e.g. for complicated
attributes and primitives. Null type is replaced with
java.lang.Object.
sendNotification in interface MBeanDelegatemessage - the notification message.name - the attribute name.type - the attribute type.oldValue - the old value.newValue - the new value.public boolean hasListeners()
MBeanDelegate
hasListeners in interface MBeanDelegatepublic String getCanonicalName()
Identifiable
getCanonicalName in interface Identifiable
public void setCanonicalName(String name)
throws MalformedObjectNameException
Identifiable
setCanonicalName in interface Identifiablename - the canonical object name as a string.
MalformedObjectNameException - for an invalid name.public String getNamePattern()
NamePattern
getNamePattern in interface NamePattern
public void setNamePattern(String pattern)
throws MalformedObjectNameException
NamePattern
setNamePattern in interface NamePatternpattern - the name pattern.
MalformedObjectNameException - for an invalid name.public ObjectName getQueryPattern()
NamePattern
getQueryPattern in interface NamePatternpublic void setQueryPattern(ObjectName pattern)
NamePattern
setQueryPattern in interface NamePatternpattern - the query pattern.
public void addNotificationListener(NotificationListener listener,
NotificationFilter filter,
Object handback)
addNotificationListener in interface NotificationBroadcaster
public void removeNotificationListener(NotificationListener listener,
NotificationFilter filter,
Object handback)
throws ListenerNotFoundException
removeNotificationListener in interface NotificationEmitterListenerNotFoundException
public void removeNotificationListener(NotificationListener listener)
throws ListenerNotFoundException
removeNotificationListener in interface NotificationBroadcasterListenerNotFoundExceptionpublic MBeanNotificationInfo[] getNotificationInfo()
getNotificationInfo in interface NotificationBroadcasterpublic ObjectName getObjectName()
public void setObjectName(ObjectName name)
name - the object name.
IllegalStateException - if already registered.public MBeanServer getMBeanServer()
public void setMBeanServer(MBeanServer server)
server - the MBean server.
IllegalStateException - if already registered.public AttributeSupport getAttributeSupport()
protected void unregistered()
protected boolean isUnregistered()
protected ObjectName getUniqueName(MBeanServer server)
throws MalformedObjectNameException
server - the MBean server.
MalformedObjectNameException - on errors.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||