JsMessagingEngine[] removeStoppedMEs (JsMessagingEngine[] MEList)
    {
        final String methodName = "removeStoppedMEs";
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled())
        {
            SibTr.entry(this, TRACE, methodName, MEList);
        }
        JsMessagingEngine[] startedMEs = SibRaEngineComponent.getActiveMessagingEngines(_endpointConfiguration.getBusName());
        List<JsMessagingEngine> runningMEs = Arrays.asList(startedMEs);
        List<JsMessagingEngine> newList = new ArrayList<JsMessagingEngine> ();
        for (int i = 0; i < MEList.length; i++)
        {
          JsMessagingEngine nextME = MEList [i];
          if (runningMEs.contains(nextME))
          {
            newList.add (nextME);
          }
        }

        JsMessagingEngine[] retVal = new JsMessagingEngine[newList.size ()];
        retVal = newList.toArray (retVal);

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled())
        {
            SibTr.exit(this, TRACE, methodName, retVal);
        }
        return retVal;
    }
JsMessagingEngine [ ] removeStoppedMEs ( JsMessagingEngine [ ] MEList ) { final String methodName = "removeStoppedMEs" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName , MEList ) ; } JsMessagingEngine [ ] startedMEs = SibRaEngineComponent . getActiveMessagingEngines ( _endpointConfiguration . getBusName ( ) ) ; List < JsMessagingEngine > runningMEs = Arrays . asList ( startedMEs ) ; List < JsMessagingEngine > newList = new ArrayList < JsMessagingEngine > ( ) ; for ( int i = 0 ; i < MEList . length ; i ++ ) { JsMessagingEngine nextME = MEList [ i ] ; if ( runningMEs . contains ( nextME ) ) { newList . add ( nextME ) ; } } JsMessagingEngine [ ] retVal = new JsMessagingEngine [ newList . size ( ) ] ; retVal = newList . toArray ( retVal ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . exit ( this , TRACE , methodName , retVal ) ; } return retVal ; }
This method will remove non running MEs from the supplied array of MEs
@param MEList The list of MEs
@return A new array of MEs which only contain the running MEs from the supplied Array.