All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.fabric8.maven.docker.access.hc.unix.UnixConnectionSocketFactory Maven / Gradle / Ivy

There is a newer version: 0.45.0
Show newest version
package io.fabric8.maven.docker.access.hc.unix;

import java.io.File;
import java.io.IOException;
import java.net.Socket;
import java.net.SocketAddress;

import io.fabric8.maven.docker.access.hc.util.AbstractNativeSocketFactory;
import jnr.unixsocket.UnixSocketAddress;
import org.apache.http.protocol.HttpContext;

final class UnixConnectionSocketFactory extends AbstractNativeSocketFactory {

    UnixConnectionSocketFactory(String unixSocketPath) {
        super(unixSocketPath);
    }

    @Override
    public Socket createSocket(HttpContext context) throws IOException {
        return new UnixSocket();
    }

    @Override
    protected SocketAddress createSocketAddress(String path) {
        return new UnixSocketAddress(new File(path));
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy