Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DUBBO-3137]: step4 - remove ConfigConstants #4079

Merged
merged 1 commit into from
May 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,67 +23,11 @@
public interface ConfigConstants {
String CLUSTER_KEY = "cluster";

String STATUS_KEY = "status";

String CONTEXTPATH_KEY = "contextpath";

String LISTENER_KEY = "listener";

String LAYER_KEY = "layer";

/**
* General
*/
/**
* Application name;
*/
String NAME = "name";

/**
* Application owner name;
*/
String OWNER = "owner";

/**
* Running application organization name.
*/
String ORGANIZATION = "organization";

/**
* Application architecture name.
*/
String ARCHITECTURE = "architecture";

/**
* Environment name
*/
String ENVIRONMENT = "environment";

/**
* Test environment key.
*/
String TEST_ENVIRONMENT = "test";

/**
* Development environment key.
*/
String DEVELOPMENT_ENVIRONMENT = "develop";

/**
* Production environment key.
*/
String PRODUCTION_ENVIRONMENT = "product";

String CONFIG_CLUSTER_KEY = "config.cluster";
String CONFIG_NAMESPACE_KEY = "config.namespace";
String CONFIG_GROUP_KEY = "config.group";
String CONFIG_CHECK_KEY = "config.check";

String CONFIG_CONFIGFILE_KEY = "config.config-file";
String CONFIG_ENABLE_KEY = "config.highest-priority";
String CONFIG_TIMEOUT_KEY = "config.timeout";
String CONFIG_APPNAME_KEY = "config.app-name";

String USERNAME_KEY = "username";

String PASSWORD_KEY = "password";
Expand All @@ -92,42 +36,16 @@ public interface ConfigConstants {

String PORT_KEY = "port";

String MULTICAST = "multicast";

String REGISTER_IP_KEY = "register.ip";

String DUBBO_IP_TO_REGISTRY = "DUBBO_IP_TO_REGISTRY";

String DUBBO_PORT_TO_REGISTRY = "DUBBO_PORT_TO_REGISTRY";

String DUBBO_IP_TO_BIND = "DUBBO_IP_TO_BIND";

String DUBBO_PORT_TO_BIND = "DUBBO_PORT_TO_BIND";

String SCOPE_KEY = "scope";

String SCOPE_LOCAL = "local";

String SCOPE_REMOTE = "remote";

String SCOPE_NONE = "none";

String ON_CONNECT_KEY = "onconnect";

String ON_DISCONNECT_KEY = "ondisconnect";

String ON_INVOKE_METHOD_KEY = "oninvoke.method";

String ON_RETURN_METHOD_KEY = "onreturn.method";

String ON_THROW_METHOD_KEY = "onthrow.method";

String ON_INVOKE_INSTANCE_KEY = "oninvoke.instance";

String ON_RETURN_INSTANCE_KEY = "onreturn.instance";

String ON_THROW_INSTANCE_KEY = "onthrow.instance";

@Deprecated
String SHUTDOWN_WAIT_SECONDS_KEY = "dubbo.service.shutdown.wait.seconds";

Expand All @@ -152,17 +70,6 @@ public interface ConfigConstants {

String ZOOKEEPER_PROTOCOL = "zookeeper";

// FIXME: is this still useful?
String SHUTDOWN_TIMEOUT_KEY = "shutdown.timeout";

int DEFAULT_SHUTDOWN_TIMEOUT = 1000 * 60 * 15;

String PROTOCOLS_SUFFIX = "dubbo.protocols.";

String PROTOCOL_SUFFIX = "dubbo.protocol.";

String REGISTRIES_SUFFIX = "dubbo.registries.";

String TELNET = "telnet";

String QOS_ENABLE = "qos.enable";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
import java.util.HashMap;
import java.util.Map;

import static org.apache.dubbo.common.constants.ConfigConstants.ON_INVOKE_INSTANCE_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.ON_INVOKE_METHOD_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.ON_RETURN_INSTANCE_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.ON_RETURN_METHOD_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.ON_THROW_INSTANCE_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.ON_THROW_METHOD_KEY;
import static org.apache.dubbo.config.Constants.ON_INVOKE_INSTANCE_KEY;
import static org.apache.dubbo.config.Constants.ON_INVOKE_METHOD_KEY;
import static org.apache.dubbo.config.Constants.ON_RETURN_INSTANCE_KEY;
import static org.apache.dubbo.config.Constants.ON_RETURN_METHOD_KEY;
import static org.apache.dubbo.config.Constants.ON_THROW_INSTANCE_KEY;
import static org.apache.dubbo.config.Constants.ON_THROW_METHOD_KEY;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.contains;
import static org.hamcrest.Matchers.equalTo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@
import static org.apache.dubbo.common.constants.CommonConstants.RELEASE_KEY;
import static org.apache.dubbo.common.constants.CommonConstants.TIMESTAMP_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.CLUSTER_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.DUBBO_IP_TO_REGISTRY;
import static org.apache.dubbo.config.Constants.DUBBO_IP_TO_REGISTRY;
import static org.apache.dubbo.common.constants.ConfigConstants.DUBBO_PROTOCOL;
import static org.apache.dubbo.common.constants.ConfigConstants.LAYER_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.LISTENER_KEY;
import static org.apache.dubbo.config.Constants.LAYER_KEY;
import static org.apache.dubbo.config.Constants.LISTENER_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.REFER_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.REGISTER_IP_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.REGISTRIES_SUFFIX;
import static org.apache.dubbo.config.Constants.REGISTRIES_SUFFIX;
import static org.apache.dubbo.common.constants.ConfigConstants.SHUTDOWN_WAIT_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.SHUTDOWN_WAIT_SECONDS_KEY;
import static org.apache.dubbo.monitor.Constants.LOGSTAT_PROTOCOL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@
import static org.apache.dubbo.common.constants.CommonConstants.APPLICATION_KEY;
import static org.apache.dubbo.common.constants.CommonConstants.DUMP_DIRECTORY;
import static org.apache.dubbo.common.constants.ConfigConstants.ACCEPT_FOREIGN_IP;
import static org.apache.dubbo.common.constants.ConfigConstants.ARCHITECTURE;
import static org.apache.dubbo.common.constants.ConfigConstants.DEVELOPMENT_ENVIRONMENT;
import static org.apache.dubbo.common.constants.ConfigConstants.ENVIRONMENT;
import static org.apache.dubbo.common.constants.ConfigConstants.NAME;
import static org.apache.dubbo.common.constants.ConfigConstants.ORGANIZATION;
import static org.apache.dubbo.common.constants.ConfigConstants.OWNER;
import static org.apache.dubbo.common.constants.ConfigConstants.PRODUCTION_ENVIRONMENT;
import static org.apache.dubbo.config.Constants.ARCHITECTURE;
import static org.apache.dubbo.config.Constants.DEVELOPMENT_ENVIRONMENT;
import static org.apache.dubbo.config.Constants.ENVIRONMENT;
import static org.apache.dubbo.config.Constants.NAME;
import static org.apache.dubbo.config.Constants.ORGANIZATION;
import static org.apache.dubbo.config.Constants.OWNER;
import static org.apache.dubbo.config.Constants.PRODUCTION_ENVIRONMENT;
import static org.apache.dubbo.common.constants.ConfigConstants.QOS_ENABLE;
import static org.apache.dubbo.common.constants.ConfigConstants.QOS_PORT;
import static org.apache.dubbo.common.constants.ConfigConstants.SHUTDOWN_WAIT_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.TEST_ENVIRONMENT;
import static org.apache.dubbo.config.Constants.TEST_ENVIRONMENT;


/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@
import static org.apache.dubbo.common.constants.CommonConstants.ANYHOST_VALUE;
import static org.apache.dubbo.common.constants.CommonConstants.PATH_KEY;
import static org.apache.dubbo.common.constants.CommonConstants.PROTOCOL_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.CONFIG_APPNAME_KEY;
import static org.apache.dubbo.config.Constants.CONFIG_APPNAME_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.CONFIG_CHECK_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.CONFIG_CLUSTER_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.CONFIG_CONFIGFILE_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.CONFIG_ENABLE_KEY;
import static org.apache.dubbo.config.Constants.CONFIG_CONFIGFILE_KEY;
import static org.apache.dubbo.config.Constants.CONFIG_ENABLE_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.CONFIG_GROUP_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.CONFIG_NAMESPACE_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.CONFIG_TIMEOUT_KEY;
import static org.apache.dubbo.config.Constants.CONFIG_TIMEOUT_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.ZOOKEEPER_PROTOCOL;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.dubbo.config;

/**
*
*/
public interface Constants {

String STATUS_KEY = "status";

String CONTEXTPATH_KEY = "contextpath";

String LISTENER_KEY = "listener";

String LAYER_KEY = "layer";

/**
* General
*/
/**
* Application name;
*/
String NAME = "name";

/**
* Application owner name;
*/
String OWNER = "owner";

/**
* Running application organization name.
*/
String ORGANIZATION = "organization";

/**
* Application architecture name.
*/
String ARCHITECTURE = "architecture";

/**
* Environment name
*/
String ENVIRONMENT = "environment";

/**
* Test environment key.
*/
String TEST_ENVIRONMENT = "test";

/**
* Development environment key.
*/
String DEVELOPMENT_ENVIRONMENT = "develop";

/**
* Production environment key.
*/
String PRODUCTION_ENVIRONMENT = "product";

String CONFIG_CONFIGFILE_KEY = "config.config-file";
String CONFIG_ENABLE_KEY = "config.highest-priority";
String CONFIG_TIMEOUT_KEY = "config.timeout";
String CONFIG_APPNAME_KEY = "config.app-name";

String MULTICAST = "multicast";


String DUBBO_IP_TO_REGISTRY = "DUBBO_IP_TO_REGISTRY";

String DUBBO_PORT_TO_REGISTRY = "DUBBO_PORT_TO_REGISTRY";


String DUBBO_PORT_TO_BIND = "DUBBO_PORT_TO_BIND";

String SCOPE_NONE = "none";


String ON_INVOKE_METHOD_KEY = "oninvoke.method";

String ON_RETURN_METHOD_KEY = "onreturn.method";

String ON_THROW_METHOD_KEY = "onthrow.method";

String ON_INVOKE_INSTANCE_KEY = "oninvoke.instance";

String ON_RETURN_INSTANCE_KEY = "onreturn.instance";

String ON_THROW_INSTANCE_KEY = "onthrow.instance";


// FIXME: is this still useful?
String SHUTDOWN_TIMEOUT_KEY = "shutdown.timeout";


String PROTOCOLS_SUFFIX = "dubbo.protocols.";


String REGISTRIES_SUFFIX = "dubbo.registries.";

}
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
import java.util.Collections;
import java.util.List;

import static org.apache.dubbo.common.constants.ConfigConstants.ON_INVOKE_INSTANCE_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.ON_INVOKE_METHOD_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.ON_RETURN_INSTANCE_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.ON_RETURN_METHOD_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.ON_THROW_INSTANCE_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.ON_THROW_METHOD_KEY;
import static org.apache.dubbo.config.Constants.ON_INVOKE_INSTANCE_KEY;
import static org.apache.dubbo.config.Constants.ON_INVOKE_METHOD_KEY;
import static org.apache.dubbo.config.Constants.ON_RETURN_INSTANCE_KEY;
import static org.apache.dubbo.config.Constants.ON_RETURN_METHOD_KEY;
import static org.apache.dubbo.config.Constants.ON_THROW_INSTANCE_KEY;
import static org.apache.dubbo.config.Constants.ON_THROW_METHOD_KEY;

/**
* The method configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
import java.util.ArrayList;
import java.util.List;

import static org.apache.dubbo.common.constants.ConfigConstants.NAME;
import static org.apache.dubbo.common.constants.ConfigConstants.ORGANIZATION;
import static org.apache.dubbo.common.constants.ConfigConstants.OWNER;
import static org.apache.dubbo.config.Constants.NAME;
import static org.apache.dubbo.config.Constants.ORGANIZATION;
import static org.apache.dubbo.config.Constants.OWNER;

/**
* The module info
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import static org.apache.dubbo.common.constants.CommonConstants.THREADPOOL_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.DUBBO_PROTOCOL;
import static org.apache.dubbo.common.constants.ConfigConstants.HOST_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.PROTOCOLS_SUFFIX;
import static org.apache.dubbo.config.Constants.PROTOCOLS_SUFFIX;
import static org.apache.dubbo.common.constants.ConfigConstants.TELNET;
import static org.apache.dubbo.common.constants.RpcConstants.DUBBO_VERSION_KEY;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
import java.util.Arrays;

import static org.apache.dubbo.common.constants.CommonConstants.THREADPOOL_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.CONTEXTPATH_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.STATUS_KEY;
import static org.apache.dubbo.config.Constants.CONTEXTPATH_KEY;
import static org.apache.dubbo.config.Constants.STATUS_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.TELNET;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
import static org.apache.dubbo.common.constants.CommonConstants.SEMICOLON_SPLIT_PATTERN;
import static org.apache.dubbo.common.constants.CommonConstants.SIDE_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.CLUSTER_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.DUBBO_IP_TO_REGISTRY;
import static org.apache.dubbo.config.Constants.DUBBO_IP_TO_REGISTRY;
import static org.apache.dubbo.common.constants.ConfigConstants.REFER_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.REGISTER_IP_KEY;
import static org.apache.dubbo.common.constants.CommonConstants.MONITOR_KEY;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import static org.apache.dubbo.common.constants.CommonConstants.FILE_KEY;
import static org.apache.dubbo.common.constants.CommonConstants.PROTOCOL_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.PASSWORD_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.REGISTRIES_SUFFIX;
import static org.apache.dubbo.config.Constants.REGISTRIES_SUFFIX;
import static org.apache.dubbo.common.constants.ConfigConstants.SHUTDOWN_WAIT_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.USERNAME_KEY;
import static org.apache.dubbo.common.constants.ConfigConstants.ZOOKEEPER_PROTOCOL;
Expand Down
Loading