use of org.eclipse.jetty.io.SocketChannelEndPoint in project jetty.project by eclipse.
the class ServerConnector method newEndPoint.
protected ChannelEndPoint newEndPoint(SocketChannel channel, ManagedSelector selectSet, SelectionKey key) throws IOException {
SocketChannelEndPoint endpoint = new SocketChannelEndPoint(channel, selectSet, key, getScheduler());
endpoint.setIdleTimeout(getIdleTimeout());
return endpoint;
}
use of org.eclipse.jetty.io.SocketChannelEndPoint in project athenz by yahoo.
the class JettyConnectionLoggerTest method getMockConnection.
private MockedConnection getMockConnection() throws Exception {
MockedConnection mockedConnection = new MockedConnection();
SSLEngine sslEngine = Mockito.mock(SSLEngine.class);
mockedConnection.sslEngine = sslEngine;
SslConnection sslConnection = Mockito.mock(SslConnection.class);
when(sslConnection.getSSLEngine()).thenReturn(sslEngine);
SocketChannelEndPoint socketChannelEndPoint = Mockito.mock(SocketChannelEndPoint.class);
when(socketChannelEndPoint.getLocalAddress()).thenReturn(new InetSocketAddress(InetAddress.getLocalHost(), 4444));
when(socketChannelEndPoint.getRemoteAddress()).thenReturn(new InetSocketAddress(InetAddress.getLocalHost(), 5555));
when(sslConnection.getEndPoint()).thenReturn(socketChannelEndPoint);
mockedConnection.endpoint = socketChannelEndPoint;
mockedConnection.sslConnection = sslConnection;
return mockedConnection;
}
Aggregations