org.mc4j.ems.connection.bean
Interface EmsBean

All Superinterfaces:
java.lang.Comparable

public interface EmsBean
extends java.lang.Comparable

An MBean.

Version:
$Revision: 592 $($Author: ghinkl $ / $Date: 2008-09-16 12:32:53 -0400 (Tue, 16 Sep 2008) $)
Author:
Greg Hinkle (ghinkle@users.sourceforge.net), Apr 4, 2005

Method Summary
 EmsAttribute getAttribute(java.lang.String name)
          Returns the attribute with the specified name, or null if this MBean has no such attribute.
 java.util.SortedSet<EmsAttribute> getAttributes()
          Returns the set of all attributes for this MBean; never null.
 EmsBeanName getBeanName()
          Returns the name of this MBean as an EmsBeanName (analogous to javax.management.ObjectName; never null.
 java.lang.Class getClassType()
          This MBean's interface class (e.g.
 java.lang.String getClassTypeName()
          The fully qualified class name of this MBean's interface (e.g.
 ConnectionProvider getConnectionProvider()
          Returns the connection provider that was used to load this MBean; never null.
 EmsNotification getNotification(java.lang.String name)
          Returns the notification with the specified name, or null if this MBean has no such notification.
 java.util.SortedSet<EmsNotification> getNotifications()
          Returns the set of all notifications for this MBean; never null.
 EmsOperation getOperation(java.lang.String name)
          Deprecated. getOperation(String, Class[]) should be used instead
 EmsOperation getOperation(java.lang.String name, java.lang.Class... parameterTypes)
          Returns the operation with the specified name and parameter types, or null if this MBean has no such operation.
 java.util.SortedSet<EmsOperation> getOperations()
          Returns the set of all operations for this MBean; never null.
<T> T
getProxy(java.lang.Class<T> beanInterface)
          Returns a proxy for this MBean, typed to the specified interface (typically its MBean interface); never null.
 boolean isHasUnsupportedType()
          Returns true if this MBean has one or more attributes or operations with unsupported types, otherwise returns false.
 boolean isNotificationEmiter()
          Returns true if this MBean defines one or more notifications, otherwise returns false.
 boolean isRegistered()
          This sends a request to the server to check that this MBean is still registered on the server.
 void loadSynchronous()
           
 java.util.List<EmsAttribute> refreshAttributes()
          Refresh, from the server, all attribute values for this MBean and return the set of attributes; never null.
 java.util.List<EmsAttribute> refreshAttributes(java.util.List<java.lang.String> names)
          Return a specific subset of EmsAttributes for a bean based on the requested list of attributes by name.
 void unregister()
          Unregisters this MBean from the server.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getBeanName

EmsBeanName getBeanName()
Returns the name of this MBean as an EmsBeanName (analogous to javax.management.ObjectName; never null.

Returns:
the name of this MBean as an EmsBeanName (analogous to javax.management.ObjectName; never null

getConnectionProvider

ConnectionProvider getConnectionProvider()
Returns the connection provider that was used to load this MBean; never null.

Returns:
the connection provider that was used to load this MBean; never null

getProxy

<T> T getProxy(java.lang.Class<T> beanInterface)
Returns a proxy for this MBean, typed to the specified interface (typically its MBean interface); never null. Example Usage: FooMBean fooMBean = getProxy(FooMBean.class);

Type Parameters:
T - the interface that the proxy should implement
Parameters:
beanInterface - the interface class that the proxy should implement
Returns:
a proxy for this MBean, typed to the specified interface (typically its MBean interface); never null

loadSynchronous

void loadSynchronous()

getAttributes

java.util.SortedSet<EmsAttribute> getAttributes()
Returns the set of all attributes for this MBean; never null.

Returns:
the set of all attributes for this MBean; never null

refreshAttributes

java.util.List<EmsAttribute> refreshAttributes()
Refresh, from the server, all attribute values for this MBean and return the set of attributes; never null.

Returns:
the list of all attributes, with updated values from the server; never null

refreshAttributes

java.util.List<EmsAttribute> refreshAttributes(java.util.List<java.lang.String> names)
Return a specific subset of EmsAttributes for a bean based on the requested list of attributes by name. This method can be used to load a group of attributes with a single server call. Attributes updated in this fashion do update their internal representation and do fire events on the changes. Never null.

Parameters:
names - the names of attributes to load
Returns:
the list of requested attributes, with updated values from the server; never null

getAttribute

EmsAttribute getAttribute(java.lang.String name)
Returns the attribute with the specified name, or null if this MBean has no such attribute.

Parameters:
name - the attribute name
Returns:
the attribute with the specified name, or null if this MBean has no such attribute

getClassTypeName

java.lang.String getClassTypeName()
The fully qualified class name of this MBean's interface (e.g. "com.example.FooMBean"), as defined in its MBeanInfo.

Returns:
the name of this MBean's Java interface (e.g. "com.example.FooMBean"), as defined in its MBeanInfo

getClassType

java.lang.Class getClassType()
                             throws java.lang.ClassNotFoundException
This MBean's interface class (e.g. com.example.FooMBean), as defined in its MBeanInfo.

Returns:
this MBean's interface class (e.g. com.example.FooMBean), as defined in its MBeanInfo
Throws:
java.lang.ClassNotFoundException - if the MBean's interface class could not be found in our class loader

getOperations

java.util.SortedSet<EmsOperation> getOperations()
Returns the set of all operations for this MBean; never null.

Returns:
the set of all operations for this MBean; never null

getOperation

EmsOperation getOperation(java.lang.String name)
Deprecated. getOperation(String, Class[]) should be used instead

Returns an operation with the specified name, or null if this MBean has no such operations. NOTE: If the MBean has more than one operation defined with the specified name, the operation that is returned is indeterminate, which is why this method has been deprecated in favor of getOperation(String, Class[]).

Parameters:
name - the operation name
Returns:
an operation with the specified name, or null if this MBean has no such operations

getOperation

EmsOperation getOperation(java.lang.String name,
                          java.lang.Class... parameterTypes)
Returns the operation with the specified name and parameter types, or null if this MBean has no such operation.

Parameters:
name - the operation name
parameterTypes - the operation parameter types
Returns:
the operation with the specified name and parameter types, or null if this MBean has no such operation

getNotifications

java.util.SortedSet<EmsNotification> getNotifications()
Returns the set of all notifications for this MBean; never null.

Returns:
the set of all notifications for this MBean; never null

getNotification

EmsNotification getNotification(java.lang.String name)
Returns the notification with the specified name, or null if this MBean has no such notification.

Parameters:
name - the notification name
Returns:
the notification with the specified name, or null if this MBean has no such notification

unregister

void unregister()
Unregisters this MBean from the server.


isRegistered

boolean isRegistered()
This sends a request to the server to check that this MBean is still registered on the server.

Returns:
true if the MBean is still registered in the MBeanServer

isNotificationEmiter

boolean isNotificationEmiter()
Returns true if this MBean defines one or more notifications, otherwise returns false.

Returns:
true if this MBean defines one or more notifications, otherwise returns false

isHasUnsupportedType

boolean isHasUnsupportedType()
Returns true if this MBean has one or more attributes or operations with unsupported types, otherwise returns false.

Returns:
true if this MBean has one or more attributes or operations with unsupported types, otherwise returns false