Created
June 10, 2015 08:36
-
-
Save slnowak/a9e26daaa566310b1cd4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component | |
public class FancyClass { | |
private final DockerClient dockerClient; | |
@Autowired | |
public FancyClass(DockerClient dockerClient) { | |
this.dockerClient = dockerClient; | |
} | |
@PostConstruct | |
private void doSth() { | |
dockerClient | |
.statsCmd(new StatsCallback() { | |
@Override | |
public void onStats(Statistics stats) { | |
System.out.println(stats.getMemoryStats()); | |
} | |
@Override | |
public void onException(Throwable throwable) { | |
} | |
@Override | |
public void onCompletion(int numStats) { | |
System.out.println("something happen " + numStats); | |
} | |
@Override | |
public boolean isReceiving() { | |
return true; | |
} | |
}) | |
.withContainerId("94cdd5d7715be407884a82e0f4d8ef0816efb9b367d5fd88784b5a71a46e6b3d") | |
.exec(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment