You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by li...@apache.org on 2022/11/15 07:58:46 UTC
[servicecomb-java-chassis] branch master updated: [SCB-1166]remove unused Handler#init method (#3477)
This is an automated email from the ASF dual-hosted git repository.
liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-java-chassis.git
The following commit(s) were added to refs/heads/master by this push:
new 223e44249 [SCB-1166]remove unused Handler#init method (#3477)
223e44249 is described below
commit 223e4424976c2367ffd8fb51f5b20f38cd79504a
Author: liubao68 <bi...@qq.com>
AuthorDate: Tue Nov 15 15:58:40 2022 +0800
[SCB-1166]remove unused Handler#init method (#3477)
---
.../main/java/org/apache/servicecomb/core/Handler.java | 5 -----
.../demo/edge/service/handler/AuthHandler.java | 6 ------
.../org.apache.servicecomb.core.filter.FilterProvider | 18 ------------------
3 files changed, 29 deletions(-)
diff --git a/core/src/main/java/org/apache/servicecomb/core/Handler.java b/core/src/main/java/org/apache/servicecomb/core/Handler.java
index b966963c2..d2df96f51 100644
--- a/core/src/main/java/org/apache/servicecomb/core/Handler.java
+++ b/core/src/main/java/org/apache/servicecomb/core/Handler.java
@@ -17,14 +17,9 @@
package org.apache.servicecomb.core;
-import org.apache.servicecomb.core.definition.MicroserviceMeta;
import org.apache.servicecomb.swagger.invocation.AsyncResponse;
-import org.apache.servicecomb.swagger.invocation.InvocationType;
// 每个微服务 + invocationType,都对应一个handler实例
public interface Handler {
- default void init(MicroserviceMeta microserviceMeta, InvocationType invocationType) {
- }
-
void handle(Invocation invocation, AsyncResponse asyncResp) throws Exception;
}
diff --git a/demo/demo-edge/edge-service/src/main/java/org/apache/servicecomb/demo/edge/service/handler/AuthHandler.java b/demo/demo-edge/edge-service/src/main/java/org/apache/servicecomb/demo/edge/service/handler/AuthHandler.java
index 75bd6fdbd..256418ff5 100644
--- a/demo/demo-edge/edge-service/src/main/java/org/apache/servicecomb/demo/edge/service/handler/AuthHandler.java
+++ b/demo/demo-edge/edge-service/src/main/java/org/apache/servicecomb/demo/edge/service/handler/AuthHandler.java
@@ -21,11 +21,9 @@ import javax.ws.rs.core.Response.Status;
import org.apache.servicecomb.core.Handler;
import org.apache.servicecomb.core.Invocation;
-import org.apache.servicecomb.core.definition.MicroserviceMeta;
import org.apache.servicecomb.demo.edge.service.EdgeConst;
import org.apache.servicecomb.provider.pojo.Invoker;
import org.apache.servicecomb.swagger.invocation.AsyncResponse;
-import org.apache.servicecomb.swagger.invocation.InvocationType;
import org.apache.servicecomb.swagger.invocation.exception.InvocationException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -39,10 +37,6 @@ public class AuthHandler implements Handler {
auth = Invoker.createProxy("auth", "auth", Auth.class);
}
- @Override
- public void init(MicroserviceMeta microserviceMeta, InvocationType invocationType) {
- }
-
@Override
public void handle(Invocation invocation, AsyncResponse asyncResp) throws Exception {
if (invocation.getHandlerContext().get(EdgeConst.ENCRYPT_CONTEXT) != null) {
diff --git a/handlers/handler-tracing-zipkin/src/main/resources/META-INF/services/org.apache.servicecomb.core.filter.FilterProvider b/handlers/handler-tracing-zipkin/src/main/resources/META-INF/services/org.apache.servicecomb.core.filter.FilterProvider
deleted file mode 100644
index 400b61ec7..000000000
--- a/handlers/handler-tracing-zipkin/src/main/resources/META-INF/services/org.apache.servicecomb.core.filter.FilterProvider
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-org.apache.servicecomb.tracing.zipkin.ZipkinFilterProvider
\ No newline at end of file