Skip to content

Commit 92273e4

Browse files
authored
Merge pull request #64 from duhenglucky/2.0.0-pubsub
feat(oms-pubsub) add unified client manage Admin interface
2 parents 7a671fa + 0653977 commit 92273e4

File tree

8 files changed

+42
-15
lines changed

8 files changed

+42
-15
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
package io.openmessaging.api;
18+
19+
/**
20+
* <p>
21+
* Client basic management interface, used for as a unified interface to manage basic operations such as start, stop,
22+
* and authorization information management.
23+
*
24+
* </p>
25+
*
26+
* @version OMS 1.2.0
27+
* @since OMS 1.2.0
28+
*/
29+
public interface Admin extends LifeCycle, Credentials {
30+
}

openmessaging-api/src/main/java/io/openmessaging/api/Consumer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* @version OMS 1.2.0
2323
* @since OMS 1.2.0
2424
*/
25-
public interface Consumer extends LifeCycle, Credentials {
25+
public interface Consumer extends Admin {
2626

2727
/**
2828
* Subscribe message in order.
@@ -50,6 +50,7 @@ public interface Consumer extends LifeCycle, Credentials {
5050

5151
/**
5252
* Unsubscribe message
53+
*
5354
* @param topic
5455
*/
5556
void unsubscribe(final String topic);

openmessaging-api/src/main/java/io/openmessaging/api/Producer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
* @version OMS 1.2.0
4242
* @since OMS 1.2.0
4343
*/
44-
public interface Producer extends LifeCycle, Credentials {
44+
public interface Producer extends Admin {
4545

4646
/**
4747
* Sends a message to the specified destination synchronously, the destination should be preset to {@link

openmessaging-api/src/main/java/io/openmessaging/api/PullConsumer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import java.util.List;
2121
import java.util.Set;
2222

23-
public interface PullConsumer extends LifeCycle, Credentials {
23+
public interface PullConsumer extends Admin {
2424

2525
interface TopicPartitionChangeListener {
2626
/**

openmessaging-api/src/main/java/io/openmessaging/api/batch/BatchConsumer.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,15 @@
1717

1818
package io.openmessaging.api.batch;
1919

20-
import io.openmessaging.api.Credentials;
21-
import io.openmessaging.api.LifeCycle;
20+
import io.openmessaging.api.Admin;
2221

2322
/**
2423
* Batch message consumer, used to subscribe to messages in batch.
2524
*
2625
* @version OMS 1.2.0
2726
* @since OMS 1.2.0
2827
*/
29-
public interface BatchConsumer extends LifeCycle, Credentials {
28+
public interface BatchConsumer extends Admin {
3029

3130
/**
3231
* Subscribe message

openmessaging-api/src/main/java/io/openmessaging/api/order/OrderConsumer.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@
1717

1818
package io.openmessaging.api.order;
1919

20-
import io.openmessaging.api.Credentials;
20+
import io.openmessaging.api.Admin;
2121
import io.openmessaging.api.ExpressionType;
22-
import io.openmessaging.api.LifeCycle;
2322
import io.openmessaging.api.MessageSelector;
2423

2524
/**
@@ -28,7 +27,7 @@
2827
* @version OMS 1.2.0
2928
* @since OMS 1.2.0
3029
*/
31-
public interface OrderConsumer extends LifeCycle, Credentials {
30+
public interface OrderConsumer extends Admin {
3231

3332
/**
3433
* Subscribe message in order.

openmessaging-api/src/main/java/io/openmessaging/api/order/OrderProducer.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717

1818
package io.openmessaging.api.order;
1919

20-
import io.openmessaging.api.Credentials;
21-
import io.openmessaging.api.LifeCycle;
20+
import io.openmessaging.api.Admin;
2221
import io.openmessaging.api.Message;
2322
import io.openmessaging.api.SendResult;
2423

@@ -28,7 +27,7 @@
2827
* @version OMS 1.2.0
2928
* @since OMS 1.2.0
3029
*/
31-
public interface OrderProducer extends LifeCycle, Credentials {
30+
public interface OrderProducer extends Admin {
3231

3332
/**
3433
* Send message in order

openmessaging-api/src/main/java/io/openmessaging/api/transaction/TransactionProducer.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717

1818
package io.openmessaging.api.transaction;
1919

20-
import io.openmessaging.api.Credentials;
21-
import io.openmessaging.api.LifeCycle;
20+
import io.openmessaging.api.Admin;
2221
import io.openmessaging.api.Message;
2322
import io.openmessaging.api.SendResult;
2423

@@ -28,7 +27,7 @@
2827
* @version OMS 1.2.0
2928
* @since OMS 1.2.0
3029
*/
31-
public interface TransactionProducer extends LifeCycle, Credentials {
30+
public interface TransactionProducer extends Admin {
3231

3332
/**
3433
* This method is used to send a transactional message. A transactional message is sent in three steps:

0 commit comments

Comments
 (0)