Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: a9c081020f7fb2c9f0578662016fcfa7ee0da31d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package org.eclipse.ecf.internal.examples.raspberrypi.management.consumer;

import java.util.Map;
import java.util.concurrent.CompletableFuture;

import org.eclipse.ecf.examples.raspberrypi.management.IRaspberryPiAsync;

public class RaspberryPiComponent {

	void bindRaspberryPi(IRaspberryPiAsync rpi) {
		CompletableFuture<Map<String,String>> future = rpi.getSystemPropertiesAsync();
		future.thenAccept((map) -> {
			System.out.println("Found RaspberryPi");
			for(String key: map.keySet()) 
				System.out.println("  "+key+"="+map.get(key));
		});
	}
}

Back to the top