Search in sources :

Example 11 with EndpointConfig

use of com.hazelcast.config.EndpointConfig in project hazelcast by hazelcast.

the class TcpServerContext method getOutboundPorts.

@Override
public Collection<Integer> getOutboundPorts(EndpointQualifier endpointQualifier) {
    final AdvancedNetworkConfig advancedNetworkConfig = node.getConfig().getAdvancedNetworkConfig();
    if (advancedNetworkConfig.isEnabled()) {
        EndpointConfig endpointConfig = advancedNetworkConfig.getEndpointConfigs().get(endpointQualifier);
        final Collection<Integer> outboundPorts = endpointConfig != null ? endpointConfig.getOutboundPorts() : Collections.<Integer>emptyList();
        final Collection<String> outboundPortDefinitions = endpointConfig != null ? endpointConfig.getOutboundPortDefinitions() : Collections.<String>emptyList();
        return AddressUtil.getOutboundPorts(outboundPorts, outboundPortDefinitions);
    }
    final NetworkConfig networkConfig = node.getConfig().getNetworkConfig();
    final Collection<Integer> outboundPorts = networkConfig.getOutboundPorts();
    final Collection<String> outboundPortDefinitions = networkConfig.getOutboundPortDefinitions();
    return AddressUtil.getOutboundPorts(outboundPorts, outboundPortDefinitions);
}
Also used : AdvancedNetworkConfig(com.hazelcast.config.AdvancedNetworkConfig) NetworkConfig(com.hazelcast.config.NetworkConfig) AdvancedNetworkConfig(com.hazelcast.config.AdvancedNetworkConfig) EndpointConfig(com.hazelcast.config.EndpointConfig) RestServerEndpointConfig(com.hazelcast.config.RestServerEndpointConfig)

Aggregations

EndpointConfig (com.hazelcast.config.EndpointConfig)11 ServerSocketEndpointConfig (com.hazelcast.config.ServerSocketEndpointConfig)6 EndpointQualifier (com.hazelcast.instance.EndpointQualifier)5 AdvancedNetworkConfig (com.hazelcast.config.AdvancedNetworkConfig)4 RestServerEndpointConfig (com.hazelcast.config.RestServerEndpointConfig)3 WanBatchPublisherConfig (com.hazelcast.config.WanBatchPublisherConfig)2 WanReplicationConfig (com.hazelcast.config.WanReplicationConfig)2 AuditlogConfig (com.hazelcast.config.AuditlogConfig)1 Config (com.hazelcast.config.Config)1 EncryptionAtRestConfig (com.hazelcast.config.EncryptionAtRestConfig)1 InvalidConfigurationException (com.hazelcast.config.InvalidConfigurationException)1 MemberAddressProviderConfig (com.hazelcast.config.MemberAddressProviderConfig)1 NetworkConfig (com.hazelcast.config.NetworkConfig)1 PersistenceConfig (com.hazelcast.config.PersistenceConfig)1 SSLConfig (com.hazelcast.config.SSLConfig)1 SecurityConfig (com.hazelcast.config.SecurityConfig)1 TcpIpConfig (com.hazelcast.config.TcpIpConfig)1 ProtocolType (com.hazelcast.instance.ProtocolType)1 ServerSocketHelper.createServerSocketChannel (com.hazelcast.instance.impl.ServerSocketHelper.createServerSocketChannel)1 ChannelInitializer (com.hazelcast.internal.networking.ChannelInitializer)1