com.ibm.websphere.management.dynamicproxy
Interface AggregationHandler


public interface AggregationHandler

DynamicProxy MBean result aggregation handler interface. Implementation of this interface can be specified in MBeanDescriptor's MBean xml tag's attribute called "aggregationHandlerClass."

example MBeanDescriptor header & initial MBean tag:

 <?xml version="1.0" encoding="UTF-8"?> 
 <!DOCTYPE MBean SYSTEM "MbeanDescriptor.dtd"> 
 < MBean type="SampleStateMBean" 
  collaboratorClass="com.ibm.ws390.scaffold.SampleStateMBeanProxy" 
  aggregationHandlerClass="com.ibm.ws390.scaffold.SampleStateAggregationHandler" 
  eventHandlerClass="com.ibm.ws390.scaffold.SampleStateEventHandler" 
  invocationHandlerClass="com.ibm.ws390.scaffold.SampleStateInvocationHandler" 
  stateObjectClass="com.ibm.ws390.scaffold.SampleState" 
  version="5.0" 
  platform="dynamicproxy" 
  description="Sample state MBean."> 
 : 
 : 
 

This interface defines the method that must be implemented by MBean provider who wants to handle result aggregation in dynamicproxy enabled MBean for WebSphere for z/OS for all MBean methods that uses "multicall" or "spray" proxyInvokeType and returns a return value. Implementation of this interface should be able to first determine exactly which method this aggregation is to be processed for and then properly aggregate all servant MBeans' results that are passed in and compile up a single result to be returned.


Method Summary
 java.lang.Object aggregateResults(java.lang.String methodName, java.lang.Object[] params, java.lang.String[] signatures, java.lang.Object[] servantMBeanResults, StateObject stateObject)
          Return an aggregated result from a multicall Mbean operation which compiles through all servant MBeans' results and returns a respective single return value for an invoked method.
 

Method Detail

aggregateResults

public java.lang.Object aggregateResults(java.lang.String methodName,
                                         java.lang.Object[] params,
                                         java.lang.String[] signatures,
                                         java.lang.Object[] servantMBeanResults,
                                         StateObject stateObject)
Return an aggregated result from a multicall Mbean operation which compiles through all servant MBeans' results and returns a respective single return value for an invoked method.

Parameters:
methodName - MBean method name
params - MBean method parameters
signatures - MBean method signatures
servantMBeanResults - Result of each servant MBean instances invoked by the dynamicproxy multicast invocation. Note: this value can be "null" OR can be an array of "null"s in case return value of the method is "void." Implementation of this method MUST handle this case to avoid a NullPointerException.
stateObject - MBean provider provided StateObject used by dynamicproxy MBean in CR to manage its state. Note: this object MAY BE null if "stateObjectClass" was not specified OR internal error occurred during initialization of this dynamicproxy MBean. Implmentation MUST properly handle "null" input.
Returns:
aggregated result as defined by MBean xml for specified MBean operation.