Search in sources :

Example 6 with RestApiConfig

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

the class RestClusterTest method createConfigWithRestEnabled.

protected Config createConfigWithRestEnabled() {
    Config config = createConfig();
    RestApiConfig restApiConfig = new RestApiConfig().setEnabled(true).enableAllGroups();
    config.getNetworkConfig().setRestApiConfig(restApiConfig);
    return config;
}
Also used : RestApiConfig(com.hazelcast.config.RestApiConfig) RestApiConfig(com.hazelcast.config.RestApiConfig) HazelcastTestSupport.smallInstanceConfig(com.hazelcast.test.HazelcastTestSupport.smallInstanceConfig) Config(com.hazelcast.config.Config) RestServerEndpointConfig(com.hazelcast.config.RestServerEndpointConfig)

Example 7 with RestApiConfig

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

the class RestTest method getConfig.

public Config getConfig() {
    Config config = new Config();
    RestApiConfig restApiConfig = new RestApiConfig().setEnabled(true).enableAllGroups();
    config.getNetworkConfig().setRestApiConfig(restApiConfig);
    config.getMapConfig(MAP_WITH_TTL).setTimeToLiveSeconds(2);
    return config;
}
Also used : RestApiConfig(com.hazelcast.config.RestApiConfig) RestApiConfig(com.hazelcast.config.RestApiConfig) Config(com.hazelcast.config.Config) WanReplicationConfig(com.hazelcast.config.WanReplicationConfig)

Example 8 with RestApiConfig

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

the class RestLogLevelTest method createWriteOnlyConfig.

protected Config createWriteOnlyConfig() {
    Config config = createConfig();
    RestApiConfig restApiConfig = new RestApiConfig().setEnabled(true).disableGroups(RestEndpointGroup.CLUSTER_READ).enableGroups(RestEndpointGroup.CLUSTER_WRITE);
    config.getNetworkConfig().setRestApiConfig(restApiConfig);
    return config;
}
Also used : RestApiConfig(com.hazelcast.config.RestApiConfig) Config(com.hazelcast.config.Config) RestApiConfig(com.hazelcast.config.RestApiConfig)

Example 9 with RestApiConfig

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

the class RestApiConfigTestBase method createConfigWithDisabledGroups.

/**
 * Creates Hazelcast {@link Config} with enabled all but provided {@link RestEndpointGroup RestEndpointGroups}.
 */
protected Config createConfigWithDisabledGroups(RestEndpointGroup... group) {
    RestApiConfig restApiConfig = new RestApiConfig();
    restApiConfig.setEnabled(true);
    restApiConfig.enableAllGroups().disableGroups(group);
    Config c = new Config();
    c.getNetworkConfig().setRestApiConfig(restApiConfig);
    return c;
}
Also used : RestApiConfig(com.hazelcast.config.RestApiConfig) Config(com.hazelcast.config.Config) RestApiConfig(com.hazelcast.config.RestApiConfig)

Example 10 with RestApiConfig

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

the class RestApiConfigTestBase method createConfigWithEnabledGroups.

/**
 * Creates Hazelcast {@link Config} with disabled all but provided {@link RestEndpointGroup RestEndpointGroups}.
 */
protected Config createConfigWithEnabledGroups(RestEndpointGroup... group) {
    RestApiConfig restApiConfig = new RestApiConfig();
    restApiConfig.setEnabled(true);
    restApiConfig.disableAllGroups().enableGroups(group);
    Config c = new Config();
    c.getNetworkConfig().setRestApiConfig(restApiConfig);
    return c;
}
Also used : RestApiConfig(com.hazelcast.config.RestApiConfig) Config(com.hazelcast.config.Config) RestApiConfig(com.hazelcast.config.RestApiConfig)

Aggregations

RestApiConfig (com.hazelcast.config.RestApiConfig)29 Config (com.hazelcast.config.Config)22 QuickTest (com.hazelcast.test.annotation.QuickTest)11 Test (org.junit.Test)11 HazelcastInstance (com.hazelcast.core.HazelcastInstance)8 MemcacheProtocolConfig (com.hazelcast.config.MemcacheProtocolConfig)6 JoinConfig (com.hazelcast.config.JoinConfig)4 RestEndpointGroup (com.hazelcast.config.RestEndpointGroup)3 HazelcastTestSupport.smallInstanceConfig (com.hazelcast.test.HazelcastTestSupport.smallInstanceConfig)3 RestServerEndpointConfig (com.hazelcast.config.RestServerEndpointConfig)2 AdvancedNetworkConfig (com.hazelcast.config.AdvancedNetworkConfig)1 DiscoveryStrategyConfig (com.hazelcast.config.DiscoveryStrategyConfig)1 NetworkConfig (com.hazelcast.config.NetworkConfig)1 WanReplicationConfig (com.hazelcast.config.WanReplicationConfig)1 StringUtil.bytesToString (com.hazelcast.internal.util.StringUtil.bytesToString)1 DiscoveryStrategyFactory (com.hazelcast.spi.discovery.DiscoveryStrategyFactory)1 Before (org.junit.Before)1