1
1
package com .github .dockerjava .netty ;
2
2
3
+ import static com .google .common .base .Preconditions .checkNotNull ;
4
+
5
+ import java .io .IOException ;
6
+ import java .net .InetAddress ;
7
+ import java .net .InetSocketAddress ;
8
+ import java .net .SocketAddress ;
9
+ import java .security .Security ;
10
+
11
+ import javax .net .ssl .SSLContext ;
12
+ import javax .net .ssl .SSLEngine ;
13
+ import javax .net .ssl .SSLParameters ;
14
+
15
+ import org .bouncycastle .jce .provider .BouncyCastleProvider ;
16
+
3
17
import com .github .dockerjava .api .command .AttachContainerCmd ;
4
18
import com .github .dockerjava .api .command .AuthCmd ;
5
19
import com .github .dockerjava .api .command .BuildImageCmd ;
38
52
import com .github .dockerjava .api .command .RemoveImageCmd ;
39
53
import com .github .dockerjava .api .command .RemoveNetworkCmd ;
40
54
import com .github .dockerjava .api .command .RemoveVolumeCmd ;
55
+ import com .github .dockerjava .api .command .RenameContainerCmd ;
41
56
import com .github .dockerjava .api .command .RestartContainerCmd ;
42
57
import com .github .dockerjava .api .command .SaveImageCmd ;
43
58
import com .github .dockerjava .api .command .SearchImagesCmd ;
50
65
import com .github .dockerjava .api .command .UpdateContainerCmd ;
51
66
import com .github .dockerjava .api .command .VersionCmd ;
52
67
import com .github .dockerjava .api .command .WaitContainerCmd ;
53
- import com .github .dockerjava .api .command .RenameContainerCmd ;
54
68
import com .github .dockerjava .core .DockerClientConfig ;
55
69
import com .github .dockerjava .core .DockerClientImpl ;
56
70
import com .github .dockerjava .core .LocalDirectorySSLConfig ;
91
105
import com .github .dockerjava .netty .exec .RemoveImageCmdExec ;
92
106
import com .github .dockerjava .netty .exec .RemoveNetworkCmdExec ;
93
107
import com .github .dockerjava .netty .exec .RemoveVolumeCmdExec ;
108
+ import com .github .dockerjava .netty .exec .RenameContainerCmdExec ;
94
109
import com .github .dockerjava .netty .exec .RestartContainerCmdExec ;
95
110
import com .github .dockerjava .netty .exec .SaveImageCmdExec ;
96
111
import com .github .dockerjava .netty .exec .SearchImagesCmdExec ;
103
118
import com .github .dockerjava .netty .exec .UpdateContainerCmdExec ;
104
119
import com .github .dockerjava .netty .exec .VersionCmdExec ;
105
120
import com .github .dockerjava .netty .exec .WaitContainerCmdExec ;
106
- import com .github .dockerjava .netty .exec .RenameContainerCmdExec ;
107
121
108
122
import io .netty .bootstrap .Bootstrap ;
109
- import io .netty .channel .Channel ;
110
123
import io .netty .channel .ChannelFactory ;
111
124
import io .netty .channel .ChannelInitializer ;
112
125
import io .netty .channel .EventLoopGroup ;
113
- import io .netty .channel .epoll .EpollDomainSocketChannel ;
114
- import io .netty .channel .epoll .EpollEventLoopGroup ;
115
126
import io .netty .channel .nio .NioEventLoopGroup ;
116
127
import io .netty .channel .socket .DuplexChannel ;
117
128
import io .netty .channel .socket .SocketChannel ;
118
129
import io .netty .channel .socket .nio .NioSocketChannel ;
119
- import io .netty .channel .unix .DomainSocketAddress ;
120
- import io .netty .channel .unix .UnixChannel ;
121
130
import io .netty .handler .codec .http .HttpClientCodec ;
122
131
import io .netty .handler .logging .LoggingHandler ;
123
132
import io .netty .handler .ssl .SslHandler ;
124
133
import io .netty .util .concurrent .DefaultThreadFactory ;
125
-
126
- import org .bouncycastle .jce .provider .BouncyCastleProvider ;
127
-
128
- import unisockets .Addr ;
129
-
130
- import javax .net .ssl .SSLContext ;
131
- import javax .net .ssl .SSLEngine ;
132
- import javax .net .ssl .SSLParameters ;
133
-
134
- import java .io .IOException ;
135
- import java .net .InetAddress ;
136
- import java .net .InetSocketAddress ;
137
- import java .net .SocketAddress ;
138
- import java .nio .channels .SelectionKey ;
139
- import java .nio .channels .Selector ;
140
- import java .security .Security ;
141
-
142
134
import jnr .enxio .channels .NativeSelectorProvider ;
143
- import jnr .unixsocket .UnixServerSocketChannel ;
144
- import jnr .unixsocket .UnixSocketAddress ;
145
- import jnr .unixsocket .UnixSocketChannel ;
146
- import static com .google .common .base .Preconditions .checkNotNull ;
135
+ import unisockets .Addr ;
147
136
148
137
/**
149
138
* Experimental implementation of {@link DockerCmdExecFactory} that supports http connection hijacking that is needed to pass STDIN to the
@@ -232,7 +221,8 @@ private class UnixDomainSocketInitializer implements NettyInitializer {
232
221
@ Override
233
222
public EventLoopGroup init (Bootstrap bootstrap , DockerClientConfig dockerClientConfig ) {
234
223
235
- EventLoopGroup nioEventLoopGroup = new NioEventLoopGroup (0 , new DefaultThreadFactory (threadPrefix ), NativeSelectorProvider .getInstance ());
224
+ EventLoopGroup nioEventLoopGroup = new NioEventLoopGroup (0 ,
225
+ new DefaultThreadFactory (threadPrefix ), NativeSelectorProvider .getInstance ());
236
226
237
227
ChannelFactory <NioSocketChannel > factory = new ChannelFactory <NioSocketChannel >() {
238
228
0 commit comments