J2EE1.4 SDK

com.sun.appserv.management.base
Interface BulkAccess

All Superinterfaces:
AMX, AMXMBeanLogging, NotificationBroadcaster, NotificationEmitter, Singleton, Utility

public interface BulkAccess
extends Utility, AMX, Singleton

Bulk access to various JMX constructs. The term "bulk" refers to the fact the multiple MBeans are accessed together on the server side, to minimize remote invocation of many MBeans.

Because a failure can occur with a particular MBeans, results or failures are communicated back in an array of the exact size of the original ObjectName[]. Examining the results array yields either the result, or a Throwable, if one occured. This is why all results are of type Object[].

Clients wishing to use this interface should note that they may first need to obtain an ObjectName[] from a Set or Map of AMX. The easiest way to do this is to use Util.toObjectNames(java.util.Set) followed by conversion of the Set to an ObjectName[].


Field Summary
static java.lang.String J2EE_TYPE
          The j2eeType as returned by AMX.getJ2EEType().
 
Fields inherited from interface com.sun.appserv.management.base.AMX
FULL_TYPE_DELIM, GROUP_CONFIGURATION, GROUP_JSR77, GROUP_MONITORING, GROUP_OTHER, GROUP_UTILITY, J2EE_TYPE_KEY, NAME_KEY, NO_NAME, NULL_NAME
 
Fields inherited from interface com.sun.appserv.management.base.AMXMBeanLogging
LOG_RECORD_KEY, LOG_RECORD_NOTIFICATION_TYPE
 
Method Summary
 java.lang.Object[] bulkGetAttribute(ObjectName[] objectNames, java.lang.String attributeName)
          Call getAttribute( attributeName ) for multiple MBeans.
 java.lang.Object[] bulkGetAttributeNames(ObjectName[] objectNames)
          Call getMBeanInfo().getAttributes() for multiple MBeans, then extracts the Attribute name from each Attribute.
 java.lang.Object[] bulkGetAttributes(ObjectName[] objectNames, java.lang.String[] attributeNames)
          Call getAttributes( attributeNames ) for multiple MBeans.
 java.lang.Object[] bulkGetMBeanAttributeInfo(ObjectName[] objectNames)
          Call getMBeanInfo().getAttributes() for multiple MBeans.
 java.lang.Object[] bulkGetMBeanInfo(ObjectName[] objectNames)
          Call getMBeanInfo() for multiple MBeans.
 java.lang.Object[] bulkGetMBeanOperationInfo(ObjectName[] objectNames)
          Call getMBeanInfo().getOperations() for multiple MBeans.
 java.lang.Object[] bulkInvoke(ObjectName[] objectNames, java.lang.String operationName, java.lang.Object[] args, java.lang.String[] types)
          Call invoke( ... ) for multiple MBeans.
 java.lang.Object[] bulkSetAttribute(ObjectName[] objectNames, Attribute attr)
          Call setAttribute( attr ) for multiple MBeans.
 
Methods inherited from interface com.sun.appserv.management.base.AMX
getContainer, getDomainRoot, getFullType, getGroup, getJ2EEType, getName
 
Methods inherited from interface com.sun.appserv.management.base.AMXMBeanLogging
getMBeanEmitLogNotifications, getMBeanLoggerName, getMBeanLogLevel, setMBeanEmitLogNotifications, setMBeanLogLevel
 
Methods inherited from interface javax.management.NotificationEmitter
removeNotificationListener
 
Methods inherited from interface javax.management.NotificationBroadcaster
addNotificationListener, getNotificationInfo, removeNotificationListener
 

Field Detail

J2EE_TYPE

public static final java.lang.String J2EE_TYPE
The j2eeType as returned by AMX.getJ2EEType().

See Also:
Constant Field Values
Method Detail

bulkGetMBeanInfo

public java.lang.Object[] bulkGetMBeanInfo(ObjectName[] objectNames)
Call getMBeanInfo() for multiple MBeans. For objectNames[ i ], results[ i ] will be the resulting MBeanInfo[], or contain a Throwable if something was thrown.

Parameters:
objectNames -
Returns:
Info[], one for each objectName, null if not found

bulkGetMBeanAttributeInfo

public java.lang.Object[] bulkGetMBeanAttributeInfo(ObjectName[] objectNames)
Call getMBeanInfo().getAttributes() for multiple MBeans. For objectNames[ i ], results[ i ] will be the resulting MBeanAttributeInfo[], or contain a Throwable if something was thrown.

Parameters:
objectNames -
Returns:
AttributeInfo[][], one AttributeInfo[] for each objectName, null if not found

bulkGetMBeanOperationInfo

public java.lang.Object[] bulkGetMBeanOperationInfo(ObjectName[] objectNames)
Call getMBeanInfo().getOperations() for multiple MBeans. For objectNames[ i ], results[ i ] will be the resulting MBeanOperationInfo[], or contain a Throwable if something was thrown.

Parameters:
objectNames -
Returns:
OperationInfo[][], one OperationInfo[] for each objectName, null if not found

bulkGetAttributeNames

public java.lang.Object[] bulkGetAttributeNames(ObjectName[] objectNames)
Call getMBeanInfo().getAttributes() for multiple MBeans, then extracts the Attribute name from each Attribute. For objectNames[ i ], results[ i ] will be the resulting String[], consisting of all Attribute names for that MBean, or contain a Throwable if something was thrown.

Parameters:
objectNames -
Returns:
Object[][], one String[] for each objectName, null if not found, or a Throwable

bulkGetAttribute

public java.lang.Object[] bulkGetAttribute(ObjectName[] objectNames,
                                           java.lang.String attributeName)
Call getAttribute( attributeName ) for multiple MBeans. For objectNames[ i ], results[ i ] will be the resulting value, or contain a Throwable if something was thrown..

Parameters:
objectNames -
attributeName -
Returns:
array of Object, which may be the Attribute value, or a Throwable

bulkSetAttribute

public java.lang.Object[] bulkSetAttribute(ObjectName[] objectNames,
                                           Attribute attr)
Call setAttribute( attr ) for multiple MBeans. For objectNames[ i ], results[ i ] will be null if successful, or contain a Throwable if not.

Parameters:
objectNames -
attr -
Returns:
array of Object, each is null or a Throwable

bulkGetAttributes

public java.lang.Object[] bulkGetAttributes(ObjectName[] objectNames,
                                            java.lang.String[] attributeNames)
Call getAttributes( attributeNames ) for multiple MBeans. For objectNames[ i ], results[ i ] will contain the resulting AttributeList, or a Throwable if unsuccessful.

Returns:
array of Object, which may be the AttributeList, or a Throwable

bulkInvoke

public java.lang.Object[] bulkInvoke(ObjectName[] objectNames,
                                     java.lang.String operationName,
                                     java.lang.Object[] args,
                                     java.lang.String[] types)
Call invoke( ... ) for multiple MBeans. For objectNames[ i ], results[ i ] will be the result, or contain a Throwable if something was thrown..

WARNING: No guarantee can be made that the MBeans being invoked will not alter their arguments, thus altering the parameters that subsequent MBeans receive when invoked.

Parameters:
objectNames -
operationName -
args -
types -
Returns:
array of Object, which will be the result of the invoke, or a Throwable

J2EE1.4 SDK

Submit a bug or feature

Copyright 2003 Sun Microsystems, Inc. All rights reserved.