summaryrefslogtreecommitdiffstats
path: root/apiroute/apiroute-service/src/main/java/org/openo/msb/api
diff options
context:
space:
mode:
Diffstat (limited to 'apiroute/apiroute-service/src/main/java/org/openo/msb/api')
-rw-r--r--apiroute/apiroute-service/src/main/java/org/openo/msb/api/ApiRouteInfo.java136
-rw-r--r--apiroute/apiroute-service/src/main/java/org/openo/msb/api/ConsulInfo.java38
-rw-r--r--apiroute/apiroute-service/src/main/java/org/openo/msb/api/CustomDateSerializer.java39
-rw-r--r--apiroute/apiroute-service/src/main/java/org/openo/msb/api/CustomRouteInfo.java102
-rw-r--r--apiroute/apiroute-service/src/main/java/org/openo/msb/api/DiscoverInfo.java49
-rw-r--r--apiroute/apiroute-service/src/main/java/org/openo/msb/api/IuiRouteInfo.java102
-rw-r--r--apiroute/apiroute-service/src/main/java/org/openo/msb/api/MetricsInfo.java191
-rw-r--r--apiroute/apiroute-service/src/main/java/org/openo/msb/api/MicroServiceFullInfo.java44
-rw-r--r--apiroute/apiroute-service/src/main/java/org/openo/msb/api/MicroServiceInfo.java38
-rw-r--r--apiroute/apiroute-service/src/main/java/org/openo/msb/api/Node.java75
-rw-r--r--apiroute/apiroute-service/src/main/java/org/openo/msb/api/NodeInfo.java74
-rw-r--r--apiroute/apiroute-service/src/main/java/org/openo/msb/api/RouteServer.java68
-rw-r--r--apiroute/apiroute-service/src/main/java/org/openo/msb/api/Service.java104
-rw-r--r--apiroute/apiroute-service/src/main/java/org/openo/msb/api/ServiceAccessInfo.java88
-rw-r--r--apiroute/apiroute-service/src/main/java/org/openo/msb/api/exception/ExtendedInternalServerErrorException.java28
-rw-r--r--apiroute/apiroute-service/src/main/java/org/openo/msb/api/exception/ExtendedNotFoundException.java28
-rw-r--r--apiroute/apiroute-service/src/main/java/org/openo/msb/api/exception/ExtendedNotSupportedException.java27
17 files changed, 0 insertions, 1231 deletions
diff --git a/apiroute/apiroute-service/src/main/java/org/openo/msb/api/ApiRouteInfo.java b/apiroute/apiroute-service/src/main/java/org/openo/msb/api/ApiRouteInfo.java
deleted file mode 100644
index 54f3f34..0000000
--- a/apiroute/apiroute-service/src/main/java/org/openo/msb/api/ApiRouteInfo.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/**
-* Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
-*
-* 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/apiroute/apiroute-service/src/main/java/org/openo/msb/api/ConsulInfo.java b/apiroute/apiroute-service/src/main/java/org/openo/msb/api/ConsulInfo.java
deleted file mode 100644
index 12c0dcb..0000000
--- a/apiroute/apiroute-service/src/main/java/org/openo/msb/api/ConsulInfo.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
-* Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
-*
-* 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/apiroute/apiroute-service/src/main/java/org/openo/msb/api/CustomDateSerializer.java b/apiroute/apiroute-service/src/main/java/org/openo/msb/api/CustomDateSerializer.java
deleted file mode 100644
index f99dcad..0000000
--- a/apiroute/apiroute-service/src/main/java/org/openo/msb/api/CustomDateSerializer.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
-* Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
-*
-* 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/apiroute/apiroute-service/src/main/java/org/openo/msb/api/CustomRouteInfo.java b/apiroute/apiroute-service/src/main/java/org/openo/msb/api/CustomRouteInfo.java
deleted file mode 100644
index 2b84a38..0000000
--- a/apiroute/apiroute-service/src/main/java/org/openo/msb/api/CustomRouteInfo.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/**
-* Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
-*
-* 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/apiroute/apiroute-service/src/main/java/org/openo/msb/api/DiscoverInfo.java b/apiroute/apiroute-service/src/main/java/org/openo/msb/api/DiscoverInfo.java
deleted file mode 100644
index 122dbc4..0000000
--- a/apiroute/apiroute-service/src/main/java/org/openo/msb/api/DiscoverInfo.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
-* Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
-*
-* 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/apiroute/apiroute-service/src/main/java/org/openo/msb/api/IuiRouteInfo.java b/apiroute/apiroute-service/src/main/java/org/openo/msb/api/IuiRouteInfo.java
deleted file mode 100644
index 0087fdf..0000000
--- a/apiroute/apiroute-service/src/main/java/org/openo/msb/api/IuiRouteInfo.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/**
-* Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
-*
-* 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/apiroute/apiroute-service/src/main/java/org/openo/msb/api/MetricsInfo.java b/apiroute/apiroute-service/src/main/java/org/openo/msb/api/MetricsInfo.java
deleted file mode 100644
index 324b582..0000000
--- a/apiroute/apiroute-service/src/main/java/org/openo/msb/api/MetricsInfo.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/**
-* Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
-*
-* 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/apiroute/apiroute-service/src/main/java/org/openo/msb/api/MicroServiceFullInfo.java b/apiroute/apiroute-service/src/main/java/org/openo/msb/api/MicroServiceFullInfo.java
deleted file mode 100644
index ccf1977..0000000
--- a/apiroute/apiroute-service/src/main/java/org/openo/msb/api/MicroServiceFullInfo.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
-* Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
-*
-* 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/apiroute/apiroute-service/src/main/java/org/openo/msb/api/MicroServiceInfo.java b/apiroute/apiroute-service/src/main/java/org/openo/msb/api/MicroServiceInfo.java
deleted file mode 100644
index e6e1b73..0000000
--- a/apiroute/apiroute-service/src/main/java/org/openo/msb/api/MicroServiceInfo.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
-* Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
-*
-* 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/apiroute/apiroute-service/src/main/java/org/openo/msb/api/Node.java b/apiroute/apiroute-service/src/main/java/org/openo/msb/api/Node.java
deleted file mode 100644
index f0d179f..0000000
--- a/apiroute/apiroute-service/src/main/java/org/openo/msb/api/Node.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
-* Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
-*
-* 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/apiroute/apiroute-service/src/main/java/org/openo/msb/api/NodeInfo.java b/apiroute/apiroute-service/src/main/java/org/openo/msb/api/NodeInfo.java
deleted file mode 100644
index 9988e1d..0000000
--- a/apiroute/apiroute-service/src/main/java/org/openo/msb/api/NodeInfo.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
-* Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
-*
-* 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/apiroute/apiroute-service/src/main/java/org/openo/msb/api/RouteServer.java b/apiroute/apiroute-service/src/main/java/org/openo/msb/api/RouteServer.java
deleted file mode 100644
index 3e01c4f..0000000
--- a/apiroute/apiroute-service/src/main/java/org/openo/msb/api/RouteServer.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
-* Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
-*
-* 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/apiroute/apiroute-service/src/main/java/org/openo/msb/api/Service.java b/apiroute/apiroute-service/src/main/java/org/openo/msb/api/Service.java
deleted file mode 100644
index 51f0e86..0000000
--- a/apiroute/apiroute-service/src/main/java/org/openo/msb/api/Service.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/**
-* Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
-*
-* 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/apiroute/apiroute-service/src/main/java/org/openo/msb/api/ServiceAccessInfo.java b/apiroute/apiroute-service/src/main/java/org/openo/msb/api/ServiceAccessInfo.java
deleted file mode 100644
index 34c4a67..0000000
--- a/apiroute/apiroute-service/src/main/java/org/openo/msb/api/ServiceAccessInfo.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
-* Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
-*
-* 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/apiroute/apiroute-service/src/main/java/org/openo/msb/api/exception/ExtendedInternalServerErrorException.java b/apiroute/apiroute-service/src/main/java/org/openo/msb/api/exception/ExtendedInternalServerErrorException.java
deleted file mode 100644
index ce57dc6..0000000
--- a/apiroute/apiroute-service/src/main/java/org/openo/msb/api/exception/ExtendedInternalServerErrorException.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
-* Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
-*
-* 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/apiroute/apiroute-service/src/main/java/org/openo/msb/api/exception/ExtendedNotFoundException.java b/apiroute/apiroute-service/src/main/java/org/openo/msb/api/exception/ExtendedNotFoundException.java
deleted file mode 100644
index ca5f747..0000000
--- a/apiroute/apiroute-service/src/main/java/org/openo/msb/api/exception/ExtendedNotFoundException.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
-* Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
-*
-* 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/apiroute/apiroute-service/src/main/java/org/openo/msb/api/exception/ExtendedNotSupportedException.java b/apiroute/apiroute-service/src/main/java/org/openo/msb/api/exception/ExtendedNotSupportedException.java
deleted file mode 100644
index 84bfbaa..0000000
--- a/apiroute/apiroute-service/src/main/java/org/openo/msb/api/exception/ExtendedNotSupportedException.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
-* Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
-*
-* 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());
- }
-}