diff --git a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/http/consumer/HandleResult.java b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/http/consumer/HandleResult.java deleted file mode 100644 index c5a9a85bd3..0000000000 --- a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/http/consumer/HandleResult.java +++ /dev/null @@ -1,25 +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. - */ - -package org.apache.eventmesh.client.http.consumer; - -public enum HandleResult { - OK, - NOLISTEN, - RETRY, - FAIL -} diff --git a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/http/consumer/context/LiteConsumeContext.java b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/http/consumer/context/LiteConsumeContext.java deleted file mode 100644 index 63635f0d52..0000000000 --- a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/http/consumer/context/LiteConsumeContext.java +++ /dev/null @@ -1,103 +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. - */ - -package org.apache.eventmesh.client.http.consumer.context; - -import org.apache.eventmesh.common.Constants; - -import org.apache.commons.lang3.time.DateFormatUtils; - -public class LiteConsumeContext { - - private String eventMeshIp; - - private String eventMeshEnv; - - private String eventMeshIdc; - - private String eventMeshCluster; - - // Local RETRY times - private int retryTimes = 0; - - private long createTime = System.currentTimeMillis(); - - public LiteConsumeContext(String eventMeshIp, String eventMeshEnv, - String eventMeshIdc, - String eventMeshCluster) { - this.eventMeshIp = eventMeshIp; - this.eventMeshEnv = eventMeshEnv; - this.eventMeshIdc = eventMeshIdc; - this.eventMeshCluster = eventMeshCluster; - - } - - public String getEventMeshIp() { - return eventMeshIp; - } - - public void setEventMeshIp(String eventMeshIp) { - this.eventMeshIp = eventMeshIp; - } - - public String getEventMeshEnv() { - return eventMeshEnv; - } - - public void setEventMeshEnv(String eventMeshEnv) { - this.eventMeshEnv = eventMeshEnv; - } - - public String getEventMeshIdc() { - return eventMeshIdc; - } - - public void setEventMeshIdc(String eventMeshIdc) { - this.eventMeshIdc = eventMeshIdc; - } - - public String getEventMeshCluster() { - return eventMeshCluster; - } - - public void setEventMeshCluster(String eventMeshCluster) { - this.eventMeshCluster = eventMeshCluster; - } - - public int getRetryTimes() { - return retryTimes; - } - - public void setRetryTimes(int retryTimes) { - this.retryTimes = retryTimes; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("liteConsumeContext={") - .append("eventMeshIp=").append(eventMeshIp).append(",") - .append("eventMeshEnv=").append(eventMeshEnv).append(",") - .append("eventMeshIdc=").append(eventMeshIdc).append(",") - .append("eventMeshCluster=").append(eventMeshCluster).append(",") - .append("retryTimes=").append(retryTimes).append(",") - .append("createTime=").append(DateFormatUtils.format(createTime, Constants.DATE_FORMAT)) - .append("}"); - return sb.toString(); - } - -} diff --git a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/http/consumer/listener/LiteMessageListener.java b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/http/consumer/listener/LiteMessageListener.java deleted file mode 100644 index 78de0225b7..0000000000 --- a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/http/consumer/listener/LiteMessageListener.java +++ /dev/null @@ -1,34 +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. - */ - -package org.apache.eventmesh.client.http.consumer.listener; - - -import org.apache.eventmesh.client.http.consumer.HandleResult; -import org.apache.eventmesh.client.http.consumer.context.LiteConsumeContext; -import org.apache.eventmesh.common.EventMeshMessage; - -/** - * LiteMessageListener - */ -public interface LiteMessageListener { - - HandleResult handle(EventMeshMessage eventMeshMessage, LiteConsumeContext liteConsumeContext); - - boolean reject(); - -} diff --git a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/common/RequestContext.java b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/common/RequestContext.java index a713bd8850..3f3fe0c86d 100644 --- a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/common/RequestContext.java +++ b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/common/RequestContext.java @@ -84,11 +84,6 @@ public static RequestContext context(Object key, Package request, CountDownLatch public static Object key(Package request) { - //MessageType type = request.getHeader().getType(); - //if(MessageType.SyncRequest == type || MessageType.SyncResponse == type - // || MessageType.AsyncRequest == type || MessageType.AsyncResponse == type) { - // return request.getBody().getSysHeader().getUniqueId() ; - //} return request.getHeader().getSeq(); } }