de.gesellix.docker.client.filesocket.UnixSocketFactorySupport Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of docker-filesocket Show documentation
Show all versions of docker-filesocket Show documentation
Unix Domain Sockets and Named Pipes for the JVM on Linux, macOS, and Windows
The newest version!
package de.gesellix.docker.client.filesocket;
import org.newsclub.net.unix.AFUNIXSocket;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class UnixSocketFactorySupport {
private static final Logger log = LoggerFactory.getLogger(UnixSocketFactorySupport.class);
public boolean isSupported() {
return isSupported(System.getProperty("os.name"));
}
public boolean isSupported(String osName) {
try {
boolean isWindows = osName.toLowerCase().contains("windows");
return !isWindows && AFUNIXSocket.isSupported();
}
catch (Throwable reason) {
log.info("Unix socket not supported", reason);
return false;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy