Search in sources :

Example 1 with TcpServerContext

use of com.hazelcast.internal.server.tcp.TcpServerContext in project hazelcast by hazelcast.

the class DefaultNodeContext method createServer.

@Override
public Server createServer(Node node, ServerSocketRegistry registry, LocalAddressRegistry addressRegistry) {
    TcpServerContext context = new TcpServerContext(node, node.nodeEngine);
    Networking networking = createNetworking(node);
    Config config = node.getConfig();
    MetricsRegistry metricsRegistry = node.nodeEngine.getMetricsRegistry();
    return new TcpServer(config, context, registry, addressRegistry, metricsRegistry, networking, node.getNodeExtension().createChannelInitializerFn(context));
}
Also used : MetricsRegistry(com.hazelcast.internal.metrics.MetricsRegistry) Networking(com.hazelcast.internal.networking.Networking) NioNetworking(com.hazelcast.internal.networking.nio.NioNetworking) Config(com.hazelcast.config.Config) ConfigAccessor.getActiveMemberNetworkConfig(com.hazelcast.config.ConfigAccessor.getActiveMemberNetworkConfig) MemberAddressProviderConfig(com.hazelcast.config.MemberAddressProviderConfig) TcpServerContext(com.hazelcast.internal.server.tcp.TcpServerContext) TcpServer(com.hazelcast.internal.server.tcp.TcpServer)

Example 2 with TcpServerContext

use of com.hazelcast.internal.server.tcp.TcpServerContext in project hazelcast by hazelcast.

the class MockNodeContext method createServer.

@Override
public Server createServer(Node node, ServerSocketRegistry serverSocketRegistry, LocalAddressRegistry addressRegistry) {
    TcpServerContext serverContext = new TcpServerContext(node, node.nodeEngine);
    MockServer mockNetworkingService = new MockServer(serverContext, node, registry);
    return new FirewallingServer(mockNetworkingService, initiallyBlockedAddresses);
}
Also used : FirewallingServer(com.hazelcast.internal.server.FirewallingServer) TcpServerContext(com.hazelcast.internal.server.tcp.TcpServerContext)

Aggregations

TcpServerContext (com.hazelcast.internal.server.tcp.TcpServerContext)2 Config (com.hazelcast.config.Config)1 ConfigAccessor.getActiveMemberNetworkConfig (com.hazelcast.config.ConfigAccessor.getActiveMemberNetworkConfig)1 MemberAddressProviderConfig (com.hazelcast.config.MemberAddressProviderConfig)1 MetricsRegistry (com.hazelcast.internal.metrics.MetricsRegistry)1 Networking (com.hazelcast.internal.networking.Networking)1 NioNetworking (com.hazelcast.internal.networking.nio.NioNetworking)1 FirewallingServer (com.hazelcast.internal.server.FirewallingServer)1 TcpServer (com.hazelcast.internal.server.tcp.TcpServer)1