diff options
author | 2016-09-08 23:20:06 +0800 | |
---|---|---|
committer | 2016-09-09 14:18:38 +0800 | |
commit | b69d850757a7a8c4ff9a368df004a3cfaaf9f1e4 (patch) | |
tree | 6ba5fb3330c763fd3d550ec3671f723587beae65 /msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api | |
parent | 3be6b09b74dd3e54e631181dc37bd1e5685a1c62 (diff) |
Issue-id: OCS-9
Change-Id: I73c18bdda656c43687810930338f9a949ed08848
Signed-off-by: Zhaoxing <meng.zhaoxing1@zte.com.cn>
Diffstat (limited to 'msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api')
17 files changed, 1228 insertions, 1228 deletions
diff --git a/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/ApiRouteInfo.java b/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/ApiRouteInfo.java index 37cb5c0..ef22994 100644 --- a/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/ApiRouteInfo.java +++ b/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/ApiRouteInfo.java @@ -1,136 +1,136 @@ -/**
- * Copyright 2016 ZTE, Inc. and others.
- *
- * Licensed 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.openo.msb.api;
-
-import io.swagger.annotations.ApiModelProperty;
-
-import java.io.Serializable;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonInclude.Include;
-
-
-public class ApiRouteInfo implements Serializable{
- private static final long serialVersionUID = 1L;
- @ApiModelProperty(required = true)
- private String serviceName;
-
- @ApiModelProperty(example = "v1", required = true)
- private String version;
-
- @ApiModelProperty(value = "Target Service URL,start with /",example = "/test", required = true)
- private String url;
-
- private String apiJson=""; //swagger json Path
-
- @ApiModelProperty(value = "[apiJson Type] 0:local file 1: remote file", allowableValues = "0,1", example = "1")
- private String apiJsonType="1";
- private String metricsUrl="";
-
- @ApiModelProperty(value = "[control Range] 0:default 1:readonly 2:hidden ", allowableValues = "0,1,2", example = "0")
- private String control="0";
-
- @ApiModelProperty(value = "[status] 1:abled 0:disabled ", allowableValues = "0,1", example = "1")
- private String status="1";
-
- @ApiModelProperty(value = "[visual Range]interSystem:0,inSystem:1", allowableValues = "0,1", example = "1")
- private String visualRange = "1";
-
- @ApiModelProperty(value = "[LB Policy]non_ip_hash:0,ip_hash:1", allowableValues = "0,1", example = "0")
- private String useOwnUpstream="0"; //负载均衡策略
-
- @ApiModelProperty(required = true)
- private RouteServer servers[];
-
-
-
- public String getServiceName() {
- return serviceName;
- }
- public void setServiceName(String serviceName) {
- this.serviceName = serviceName;
- }
- public String getVersion() {
- return version;
- }
- public void setVersion(String version) {
- this.version = version;
- }
-
- public String getApiJson() {
- return apiJson;
- }
- public void setApiJson(String apiJson) {
- this.apiJson = apiJson;
- }
-
- public String getUrl() {
- return url;
- }
- public void setUrl(String url) {
- this.url = url;
- }
- public RouteServer[] getServers() {
- return servers;
- }
- public void setServers(RouteServer[] servers) {
- this.servers = servers;
- }
-
-
- public String getApiJsonType() {
- return apiJsonType;
- }
- public void setApiJsonType(String apiJsonType) {
- this.apiJsonType = apiJsonType;
- }
- public String getMetricsUrl() {
- return metricsUrl;
- }
- public void setMetricsUrl(String metricsUrl) {
- this.metricsUrl = metricsUrl;
- }
- public String getControl() {
- return control;
- }
- public void setControl(String control) {
- this.control = control;
- }
- public String getStatus() {
- return status;
- }
- public void setStatus(String status) {
- this.status = status;
- }
- public String getVisualRange() {
- return visualRange;
- }
- public void setVisualRange(String visualRange) {
- this.visualRange = visualRange;
- }
- public String getUseOwnUpstream() {
- return useOwnUpstream;
- }
-
- public void setUseOwnUpstream(String useOwnUpstream) {
- this.useOwnUpstream = useOwnUpstream;
- }
-
-
-
-
-
-}
+/** + * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved. + * + * Licensed 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.openo.msb.api; + +import io.swagger.annotations.ApiModelProperty; + +import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; + + +public class ApiRouteInfo implements Serializable{ + private static final long serialVersionUID = 1L; + @ApiModelProperty(required = true) + private String serviceName; + + @ApiModelProperty(example = "v1", required = true) + private String version; + + @ApiModelProperty(value = "Target Service URL,start with /",example = "/test", required = true) + private String url; + + private String apiJson=""; //swagger json Path + + @ApiModelProperty(value = "[apiJson Type] 0:local file 1: remote file", allowableValues = "0,1", example = "1") + private String apiJsonType="1"; + private String metricsUrl=""; + + @ApiModelProperty(value = "[control Range] 0:default 1:readonly 2:hidden ", allowableValues = "0,1,2", example = "0") + private String control="0"; + + @ApiModelProperty(value = "[status] 1:abled 0:disabled ", allowableValues = "0,1", example = "1") + private String status="1"; + + @ApiModelProperty(value = "[visual Range]interSystem:0,inSystem:1", allowableValues = "0,1", example = "1") + private String visualRange = "1"; + + @ApiModelProperty(value = "[LB Policy]non_ip_hash:0,ip_hash:1", allowableValues = "0,1", example = "0") + private String useOwnUpstream="0"; //负载均衡策略 + + @ApiModelProperty(required = true) + private RouteServer servers[]; + + + + public String getServiceName() { + return serviceName; + } + public void setServiceName(String serviceName) { + this.serviceName = serviceName; + } + public String getVersion() { + return version; + } + public void setVersion(String version) { + this.version = version; + } + + public String getApiJson() { + return apiJson; + } + public void setApiJson(String apiJson) { + this.apiJson = apiJson; + } + + public String getUrl() { + return url; + } + public void setUrl(String url) { + this.url = url; + } + public RouteServer[] getServers() { + return servers; + } + public void setServers(RouteServer[] servers) { + this.servers = servers; + } + + + public String getApiJsonType() { + return apiJsonType; + } + public void setApiJsonType(String apiJsonType) { + this.apiJsonType = apiJsonType; + } + public String getMetricsUrl() { + return metricsUrl; + } + public void setMetricsUrl(String metricsUrl) { + this.metricsUrl = metricsUrl; + } + public String getControl() { + return control; + } + public void setControl(String control) { + this.control = control; + } + public String getStatus() { + return status; + } + public void setStatus(String status) { + this.status = status; + } + public String getVisualRange() { + return visualRange; + } + public void setVisualRange(String visualRange) { + this.visualRange = visualRange; + } + public String getUseOwnUpstream() { + return useOwnUpstream; + } + + public void setUseOwnUpstream(String useOwnUpstream) { + this.useOwnUpstream = useOwnUpstream; + } + + + + + +} diff --git a/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/ConsulInfo.java b/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/ConsulInfo.java index 2bcade0..68a22cf 100644 --- a/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/ConsulInfo.java +++ b/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/ConsulInfo.java @@ -1,38 +1,38 @@ -/**
- * Copyright 2016 ZTE, Inc. and others.
- *
- * Licensed 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.openo.msb.api;
-
-import java.io.Serializable;
-
-public class ConsulInfo implements Serializable{
- private static final long serialVersionUID = 1L;
- private String ip;
- private int port;
-
- public String getIp() {
- return ip;
- }
- public void setIp(String ip) {
- this.ip = ip;
- }
- public int getPort() {
- return port;
- }
- public void setPort(int port) {
- this.port = port;
- }
-
+/** + * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved. + * + * Licensed 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.openo.msb.api; + +import java.io.Serializable; + +public class ConsulInfo implements Serializable{ + private static final long serialVersionUID = 1L; + private String ip; + private int port; + + public String getIp() { + return ip; + } + public void setIp(String ip) { + this.ip = ip; + } + public int getPort() { + return port; + } + public void setPort(int port) { + this.port = port; + } + }
\ No newline at end of file diff --git a/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/CustomDateSerializer.java b/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/CustomDateSerializer.java index ee9dc56..89f51af 100644 --- a/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/CustomDateSerializer.java +++ b/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/CustomDateSerializer.java @@ -1,39 +1,39 @@ -/**
- * Copyright 2016 ZTE, Inc. and others.
- *
- * Licensed 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.openo.msb.api;
-
-import java.io.IOException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import com.fasterxml.jackson.core.JsonGenerator;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.JsonSerializer;
-import com.fasterxml.jackson.databind.SerializerProvider;
-
-public class CustomDateSerializer extends JsonSerializer<Date> {
-
- @Override
- public void serialize(Date value,
- JsonGenerator jsonGenerator,
- SerializerProvider provider)
- throws IOException, JsonProcessingException {
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX");
- jsonGenerator.writeString(sdf.format(value));
- }
-
-
+/** + * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved. + * + * Licensed 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.openo.msb.api; + +import java.io.IOException; +import java.text.SimpleDateFormat; +import java.util.Date; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; + +public class CustomDateSerializer extends JsonSerializer<Date> { + + @Override + public void serialize(Date value, + JsonGenerator jsonGenerator, + SerializerProvider provider) + throws IOException, JsonProcessingException { + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX"); + jsonGenerator.writeString(sdf.format(value)); + } + + }
\ No newline at end of file diff --git a/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/CustomRouteInfo.java b/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/CustomRouteInfo.java index 378b4d5..208f3ff 100644 --- a/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/CustomRouteInfo.java +++ b/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/CustomRouteInfo.java @@ -1,102 +1,102 @@ -/**
- * Copyright 2016 ZTE, Inc. and others.
- *
- * Licensed 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.openo.msb.api;
-
-import io.swagger.annotations.ApiModelProperty;
-
-import java.io.Serializable;
-
-public class CustomRouteInfo implements Serializable{
-
- private static final long serialVersionUID = 1L;
- @ApiModelProperty(required = true)
- private String serviceName;
-
- @ApiModelProperty(value = "Target Service URL,start with /",example = "/test", required = true)
- private String url;
-
- @ApiModelProperty(value = "[control Range] 0:default 1:readonly 2:hidden ", allowableValues = "0,1,2", example = "0")
- private String control="0";
-
- @ApiModelProperty(value = "[status] 1:abled 0:disabled ", allowableValues = "0,1", example = "1")
- private String status="1";
-
- @ApiModelProperty(value = "[visual Range]interSystem:0,inSystem:1", allowableValues = "0,1", example = "1")
- private String visualRange = "1";
-
- @ApiModelProperty(value = "[LB Policy]non_ip_hash:0,ip_hash:1", allowableValues = "0,1", example = "0")
- private String useOwnUpstream="0"; //负载均衡策略
-
- @ApiModelProperty(required = true)
- private RouteServer servers[];
-
- public String getServiceName() {
- return serviceName;
- }
-
- public void setServiceName(String serviceName) {
- this.serviceName = serviceName;
- }
-
- public String getUrl() {
- return url;
- }
-
- public void setUrl(String url) {
- this.url = url;
- }
-
- public RouteServer[] getServers() {
- return servers;
- }
-
- public void setServers(RouteServer[] servers) {
- this.servers = servers;
- }
-
- public String getControl() {
- return control;
- }
-
- public void setControl(String control) {
- this.control = control;
- }
-
- public String getStatus() {
- return status;
- }
-
- public void setStatus(String status) {
- this.status = status;
- }
-
- public String getVisualRange() {
- return visualRange;
- }
-
- public void setVisualRange(String visualRange) {
- this.visualRange = visualRange;
- }
-
- public String getUseOwnUpstream() {
- return useOwnUpstream;
- }
-
- public void setUseOwnUpstream(String useOwnUpstream) {
- this.useOwnUpstream = useOwnUpstream;
- }
-
-}
+/** + * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved. + * + * Licensed 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.openo.msb.api; + +import io.swagger.annotations.ApiModelProperty; + +import java.io.Serializable; + +public class CustomRouteInfo implements Serializable{ + + private static final long serialVersionUID = 1L; + @ApiModelProperty(required = true) + private String serviceName; + + @ApiModelProperty(value = "Target Service URL,start with /",example = "/test", required = true) + private String url; + + @ApiModelProperty(value = "[control Range] 0:default 1:readonly 2:hidden ", allowableValues = "0,1,2", example = "0") + private String control="0"; + + @ApiModelProperty(value = "[status] 1:abled 0:disabled ", allowableValues = "0,1", example = "1") + private String status="1"; + + @ApiModelProperty(value = "[visual Range]interSystem:0,inSystem:1", allowableValues = "0,1", example = "1") + private String visualRange = "1"; + + @ApiModelProperty(value = "[LB Policy]non_ip_hash:0,ip_hash:1", allowableValues = "0,1", example = "0") + private String useOwnUpstream="0"; //负载均衡策略 + + @ApiModelProperty(required = true) + private RouteServer servers[]; + + public String getServiceName() { + return serviceName; + } + + public void setServiceName(String serviceName) { + this.serviceName = serviceName; + } + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public RouteServer[] getServers() { + return servers; + } + + public void setServers(RouteServer[] servers) { + this.servers = servers; + } + + public String getControl() { + return control; + } + + public void setControl(String control) { + this.control = control; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getVisualRange() { + return visualRange; + } + + public void setVisualRange(String visualRange) { + this.visualRange = visualRange; + } + + public String getUseOwnUpstream() { + return useOwnUpstream; + } + + public void setUseOwnUpstream(String useOwnUpstream) { + this.useOwnUpstream = useOwnUpstream; + } + +} diff --git a/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/DiscoverInfo.java b/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/DiscoverInfo.java index ac16cbb..dc6ec40 100644 --- a/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/DiscoverInfo.java +++ b/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/DiscoverInfo.java @@ -1,49 +1,49 @@ -/**
- * Copyright 2016 ZTE, Inc. and others.
- *
- * Licensed 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.openo.msb.api;
-
-import java.io.Serializable;
-
-public class DiscoverInfo implements Serializable{
- private static final long serialVersionUID = 1L;
- private String ip;
- private int port;
- private boolean enabled;
-
-
- public String getIp() {
- return ip;
- }
- public void setIp(String ip) {
- this.ip = ip;
- }
- public int getPort() {
- return port;
- }
- public void setPort(int port) {
- this.port = port;
- }
- public boolean isEnabled() {
- return enabled;
- }
- public void setEnabled(boolean enabled) {
- this.enabled = enabled;
- }
-
-
-
-
-}
+/** + * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved. + * + * Licensed 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.openo.msb.api; + +import java.io.Serializable; + +public class DiscoverInfo implements Serializable{ + private static final long serialVersionUID = 1L; + private String ip; + private int port; + private boolean enabled; + + + public String getIp() { + return ip; + } + public void setIp(String ip) { + this.ip = ip; + } + public int getPort() { + return port; + } + public void setPort(int port) { + this.port = port; + } + public boolean isEnabled() { + return enabled; + } + public void setEnabled(boolean enabled) { + this.enabled = enabled; + } + + + + +} diff --git a/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/IuiRouteInfo.java b/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/IuiRouteInfo.java index 19d9ff6..9e40783 100644 --- a/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/IuiRouteInfo.java +++ b/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/IuiRouteInfo.java @@ -1,102 +1,102 @@ -/**
- * Copyright 2016 ZTE, Inc. and others.
- *
- * Licensed 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.openo.msb.api;
-
-import io.swagger.annotations.ApiModelProperty;
-
-import java.io.Serializable;
-
-
-public class IuiRouteInfo implements Serializable{
- private static final long serialVersionUID = 1L;
- @ApiModelProperty(required = true)
- private String serviceName;
-
- @ApiModelProperty(value = "Target Service URL,start with /",example = "/test", required = true)
- private String url;
-
- @ApiModelProperty(value = "[control Range] 0:default 1:readonly 2:hidden ", allowableValues = "0,1,2", example = "0")
- private String control="0";
-
- @ApiModelProperty(value = "[status] 1:abled 0:disabled ", allowableValues = "0,1", example = "1")
- private String status="1";
-
- @ApiModelProperty(value = "[visual Range]interSystem:0,inSystem:1", allowableValues = "0,1", example = "1")
- private String visualRange = "1";
-
- @ApiModelProperty(value = "[LB Policy]non_ip_hash:0,ip_hash:1", allowableValues = "0,1", example = "0")
- private String useOwnUpstream="0"; //负载均衡策略
-
- @ApiModelProperty(required = true)
- private RouteServer servers[];
-
- public String getServiceName() {
- return serviceName;
- }
-
- public void setServiceName(String serviceName) {
- this.serviceName = serviceName;
- }
-
- public String getUrl() {
- return url;
- }
-
- public void setUrl(String url) {
- this.url = url;
- }
-
- public RouteServer[] getServers() {
- return servers;
- }
-
- public void setServers(RouteServer[] servers) {
- this.servers = servers;
- }
-
- public String getControl() {
- return control;
- }
-
- public void setControl(String control) {
- this.control = control;
- }
-
- public String getStatus() {
- return status;
- }
-
- public void setStatus(String status) {
- this.status = status;
- }
-
- public String getVisualRange() {
- return visualRange;
- }
-
- public void setVisualRange(String visualRange) {
- this.visualRange = visualRange;
- }
-
- public String getUseOwnUpstream() {
- return useOwnUpstream;
- }
-
- public void setUseOwnUpstream(String useOwnUpstream) {
- this.useOwnUpstream = useOwnUpstream;
- }
-
-}
+/** + * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved. + * + * Licensed 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.openo.msb.api; + +import io.swagger.annotations.ApiModelProperty; + +import java.io.Serializable; + + +public class IuiRouteInfo implements Serializable{ + private static final long serialVersionUID = 1L; + @ApiModelProperty(required = true) + private String serviceName; + + @ApiModelProperty(value = "Target Service URL,start with /",example = "/test", required = true) + private String url; + + @ApiModelProperty(value = "[control Range] 0:default 1:readonly 2:hidden ", allowableValues = "0,1,2", example = "0") + private String control="0"; + + @ApiModelProperty(value = "[status] 1:abled 0:disabled ", allowableValues = "0,1", example = "1") + private String status="1"; + + @ApiModelProperty(value = "[visual Range]interSystem:0,inSystem:1", allowableValues = "0,1", example = "1") + private String visualRange = "1"; + + @ApiModelProperty(value = "[LB Policy]non_ip_hash:0,ip_hash:1", allowableValues = "0,1", example = "0") + private String useOwnUpstream="0"; //负载均衡策略 + + @ApiModelProperty(required = true) + private RouteServer servers[]; + + public String getServiceName() { + return serviceName; + } + + public void setServiceName(String serviceName) { + this.serviceName = serviceName; + } + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public RouteServer[] getServers() { + return servers; + } + + public void setServers(RouteServer[] servers) { + this.servers = servers; + } + + public String getControl() { + return control; + } + + public void setControl(String control) { + this.control = control; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getVisualRange() { + return visualRange; + } + + public void setVisualRange(String visualRange) { + this.visualRange = visualRange; + } + + public String getUseOwnUpstream() { + return useOwnUpstream; + } + + public void setUseOwnUpstream(String useOwnUpstream) { + this.useOwnUpstream = useOwnUpstream; + } + +} diff --git a/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/MetricsInfo.java b/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/MetricsInfo.java index 097c918..339bb31 100644 --- a/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/MetricsInfo.java +++ b/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/MetricsInfo.java @@ -1,191 +1,191 @@ -/**
- * Copyright 2016 ZTE, Inc. and others.
- *
- * Licensed 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.openo.msb.api;
-
-
-
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-@Data
-@NoArgsConstructor
-@AllArgsConstructor
-public class MetricsInfo{
- private Gauges gauges;
- private Timers timers;
-}
-
-@Data
-@NoArgsConstructor
-@AllArgsConstructor
-class Gauges {
-
- @JsonProperty("jvm.attribute.uptime")
- private JVMMetrics jvm_attribute_uptime;
-
- @JsonProperty("jvm.memory.pools.Eden-Space.usage")
- private JVMMetrics jvm_memory_pools_Eden_Space_usage;
-
- @JsonProperty("jvm.memory.pools.PS-Eden-Space.usage")
- private JVMMetrics jvm_memory_pools_PS_Eden_Space_usage;
-
- @JsonProperty("jvm.memory.pools.Perm-Gen.usage")
- private JVMMetrics jvm_memory_pools_Perm_Gen_usage;
-
- @JsonProperty("jvm.memory.pools.PS-Perm-Gen.usage")
- private JVMMetrics jvm_memory_pools_PS_Perm_Gen_usage;
-
- @JsonProperty("jvm.memory.pools.Survivor-Space.usage")
- private JVMMetrics jvm_memory_pools_Survivor_Space_usage;
-
- @JsonProperty("jvm.memory.pools.PS-Survivor-Space.usage")
- private JVMMetrics jvm_memory_pools_PS_Survivor_Space_usage;
-
- @JsonProperty("jvm.memory.pools.Tenured-Gen.usage")
- private JVMMetrics jvm_memory_pools_Tenured_Gen_usage;
-
- @JsonProperty("jvm.memory.pools.PS-Old-Gen.usage")
- private JVMMetrics jvm_memory_pools_PS_Old_Gen_usage;
-
- @JsonProperty("jvm.memory.pools.Code-Cache.usage")
- private JVMMetrics jvm_memory_pools_Code_Cache_usage;
-
- @JsonProperty("jvm.memory.heap.init")
- private JVMMetrics jvm_memory_heap_init;
-
- @JsonProperty("jvm.memory.non-heap.init")
- private JVMMetrics jvm_memory_non_heap_init;
-
- @JsonProperty("jvm.memory.heap.used")
- private JVMMetrics jvm_memory_heap_used;
-
- @JsonProperty("jvm.memory.non-heap.used")
- private JVMMetrics jvm_memory_non_heap_used;
-
- @JsonProperty("jvm.memory.heap.max")
- private JVMMetrics jvm_memory_heap_max;
-
- @JsonProperty("jvm.threads.runnable.count")
- private JVMMetrics jvm_threads_runnable_count;
-
- @JsonProperty("jvm.threads.timed_waiting.count")
- private JVMMetrics jvm_threads_timed_waiting_count;
-
- @JsonProperty("jvm.threads.waiting.count")
- private JVMMetrics jvm_threads_waiting_count;
-
- @JsonProperty("jvm.threads.blocked.count")
- private JVMMetrics jvm_threads_blocked_count;
-
- @JsonProperty("jvm.threads.count")
- private JVMMetrics jvm_threads_count;
-
-
-
-}
-
-@Data
-@NoArgsConstructor
-@AllArgsConstructor
-class Timers{
-
- @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.ApiRouteResource.addApiRoute")
- private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_ApiRouteResource_addApiRoute;
-
- @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.ApiRouteResource.deleteApiRoute")
- private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_ApiRouteResource_deleteApiRoute;
-
- @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.ApiRouteResource.getApiDocs")
- private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_ApiRouteResource_getApiDocs;
-
- @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.ApiRouteResource.getApiRoute")
- private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_ApiRouteResource_getApiRoute;
-
- @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.ApiRouteResource.getApiRoutes")
- private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_ApiRouteResource_getApiRoutes;
-
- @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.ApiRouteResource.getServerIP")
- private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_ApiRouteResource_getServerIP;
-
- @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.ApiRouteResource.updateApiRoute")
- private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_ApiRouteResource_updateApiRoute;
-
- @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.IuiRouteResource.addIuiRoute")
- private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_IuiRouteResource_addIuiRoute;
-
- @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.IuiRouteResource.deleteIuiRoute")
- private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_IuiRouteResource_deleteIuiRoute;
-
- @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.IuiRouteResource.getIuiRoute")
- private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_IuiRouteResource_getIuiRoute;
-
- @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.IuiRouteResource.getIuiRoutes")
- private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_IuiRouteResource_getIuiRoutes;
-
- @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.IuiRouteResource.updateIuiRoute")
- private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_IuiRouteResource_updateIuiRoute;
-
- @JsonProperty("io.dropwizard.jetty.MutableServletContextHandler.get-requests")
- private HttpMetrics io_dropwizard_jetty_MutableServletContextHandler_get_requests;
-
- @JsonProperty("io.dropwizard.jetty.MutableServletContextHandler.post-requests")
- private HttpMetrics io_dropwizard_jetty_MutableServletContextHandler_post_requests;
-
- @JsonProperty("io.dropwizard.jetty.MutableServletContextHandler.put-requests")
- private HttpMetrics io_dropwizard_jetty_MutableServletContextHandler_put_requests;
-
- @JsonProperty("io.dropwizard.jetty.MutableServletContextHandler.delete-requests")
- private HttpMetrics io_dropwizard_jetty_MutableServletContextHandler_delete_requests;
-
- @JsonProperty("io.dropwizard.jetty.MutableServletContextHandler.other-requests")
- private HttpMetrics io_dropwizard_jetty_MutableServletContextHandler_other_requests;
-
-}
-
-@Data
-@NoArgsConstructor
-@AllArgsConstructor
-class JVMMetrics{
- private double value;
-}
-
-@Data
-@NoArgsConstructor
-@AllArgsConstructor
-class HttpMetrics{
- private int count;
- private double max;
- private double mean;
- private double min;
- private double p50;
- private double p75;
- private double p95;
- private double p98;
- private double p99;
- private double p999;
- private double stddev;
- private double m15_rate;
- private double m1_rate;
- private double m5_rate;
- private double mean_rate;
- private String duration_units;
- private String rate_units;
-}
-
-
+/** + * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved. + * + * Licensed 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.openo.msb.api; + + + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import com.fasterxml.jackson.annotation.JsonProperty; + +@Data +@NoArgsConstructor +@AllArgsConstructor +public class MetricsInfo{ + private Gauges gauges; + private Timers timers; +} + +@Data +@NoArgsConstructor +@AllArgsConstructor +class Gauges { + + @JsonProperty("jvm.attribute.uptime") + private JVMMetrics jvm_attribute_uptime; + + @JsonProperty("jvm.memory.pools.Eden-Space.usage") + private JVMMetrics jvm_memory_pools_Eden_Space_usage; + + @JsonProperty("jvm.memory.pools.PS-Eden-Space.usage") + private JVMMetrics jvm_memory_pools_PS_Eden_Space_usage; + + @JsonProperty("jvm.memory.pools.Perm-Gen.usage") + private JVMMetrics jvm_memory_pools_Perm_Gen_usage; + + @JsonProperty("jvm.memory.pools.PS-Perm-Gen.usage") + private JVMMetrics jvm_memory_pools_PS_Perm_Gen_usage; + + @JsonProperty("jvm.memory.pools.Survivor-Space.usage") + private JVMMetrics jvm_memory_pools_Survivor_Space_usage; + + @JsonProperty("jvm.memory.pools.PS-Survivor-Space.usage") + private JVMMetrics jvm_memory_pools_PS_Survivor_Space_usage; + + @JsonProperty("jvm.memory.pools.Tenured-Gen.usage") + private JVMMetrics jvm_memory_pools_Tenured_Gen_usage; + + @JsonProperty("jvm.memory.pools.PS-Old-Gen.usage") + private JVMMetrics jvm_memory_pools_PS_Old_Gen_usage; + + @JsonProperty("jvm.memory.pools.Code-Cache.usage") + private JVMMetrics jvm_memory_pools_Code_Cache_usage; + + @JsonProperty("jvm.memory.heap.init") + private JVMMetrics jvm_memory_heap_init; + + @JsonProperty("jvm.memory.non-heap.init") + private JVMMetrics jvm_memory_non_heap_init; + + @JsonProperty("jvm.memory.heap.used") + private JVMMetrics jvm_memory_heap_used; + + @JsonProperty("jvm.memory.non-heap.used") + private JVMMetrics jvm_memory_non_heap_used; + + @JsonProperty("jvm.memory.heap.max") + private JVMMetrics jvm_memory_heap_max; + + @JsonProperty("jvm.threads.runnable.count") + private JVMMetrics jvm_threads_runnable_count; + + @JsonProperty("jvm.threads.timed_waiting.count") + private JVMMetrics jvm_threads_timed_waiting_count; + + @JsonProperty("jvm.threads.waiting.count") + private JVMMetrics jvm_threads_waiting_count; + + @JsonProperty("jvm.threads.blocked.count") + private JVMMetrics jvm_threads_blocked_count; + + @JsonProperty("jvm.threads.count") + private JVMMetrics jvm_threads_count; + + + +} + +@Data +@NoArgsConstructor +@AllArgsConstructor +class Timers{ + + @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.ApiRouteResource.addApiRoute") + private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_ApiRouteResource_addApiRoute; + + @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.ApiRouteResource.deleteApiRoute") + private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_ApiRouteResource_deleteApiRoute; + + @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.ApiRouteResource.getApiDocs") + private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_ApiRouteResource_getApiDocs; + + @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.ApiRouteResource.getApiRoute") + private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_ApiRouteResource_getApiRoute; + + @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.ApiRouteResource.getApiRoutes") + private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_ApiRouteResource_getApiRoutes; + + @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.ApiRouteResource.getServerIP") + private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_ApiRouteResource_getServerIP; + + @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.ApiRouteResource.updateApiRoute") + private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_ApiRouteResource_updateApiRoute; + + @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.IuiRouteResource.addIuiRoute") + private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_IuiRouteResource_addIuiRoute; + + @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.IuiRouteResource.deleteIuiRoute") + private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_IuiRouteResource_deleteIuiRoute; + + @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.IuiRouteResource.getIuiRoute") + private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_IuiRouteResource_getIuiRoute; + + @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.IuiRouteResource.getIuiRoutes") + private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_IuiRouteResource_getIuiRoutes; + + @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.IuiRouteResource.updateIuiRoute") + private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_IuiRouteResource_updateIuiRoute; + + @JsonProperty("io.dropwizard.jetty.MutableServletContextHandler.get-requests") + private HttpMetrics io_dropwizard_jetty_MutableServletContextHandler_get_requests; + + @JsonProperty("io.dropwizard.jetty.MutableServletContextHandler.post-requests") + private HttpMetrics io_dropwizard_jetty_MutableServletContextHandler_post_requests; + + @JsonProperty("io.dropwizard.jetty.MutableServletContextHandler.put-requests") + private HttpMetrics io_dropwizard_jetty_MutableServletContextHandler_put_requests; + + @JsonProperty("io.dropwizard.jetty.MutableServletContextHandler.delete-requests") + private HttpMetrics io_dropwizard_jetty_MutableServletContextHandler_delete_requests; + + @JsonProperty("io.dropwizard.jetty.MutableServletContextHandler.other-requests") + private HttpMetrics io_dropwizard_jetty_MutableServletContextHandler_other_requests; + +} + +@Data +@NoArgsConstructor +@AllArgsConstructor +class JVMMetrics{ + private double value; +} + +@Data +@NoArgsConstructor +@AllArgsConstructor +class HttpMetrics{ + private int count; + private double max; + private double mean; + private double min; + private double p50; + private double p75; + private double p95; + private double p98; + private double p99; + private double p999; + private double stddev; + private double m15_rate; + private double m1_rate; + private double m5_rate; + private double mean_rate; + private String duration_units; + private String rate_units; +} + + diff --git a/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/MicroServiceFullInfo.java b/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/MicroServiceFullInfo.java index 3ce7dc2..14cea47 100644 --- a/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/MicroServiceFullInfo.java +++ b/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/MicroServiceFullInfo.java @@ -1,44 +1,44 @@ -/**
- * Copyright 2016 ZTE, Inc. and others.
- *
- * Licensed 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.openo.msb.api;
-
-import java.io.Serializable;
-import java.util.Set;
-
-public class MicroServiceFullInfo extends Service<NodeInfo> implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private Set<NodeInfo> nodes;
-
- private String status = "1"; //0:disable 1:enable
-
- public Set<NodeInfo> getNodes() {
- return nodes;
- }
-
- public void setNodes(Set<NodeInfo> nodes) {
- this.nodes = nodes;
- }
-
- public String getStatus() {
- return status;
- }
- public void setStatus(String status) {
- this.status = status;
- }
-
-
+/** + * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved. + * + * Licensed 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.openo.msb.api; + +import java.io.Serializable; +import java.util.Set; + +public class MicroServiceFullInfo extends Service<NodeInfo> implements Serializable { + private static final long serialVersionUID = 1L; + + private Set<NodeInfo> nodes; + + private String status = "1"; //0:disable 1:enable + + public Set<NodeInfo> getNodes() { + return nodes; + } + + public void setNodes(Set<NodeInfo> nodes) { + this.nodes = nodes; + } + + public String getStatus() { + return status; + } + public void setStatus(String status) { + this.status = status; + } + + }
\ No newline at end of file diff --git a/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/MicroServiceInfo.java b/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/MicroServiceInfo.java index 2b88c21..02609f9 100644 --- a/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/MicroServiceInfo.java +++ b/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/MicroServiceInfo.java @@ -1,38 +1,38 @@ -/**
- * Copyright 2016 ZTE, Inc. and others.
- *
- * Licensed 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.openo.msb.api;
-
-import java.io.Serializable;
-import java.util.Set;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-
-@JsonIgnoreProperties(ignoreUnknown = true)
-public class MicroServiceInfo extends Service<Node> implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private Set<Node> nodes;
-
- public Set<Node> getNodes() {
- return nodes;
- }
-
- public void setNodes(Set<Node> nodes) {
- this.nodes = nodes;
- }
-
-
-}
+/** + * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved. + * + * Licensed 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.openo.msb.api; + +import java.io.Serializable; +import java.util.Set; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +@JsonIgnoreProperties(ignoreUnknown = true) +public class MicroServiceInfo extends Service<Node> implements Serializable { + private static final long serialVersionUID = 1L; + + private Set<Node> nodes; + + public Set<Node> getNodes() { + return nodes; + } + + public void setNodes(Set<Node> nodes) { + this.nodes = nodes; + } + + +} diff --git a/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/Node.java b/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/Node.java index 96b340a..0879c61 100644 --- a/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/Node.java +++ b/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/Node.java @@ -1,75 +1,75 @@ -/**
- * Copyright 2016 ZTE, Inc. and others.
- *
- * Licensed 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.openo.msb.api;
-
-import io.swagger.annotations.ApiModelProperty;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-
-public class Node implements Serializable {
- private static final long serialVersionUID = 1L;
-
- @ApiModelProperty(required = true)
- private String ip;
-
- @ApiModelProperty(required = true)
- private String port;
-
- private int ttl=-1;
-
-
-
-
- public String getIp() {
- return ip;
- }
-
- public void setIp(String ip) {
- this.ip = ip;
- }
-
- public String getPort() {
- return port;
- }
-
- public void setPort(String port) {
- this.port = port;
- }
-
- public int getTtl() {
- return ttl;
- }
-
- public void setTtl(int ttl) {
- this.ttl = ttl;
- }
-
- public Node(){
-
- }
-
- public Node(String ip,String port,int ttl){
- this.ip = ip;
- this.port = port;
- this.ttl = ttl;
- }
-
-
-}
+/** + * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved. + * + * Licensed 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.openo.msb.api; + +import io.swagger.annotations.ApiModelProperty; + +import java.io.Serializable; +import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; + +public class Node implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(required = true) + private String ip; + + @ApiModelProperty(required = true) + private String port; + + private int ttl=-1; + + + + + public String getIp() { + return ip; + } + + public void setIp(String ip) { + this.ip = ip; + } + + public String getPort() { + return port; + } + + public void setPort(String port) { + this.port = port; + } + + public int getTtl() { + return ttl; + } + + public void setTtl(int ttl) { + this.ttl = ttl; + } + + public Node(){ + + } + + public Node(String ip,String port,int ttl){ + this.ip = ip; + this.port = port; + this.ttl = ttl; + } + + +} diff --git a/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/NodeInfo.java b/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/NodeInfo.java index 493b9a9..e3a30e7 100644 --- a/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/NodeInfo.java +++ b/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/NodeInfo.java @@ -1,74 +1,74 @@ -/**
- * Copyright 2016 ZTE, Inc. and others.
- *
- * Licensed 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.openo.msb.api;
-
-import java.util.Date;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonInclude.Include;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-
-public class NodeInfo extends Node {
-
- private static final long serialVersionUID = 8955786461351557306L;
-
- private String nodeId;
-
-
-
- @JsonSerialize(using = CustomDateSerializer.class)
- private Date expiration;
-
- @JsonSerialize(using = CustomDateSerializer.class)
- private Date created_at;
-
- @JsonSerialize(using = CustomDateSerializer.class)
- private Date updated_at;
-
- public Date getExpiration() {
- return expiration;
- }
-
- public void setExpiration(Date expiration) {
- this.expiration = expiration;
- }
-
- public Date getCreated_at() {
- return created_at;
- }
-
- public void setCreated_at(Date created_at) {
- this.created_at = created_at;
- }
-
- public Date getUpdated_at() {
- return updated_at;
- }
-
- public void setUpdated_at(Date updated_at) {
- this.updated_at = updated_at;
- }
-
- public String getNodeId() {
- return nodeId;
- }
-
- public void setNodeId(String nodeId) {
- this.nodeId = nodeId;
- }
-
-
-}
+/** + * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved. + * + * Licensed 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.openo.msb.api; + +import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; + +public class NodeInfo extends Node { + + private static final long serialVersionUID = 8955786461351557306L; + + private String nodeId; + + + + @JsonSerialize(using = CustomDateSerializer.class) + private Date expiration; + + @JsonSerialize(using = CustomDateSerializer.class) + private Date created_at; + + @JsonSerialize(using = CustomDateSerializer.class) + private Date updated_at; + + public Date getExpiration() { + return expiration; + } + + public void setExpiration(Date expiration) { + this.expiration = expiration; + } + + public Date getCreated_at() { + return created_at; + } + + public void setCreated_at(Date created_at) { + this.created_at = created_at; + } + + public Date getUpdated_at() { + return updated_at; + } + + public void setUpdated_at(Date updated_at) { + this.updated_at = updated_at; + } + + public String getNodeId() { + return nodeId; + } + + public void setNodeId(String nodeId) { + this.nodeId = nodeId; + } + + +} diff --git a/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/RouteServer.java b/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/RouteServer.java index e7349b9..675bc69 100644 --- a/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/RouteServer.java +++ b/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/RouteServer.java @@ -1,68 +1,68 @@ -/**
- * Copyright 2016 ZTE, Inc. and others.
- *
- * Licensed 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.openo.msb.api;
-
-import io.swagger.annotations.ApiModelProperty;
-
-import java.io.Serializable;
-
-
-public class RouteServer implements Serializable{
- private static final long serialVersionUID = 1L;
- @ApiModelProperty(required = true)
- private String ip;
-
- @ApiModelProperty(required = true)
- private String port;
- private int weight=0;
-
- public String getIp() {
- return ip;
- }
-
- public void setIp(String ip) {
- this.ip = ip;
- }
-
-
-
- public int getWeight() {
- return weight;
- }
-
- public void setWeight(int weight) {
- this.weight = weight;
- }
-
- public RouteServer(){
-
- }
-
- public RouteServer(String ip,String port){
- this.ip=ip;
- this.port=port;
- this.weight=0;
- }
-
- public String getPort() {
- return port;
- }
-
- public void setPort(String port) {
- this.port = port;
- }
-
-}
+/** + * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved. + * + * Licensed 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.openo.msb.api; + +import io.swagger.annotations.ApiModelProperty; + +import java.io.Serializable; + + +public class RouteServer implements Serializable{ + private static final long serialVersionUID = 1L; + @ApiModelProperty(required = true) + private String ip; + + @ApiModelProperty(required = true) + private String port; + private int weight=0; + + public String getIp() { + return ip; + } + + public void setIp(String ip) { + this.ip = ip; + } + + + + public int getWeight() { + return weight; + } + + public void setWeight(int weight) { + this.weight = weight; + } + + public RouteServer(){ + + } + + public RouteServer(String ip,String port){ + this.ip=ip; + this.port=port; + this.weight=0; + } + + public String getPort() { + return port; + } + + public void setPort(String port) { + this.port = port; + } + +} diff --git a/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/Service.java b/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/Service.java index 618f994..8969e1d 100644 --- a/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/Service.java +++ b/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/Service.java @@ -1,104 +1,104 @@ -/**
- * Copyright 2016 ZTE, Inc. and others.
- *
- * Licensed 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.openo.msb.api;
-
-import io.swagger.annotations.ApiModelProperty;
-
-import java.io.Serializable;
-import java.util.Set;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-
-@JsonIgnoreProperties(ignoreUnknown = true)
-public class Service<T> implements Serializable {
- private static final long serialVersionUID = 1L;
- // 服务名
- @ApiModelProperty(required = true)
- private String serviceName;
- // 版本号
- @ApiModelProperty(example = "v1")
- private String version="";
- // 服务url
- @ApiModelProperty(value = "Target Service URL,start with /",example = "/api/serviceName/v1", required = true)
- private String url="";
- // 服务对应协议,比如REST、UI、MQ、FTP、SNMP、TCP、UDP
- @ApiModelProperty(value = "Service Protocol", allowableValues = "REST,UI, MQ, FTP,SNMP,TCP,UDP", example = "REST",required = true)
- private String protocol = "";
-
- //服务的可见范围 系统间:0 系统内:1
- @ApiModelProperty(value = "[visual Range]interSystem:0,inSystem:1", allowableValues = "0,1", example = "1")
- private String visualRange = "1";
-
- //负载均衡策略类型
- @ApiModelProperty(value = "lb policy", allowableValues = "round-robin,hash,least_conn", example = "hash")
- private String lb_policy="";
-
- @ApiModelProperty(required = true)
- private Set<T> nodes;
-
- public Set<T> getNodes() {
- return nodes;
- }
-
- public void setNodes(Set<T> nodes) {
- this.nodes = nodes;
- }
-
- public String getServiceName() {
- return serviceName;
- }
- public void setServiceName(String serviceName) {
- this.serviceName = serviceName;
- }
- public String getVersion() {
- return version;
- }
- public void setVersion(String version) {
- this.version = version;
- }
- public String getUrl() {
- return url;
- }
- public void setUrl(String url) {
- this.url = url;
- }
- public String getProtocol() {
- return protocol;
- }
- public void setProtocol(String protocol) {
- this.protocol = protocol;
- }
-
- public String getVisualRange() {
- return visualRange;
- }
-
- public void setVisualRange(String visualRange) {
- this.visualRange = visualRange;
- }
-
-
- public String getLb_policy() {
- return lb_policy;
- }
-
- public void setLb_policy(String lb_policy) {
- this.lb_policy = lb_policy;
- }
-
-
-
-}
+/** + * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved. + * + * Licensed 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.openo.msb.api; + +import io.swagger.annotations.ApiModelProperty; + +import java.io.Serializable; +import java.util.Set; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +@JsonIgnoreProperties(ignoreUnknown = true) +public class Service<T> implements Serializable { + private static final long serialVersionUID = 1L; + // 服务名 + @ApiModelProperty(required = true) + private String serviceName; + // 版本号 + @ApiModelProperty(example = "v1") + private String version=""; + // 服务url + @ApiModelProperty(value = "Target Service URL,start with /",example = "/api/serviceName/v1", required = true) + private String url=""; + // 服务对应协议,比如REST、UI、MQ、FTP、SNMP、TCP、UDP + @ApiModelProperty(value = "Service Protocol", allowableValues = "REST,UI, MQ, FTP,SNMP,TCP,UDP", example = "REST",required = true) + private String protocol = ""; + + //服务的可见范围 系统间:0 系统内:1 + @ApiModelProperty(value = "[visual Range]interSystem:0,inSystem:1", allowableValues = "0,1", example = "1") + private String visualRange = "1"; + + //负载均衡策略类型 + @ApiModelProperty(value = "lb policy", allowableValues = "round-robin,hash,least_conn", example = "hash") + private String lb_policy=""; + + @ApiModelProperty(required = true) + private Set<T> nodes; + + public Set<T> getNodes() { + return nodes; + } + + public void setNodes(Set<T> nodes) { + this.nodes = nodes; + } + + public String getServiceName() { + return serviceName; + } + public void setServiceName(String serviceName) { + this.serviceName = serviceName; + } + public String getVersion() { + return version; + } + public void setVersion(String version) { + this.version = version; + } + public String getUrl() { + return url; + } + public void setUrl(String url) { + this.url = url; + } + public String getProtocol() { + return protocol; + } + public void setProtocol(String protocol) { + this.protocol = protocol; + } + + public String getVisualRange() { + return visualRange; + } + + public void setVisualRange(String visualRange) { + this.visualRange = visualRange; + } + + + public String getLb_policy() { + return lb_policy; + } + + public void setLb_policy(String lb_policy) { + this.lb_policy = lb_policy; + } + + + +} diff --git a/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/ServiceAccessInfo.java b/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/ServiceAccessInfo.java index 65ca179..bb375ac 100644 --- a/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/ServiceAccessInfo.java +++ b/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/ServiceAccessInfo.java @@ -1,88 +1,88 @@ -/**
- * Copyright 2016 ZTE, Inc. and others.
- *
- * Licensed 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.openo.msb.api;
-
-import java.io.Serializable;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-
-public class ServiceAccessInfo implements Serializable {
- private static final long serialVersionUID = 1L;
- // (api|iui|custom|p2p)
- private String serviceType;
-
- private String serviceName;
- @JsonInclude(JsonInclude.Include.NON_NULL)
- private String version;
-
- private String accessAddr;
-
- /**
- * @return the serviceType
- */
- public String getServiceType() {
- return serviceType;
- }
-
- /**
- * @param serviceType the serviceType to set
- */
- public void setServiceType(String serviceType) {
- this.serviceType = serviceType;
- }
-
- /**
- * @return the serviceName
- */
- public String getServiceName() {
- return serviceName;
- }
-
- /**
- * @param serviceName the serviceName to set
- */
- public void setServiceName(String serviceName) {
- this.serviceName = serviceName;
- }
-
- /**
- * @return the version
- */
- public String getVersion() {
- return version;
- }
-
- /**
- * @param version the version to set
- */
- public void setVersion(String version) {
- this.version = version;
- }
-
- /**
- * @return the accessAddr
- */
- public String getAccessAddr() {
- return accessAddr;
- }
-
- /**
- * @param accessAddr the accessAddr to set
- */
- public void setAccessAddr(String accessAddr) {
- this.accessAddr = accessAddr;
- }
-}
+/** + * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved. + * + * Licensed 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.openo.msb.api; + +import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonInclude; + +public class ServiceAccessInfo implements Serializable { + private static final long serialVersionUID = 1L; + // (api|iui|custom|p2p) + private String serviceType; + + private String serviceName; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String version; + + private String accessAddr; + + /** + * @return the serviceType + */ + public String getServiceType() { + return serviceType; + } + + /** + * @param serviceType the serviceType to set + */ + public void setServiceType(String serviceType) { + this.serviceType = serviceType; + } + + /** + * @return the serviceName + */ + public String getServiceName() { + return serviceName; + } + + /** + * @param serviceName the serviceName to set + */ + public void setServiceName(String serviceName) { + this.serviceName = serviceName; + } + + /** + * @return the version + */ + public String getVersion() { + return version; + } + + /** + * @param version the version to set + */ + public void setVersion(String version) { + this.version = version; + } + + /** + * @return the accessAddr + */ + public String getAccessAddr() { + return accessAddr; + } + + /** + * @param accessAddr the accessAddr to set + */ + public void setAccessAddr(String accessAddr) { + this.accessAddr = accessAddr; + } +} diff --git a/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/exception/ExtendedInternalServerErrorException.java b/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/exception/ExtendedInternalServerErrorException.java index 8946da3..a377c4c 100644 --- a/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/exception/ExtendedInternalServerErrorException.java +++ b/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/exception/ExtendedInternalServerErrorException.java @@ -1,28 +1,28 @@ -/**
- * Copyright 2016 ZTE, Inc. and others.
- *
- * Licensed 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.openo.msb.api.exception;
-
-import javax.ws.rs.InternalServerErrorException;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-
-public class ExtendedInternalServerErrorException extends InternalServerErrorException {
-
- public ExtendedInternalServerErrorException(final String message) {
- super(Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(message).type(MediaType.TEXT_PLAIN).build());
- }
-
-}
+/** + * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved. + * + * Licensed 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.openo.msb.api.exception; + +import javax.ws.rs.InternalServerErrorException; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; + +public class ExtendedInternalServerErrorException extends InternalServerErrorException { + + public ExtendedInternalServerErrorException(final String message) { + super(Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(message).type(MediaType.TEXT_PLAIN).build()); + } + +} diff --git a/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/exception/ExtendedNotFoundException.java b/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/exception/ExtendedNotFoundException.java index defd059..e3e74ea 100644 --- a/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/exception/ExtendedNotFoundException.java +++ b/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/exception/ExtendedNotFoundException.java @@ -1,28 +1,28 @@ -/**
- * Copyright 2016 ZTE, Inc. and others.
- *
- * Licensed 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.openo.msb.api.exception;
-
-import javax.ws.rs.NotFoundException;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-
-public class ExtendedNotFoundException extends NotFoundException {
-
- public ExtendedNotFoundException(final String message) {
- super(Response.status(Response.Status.NOT_FOUND).entity(message).type(MediaType.TEXT_PLAIN).build());
- }
-}
-
+/** + * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved. + * + * Licensed 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.openo.msb.api.exception; + +import javax.ws.rs.NotFoundException; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; + +public class ExtendedNotFoundException extends NotFoundException { + + public ExtendedNotFoundException(final String message) { + super(Response.status(Response.Status.NOT_FOUND).entity(message).type(MediaType.TEXT_PLAIN).build()); + } +} + diff --git a/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/exception/ExtendedNotSupportedException.java b/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/exception/ExtendedNotSupportedException.java index 6dcc0f5..e0c7805 100644 --- a/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/exception/ExtendedNotSupportedException.java +++ b/msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/exception/ExtendedNotSupportedException.java @@ -1,27 +1,27 @@ -/**
- * Copyright 2016 ZTE, Inc. and others.
- *
- * Licensed 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.openo.msb.api.exception;
-
-import javax.ws.rs.NotSupportedException;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-
-public class ExtendedNotSupportedException extends NotSupportedException {
-
- public ExtendedNotSupportedException(final String message) {
- super(Response.status(Response.Status.UNSUPPORTED_MEDIA_TYPE).entity(message).type(MediaType.TEXT_PLAIN).build());
- }
-}
+/** + * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved. + * + * Licensed 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.openo.msb.api.exception; + +import javax.ws.rs.NotSupportedException; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; + +public class ExtendedNotSupportedException extends NotSupportedException { + + public ExtendedNotSupportedException(final String message) { + super(Response.status(Response.Status.UNSUPPORTED_MEDIA_TYPE).entity(message).type(MediaType.TEXT_PLAIN).build()); + } +} |