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

io.fabric8.maven.docker.access.hc.win.NpipeConnectionSocketFactory Maven / Gradle / Ivy

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

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 org.apache.http.protocol.HttpContext;

import io.fabric8.maven.docker.util.Logger;

final class NpipeConnectionSocketFactory extends AbstractNativeSocketFactory {

	// Logging
    private final Logger log;

    NpipeConnectionSocketFactory(String npipePath, Logger log) {
        super(npipePath);
        this.log = log;
    }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy