use of org.gradle.launcher.daemon.protocol.Message in project gradle by gradle.
the class DefaultDaemonConnector method connectToDaemon.
private DaemonClientConnection connectToDaemon(DaemonConnectDetails daemon, DaemonClientConnection.StaleAddressDetector staleAddressDetector) throws ConnectException {
ProgressLogger progressLogger = progressLoggerFactory.newOperation(DefaultDaemonConnector.class).start("Connecting to Gradle Daemon", "Connecting to Daemon");
RemoteConnection<Message> connection;
try {
connection = connector.connect(daemon.getAddress()).create(Serializers.stateful(DaemonMessageSerializer.create()));
} catch (ConnectException e) {
staleAddressDetector.maybeStaleAddress(e);
throw e;
} finally {
progressLogger.completed();
}
return new DaemonClientConnection(connection, daemon, staleAddressDetector);
}
Aggregations