private List<MethodSubscriber> monitorInstances(List<ImmutablePair<String, String>> instances) throws ConsoleInitializationException, MicroAgentException {
		List<MethodSubscriber> result = new ArrayList<MethodSubscriber>();

    	microAgent = new MicroAgent(hawkDomain, hawkRvService, hawkRvNetwork, hawkRvDaemon, "COM.TIBCO.admin.TRA");

    	getLog().info("");
		getLog().info(SUBSCRIBING_TO_HAWK_METHODS);

    	for (ImmutablePair<String, String> instance : instances) {
    		MethodSubscriber ms = new MethodSubscriber(microAgent);
    		ms.setMethodName("getComponentInstanceStatus");
    		ms.setArguments(instance.left, instance.right);
    		ms.setInterval(hawkSubscribeInterval);
    		ms.setNumberOfRetry(hawkSubscribeNumberOfRetry);
    		ms.subscribe(new RunningInstanceSubscriptionHandler(getLog(), ms, numberOfRunningStatuses));

    		result.add(ms);
		}

		return result;
	}
private List<MethodSubscriber> monitorInstances(List<ImmutablePair<String, String>> instances) throws ConsoleInitializationException, MicroAgentException {
		List<MethodSubscriber> result = new ArrayList<MethodSubscriber>();

    	microAgent = new MicroAgent(hawkDomain, hawkRvService, hawkRvNetwork, hawkRvDaemon, "COM.TIBCO.admin.TRA");

    	getLog().info("");
		getLog().info(SUBSCRIBING_TO_HAWK_METHODS);

    	for (ImmutablePair<String, String> instance : instances) {
    		MethodSubscriber ms = new MethodSubscriber(microAgent);
    		ms.setMethodName("getComponentInstanceStatus");
    		ms.setArguments(instance.left, instance.right);
    		ms.setInterval(hawkSubscribeInterval);
    		ms.setNumberOfRetry(hawkSubscribeNumberOfRetry);
    		ms.subscribe(new RunningInstanceSubscriptionHandler(getLog(), ms, numberOfRunningStatuses));

    		result.add(ms);
		}

		return result;
	}
private List < MethodSubscriber > monitorInstances ( List < ImmutablePair < String , String > > instances ) throws ConsoleInitializationException , MicroAgentException { List < MethodSubscriber > result = new ArrayList < MethodSubscriber > ( ) ; microAgent = new MicroAgent ( hawkDomain , hawkRvService , hawkRvNetwork , hawkRvDaemon , "COM.TIBCO.admin.TRA" ) ; getLog ( ) . info ( "" ) ; getLog ( ) . info ( SUBSCRIBING_TO_HAWK_METHODS ) ; for ( ImmutablePair < String , String > instance : instances ) { MethodSubscriber ms = new MethodSubscriber ( microAgent ) ; ms . setMethodName ( "getComponentInstanceStatus" ) ; ms . setArguments ( instance . left , instance . right ) ; ms . setInterval ( hawkSubscribeInterval ) ; ms . setNumberOfRetry ( hawkSubscribeNumberOfRetry ) ; ms . subscribe ( new RunningInstanceSubscriptionHandler ( getLog ( ) , ms , numberOfRunningStatuses ) ) ; result . add ( ms ) ; } return result ; }
This methods subscribe to the Hawk method
"COM.TIBCO.admin.TRA:getComponentInstanceStatus" for all
{@code instances} being started.

@param instances
@return a list of {@link MethodSubscriber} objects
@throws ConsoleInitializationException
@throws MicroAgentException
This methods subscribe to the Hawk method COM . TIBCO . admin . TRA : getComponentInstanceStatus for all { @code instances } being started .