code: public static Collection<MessagingContext> forImportedVariables(
  			String domain,
  			String applicationName,
  			Instance instance,
  			ThoseThat thoseThat ) {
  
  		Map<String,MessagingContext> result = new HashMap<> ();
  		for( ImportedVariable var : ComponentHelpers.findAllImportedVariables( instance.getComponent()).values()) {
  			String componentOrApplicationTemplateName = VariableHelpers.parseVariableName( var.getName()).getKey();
  			if( result.containsKey( componentOrApplicationTemplateName ))
  				continue;
  
  			// When we import a variable, it is either internal or external, but not both!
  			RecipientKind kind = var.isExternal() ? RecipientKind.INTER_APP : RecipientKind.AGENTS;
  			MessagingContext ctx = new MessagingContext( kind, domain, componentOrApplicationTemplateName, thoseThat, applicationName );
  			result.put( componentOrApplicationTemplateName, ctx );
  		}
  
  		return result.values();
  	}
docs: Builds a list of messaging contexts.
  @param domain the domain
  @param applicationName the name of the agent's application
  @param instance the current instance
  @param thoseThat whether we target "those that import" or "those that export"
  @return a non-null list