// If this is a listener attached to the Aggregate Controller, use GetMeta Error
// Thresholds defined to determine what to do next after failure. Either terminate
// the service or disable the delegate with which this listener is associated with
if ( controller != null && controller instanceof AggregateAnalysisEngineController )
{
ErrorHandler handler = null;
Iterator it = controller.getErrorHandlerChain().iterator();
// Find the error handler for GetMeta in the Error Handler List provided in the
// deployment descriptor
while ( it.hasNext() )
{
handler = (ErrorHandler)it.next();
if ( handler instanceof GetMetaErrorHandler )
{
break;
}
}
// Fetch a Map containing thresholds for GetMeta for each delegate.
java.util.Map thresholds = handler.getEndpointThresholdMap();
// Lookup delegate's key using delegate's endpoint name
String delegateKey = ((AggregateAnalysisEngineController)controller).lookUpDelegateKey(endpoint.getEndpoint());
// If the delegate has a threshold defined on GetMeta apply Action defined
if ( delegateKey != null && thresholds.containsKey(delegateKey))
{