From c60ac522eab2511c295a423427b19b80637c5c46 Mon Sep 17 00:00:00 2001 From: yukon Date: Mon, 10 Apr 2017 12:37:08 +0800 Subject: [PATCH] Add openmessaging module. --- .../example/openmessaging/SimpleProducer.java | 23 ++++ openmessaging/pom.xml | 37 ++++++ .../rocketmq/MessagingAccessPointImpl.java | 115 ++++++++++++++++++ pom.xml | 6 + 4 files changed, 181 insertions(+) create mode 100644 example/src/main/java/org/apache/rocketmq/example/openmessaging/SimpleProducer.java create mode 100644 openmessaging/pom.xml create mode 100644 openmessaging/src/main/java/io/openmessaging/rocketmq/MessagingAccessPointImpl.java diff --git a/example/src/main/java/org/apache/rocketmq/example/openmessaging/SimpleProducer.java b/example/src/main/java/org/apache/rocketmq/example/openmessaging/SimpleProducer.java new file mode 100644 index 00000000..3b71849e --- /dev/null +++ b/example/src/main/java/org/apache/rocketmq/example/openmessaging/SimpleProducer.java @@ -0,0 +1,23 @@ +/* + * 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.rocketmq.example.openmessaging; + +public class SimpleProducer { + public static void main(String[] args) { + + } +} diff --git a/openmessaging/pom.xml b/openmessaging/pom.xml new file mode 100644 index 00000000..d5686504 --- /dev/null +++ b/openmessaging/pom.xml @@ -0,0 +1,37 @@ + + + + + + rocketmq-all + org.apache.rocketmq + 4.1.0-incubating-SNAPSHOT + + 4.0.0 + + rocketmq-openmessaging + + + + io.openmessaging + messaging-user-level-api + + + \ No newline at end of file diff --git a/openmessaging/src/main/java/io/openmessaging/rocketmq/MessagingAccessPointImpl.java b/openmessaging/src/main/java/io/openmessaging/rocketmq/MessagingAccessPointImpl.java new file mode 100644 index 00000000..2f75686f --- /dev/null +++ b/openmessaging/src/main/java/io/openmessaging/rocketmq/MessagingAccessPointImpl.java @@ -0,0 +1,115 @@ +/* + * 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 io.openmessaging.rocketmq; + +import io.openmessaging.IterableConsumer; +import io.openmessaging.KeyValue; +import io.openmessaging.MessagingAccessPoint; +import io.openmessaging.Producer; +import io.openmessaging.PullConsumer; +import io.openmessaging.PushConsumer; +import io.openmessaging.ResourceManager; +import io.openmessaging.SequenceProducer; +import io.openmessaging.ServiceEndPoint; +import io.openmessaging.observer.Observer; + +public class MessagingAccessPointImpl implements MessagingAccessPoint { + @Override + public Producer createProducer() { + return null; + } + + @Override + public Producer createProducer(KeyValue properties) { + return null; + } + + @Override + public SequenceProducer createSequenceProducer() { + return null; + } + + @Override + public SequenceProducer createSequenceProducer(KeyValue properties) { + return null; + } + + @Override + public PushConsumer createPushConsumer() { + return null; + } + + @Override + public PushConsumer createPushConsumer(KeyValue properties) { + return null; + } + + @Override + public PullConsumer createPullConsumer(String queueName) { + return null; + } + + @Override + public PullConsumer createPullConsumer(String queueName, KeyValue properties) { + return null; + } + + @Override + public IterableConsumer createIterableConsumer(String queueName) { + return null; + } + + @Override + public IterableConsumer createIterableConsumer(String queueName, KeyValue properties) { + return null; + } + + @Override + public ResourceManager createResourceManager() { + return null; + } + + @Override + public ServiceEndPoint createServiceEndPoint() { + return null; + } + + @Override + public ServiceEndPoint createServiceEndPoint(KeyValue properties) { + return null; + } + + @Override + public void addObserver(Observer observer) { + + } + + @Override + public void deleteObserver(Observer observer) { + + } + + @Override + public void startup() { + //Ignore + } + + @Override + public void shutdown() { + //Ignore + } +} diff --git a/pom.xml b/pom.xml index 47df84d4..cf6ec9b2 100644 --- a/pom.xml +++ b/pom.xml @@ -180,6 +180,7 @@ srvutil test distribution + openmessaging @@ -603,6 +604,11 @@ commons-lang3 3.4 + + io.openmessaging + messaging-user-level-api + 1.0.0-SNAPSHOT + -- GitLab