forked from docker-java/docker-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUnixSocketFactory.java
More file actions
46 lines (36 loc) · 1.14 KB
/
Copy pathUnixSocketFactory.java
File metadata and controls
46 lines (36 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package com.github.dockerjava.okhttp;
import com.github.dockerjava.transport.UnixSocket;
import javax.net.SocketFactory;
import java.io.IOException;
import java.net.InetAddress;
import java.net.Socket;
class UnixSocketFactory extends SocketFactory {
private final String socketPath;
UnixSocketFactory(String socketPath) {
this.socketPath = socketPath;
}
@Override
public Socket createSocket() {
try {
return UnixSocket.get(socketPath);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
@Override
public Socket createSocket(String s, int i) {
throw new UnsupportedOperationException();
}
@Override
public Socket createSocket(String s, int i, InetAddress inetAddress, int i1) {
throw new UnsupportedOperationException();
}
@Override
public Socket createSocket(InetAddress inetAddress, int i) {
throw new UnsupportedOperationException();
}
@Override
public Socket createSocket(InetAddress inetAddress, int i, InetAddress inetAddress1, int i1) {
throw new UnsupportedOperationException();
}
}