use of com.hazelcast.internal.server.ServerConnection in project hazelcast by hazelcast.
the class UnifiedProtocolEncoder method initChannelForCluster.
private void initChannelForCluster() {
channel.options().setOption(SO_SNDBUF, props.getInteger(SOCKET_SEND_BUFFER_SIZE) * KILO_BYTE);
ServerConnection connection = (TcpServerConnection) channel.attributeMap().get(ServerConnection.class);
OutboundHandler[] handlers = serverContext.createOutboundHandlers(EndpointQualifier.MEMBER, connection);
channel.outboundPipeline().replace(this, handlers);
}
use of com.hazelcast.internal.server.ServerConnection in project hazelcast by hazelcast.
the class ClientBwListConfigHandlerTest method testApplyConfig_emptyWhitelist_doesNotDisconnectMCClient.
@Test
public void testApplyConfig_emptyWhitelist_doesNotDisconnectMCClient() {
handler.applyConfig(createConfig(Mode.WHITELIST));
ServerConnection mockConnection = mock(ServerConnection.class);
when(mockConnection.getConnectionType()).thenReturn(ConnectionType.MC_JAVA_CLIENT);
ClientEndpointImpl mcClient = new ClientEndpointImpl(clientEngine, getNodeEngineImpl(instance), mockConnection);
assertTrue(clientEngine.isClientAllowed(mcClient));
}
Aggregations