You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eventmesh.apache.org by mi...@apache.org on 2022/09/26 12:32:41 UTC
[incubator-eventmesh] branch protocol-amqp updated: realization channel and connection interface
This is an automated email from the ASF dual-hosted git repository.
mikexue pushed a commit to branch protocol-amqp
in repository https://gitbox.apache.org/repos/asf/incubator-eventmesh.git
The following commit(s) were added to refs/heads/protocol-amqp by this push:
new 19155300 realization channel and connection interface
new 97aae300 Merge pull request #1424 from wangshaojie4039/protocol-amqp
19155300 is described below
commit 191553002ea2ca1cbfe9b489e9c1fab2002110d1
Author: wangshaojie <wa...@cmss.chinamobile.com>
AuthorDate: Mon Sep 26 20:07:48 2022 +0800
realization channel and connection interface
---
.../amqp/processor/ChannelMethodProcessor.java | 92 ++++++++++++++++++++++
.../amqp/processor/ConnectionMethodProcessor.java | 40 ++++++++++
2 files changed, 132 insertions(+)
diff --git a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/amqp/processor/ChannelMethodProcessor.java b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/amqp/processor/ChannelMethodProcessor.java
new file mode 100644
index 00000000..fd3e9341
--- /dev/null
+++ b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/amqp/processor/ChannelMethodProcessor.java
@@ -0,0 +1,92 @@
+package org.apache.eventmesh.runtime.core.protocol.amqp.processor;
+
+import org.apache.eventmesh.runtime.core.protocol.amqp.remoting.AMQPFrame;
+
+import java.util.Map;
+
+public interface ChannelMethodProcessor {
+
+ void receiveChannelFlow(boolean active);
+
+ void receiveChannelFlowOk(boolean active);
+
+ void receiveChannelClose(int replyCode, String replyText, int classId, int methodId);
+
+ void receiveChannelCloseOk();
+
+ void receiveMessageContent(AMQPFrame data);
+
+ void receiveMessageHeader(AMQPFrame frame);
+
+ boolean ignoreAllButCloseOk();
+
+ void receiveBasicNack(long deliveryTag, boolean multiple, boolean requeue);
+
+ void receiveBasicAck(long deliveryTag, boolean multiple);
+
+ void receiveAccessRequest(String realm,
+ boolean exclusive,
+ boolean passive,
+ boolean active,
+ boolean write, boolean read);
+
+ void receiveExchangeDeclare(String exchange,
+ String type,
+ boolean passive,
+ boolean durable,
+ boolean autoDelete, boolean internal, boolean nowait, final Map<String, Object> arguments);
+
+ void receiveExchangeDelete(String exchange, boolean ifUnused, boolean nowait);
+
+ void receiveExchangeBound(String exchange, String routingKey, String queue);
+
+ void receiveQueueDeclare(String queue,
+ boolean passive,
+ boolean durable,
+ boolean exclusive,
+ boolean autoDelete, boolean nowait, Map<String, Object> arguments);
+
+ void receiveQueueBind(String queue,
+ String exchange,
+ String bindingKey,
+ boolean nowait, Map<String, Object> arguments);
+
+ void receiveQueuePurge(String queue, boolean nowait);
+
+ void receiveQueueDelete(String queue, boolean ifUnused, boolean ifEmpty, boolean nowait);
+
+ void receiveQueueUnbind(String queue,
+ String exchange,
+ String bindingKey,
+ Map<String, Object> arguments);
+
+ void receiveBasicRecover(final boolean requeue, boolean sync);
+
+ void receiveBasicQos(long prefetchSize, int prefetchCount, boolean global);
+
+ void receiveBasicConsume(String queue,
+ String consumerTag,
+ boolean noLocal,
+ boolean noAck,
+ boolean exclusive, boolean nowait, Map<String, Object> arguments);
+
+ void receiveBasicCancel(String consumerTag, boolean noWait);
+
+ void receiveBasicPublish(String exchange,
+ String routingKey,
+ boolean mandatory,
+ boolean immediate);
+
+ void receiveBasicGet(String queue, boolean noAck);
+
+ void receiveBasicReject(long deliveryTag, boolean requeue);
+
+ void receiveTxSelect();
+
+ void receiveTxCommit();
+
+ void receiveTxRollback();
+
+ void receiveConfirmSelect(boolean nowait);
+
+}
diff --git a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/amqp/processor/ConnectionMethodProcessor.java b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/amqp/processor/ConnectionMethodProcessor.java
new file mode 100644
index 00000000..5b113fe4
--- /dev/null
+++ b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/amqp/processor/ConnectionMethodProcessor.java
@@ -0,0 +1,40 @@
+package org.apache.eventmesh.runtime.core.protocol.amqp.processor;
+
+import com.rabbitmq.client.LongString;
+import org.apache.eventmesh.runtime.core.protocol.amqp.remoting.protocol.ProtocolFrame;
+import org.apache.eventmesh.runtime.core.protocol.amqp.remoting.protocol.ProtocolVersion;
+
+import java.util.Map;
+
+public interface ConnectionMethodProcessor {
+
+ void receiveConnectionStartOk(Map<String, Object> clientProperties,
+ String mechanism,
+ LongString response,
+ String locale);
+
+ void receiveConnectionSecureOk(LongString response);
+
+ void receiveConnectionTuneOk(int channelMax, long frameMax, int heartbeat);
+
+ void receiveConnectionOpen(String virtualHost, String capabilities, boolean insist);
+
+ void receiveChannelOpen(int channelId);
+
+ ProtocolVersion getProtocolVersion();
+
+ ChannelMethodProcessor getChannelMethodProcessor(int channelId);
+
+ void receiveConnectionClose(int replyCode, String replyText, int classId, int methodId);
+
+ void receiveConnectionCloseOk();
+
+ void receiveHeartbeat();
+
+ void receiveProtocolHeader(ProtocolFrame protocolFrame);
+
+ void setCurrentMethod(int classId, int methodId);
+
+ boolean ignoreAllButCloseOk();
+
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: commits-help@eventmesh.apache.org