diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 36716aa7..00000000 --- a/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -*.iml -*.class -*.jar -*dependency-reduced-pom.xml -.classpath -.project -.settings/ -target/ -devenv -*.log* -*.iml -.idea/ -*.versionsBackup -.DS_Store \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 633b3b73..00000000 --- a/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -dist: trusty - -notifications: - email: - recipients: - - openmessaging-members@googlegroups.com - on_success: change - on_failure: always - - -language: java - -jdk: - - oraclejdk8 - - oraclejdk9 - -script: mvn install -env: - global: - secure: hmPdcALAi6qE3TqJDRqdVCqZftd/i2hWLCyZbIAcRzu38nO94JZYKSZjfif1FvXTJYotFW25JClXNyvOMwMjjK3OPQINfYFZIp6LLeOmXGbUcktwQ8TIoKZ7IOvvWiZK054H7zNKapz+ke3OPN/5WTmMBezV0Ct4+bSf9udKVnQSMG2sJ8YJ/SeZkh7RTlqO+zTkh+yq8Hk0BdaWEOK8RtEoWgcUFGVfkycvjgvna+TbDp3K7vjmhYBBqACsNKxXPgIumStbCGW4vwjoVkCOGIJKWnuQEVHxiqBUH3pp81bxnt+RIcMuZMR2HnDSpHyAIulTJNHVo3VFAAiy9HMdP8Wfy/OVdjBSZ8xIOoQvFijo+yGNNn8v4hILcX4IpumQeyjpG134BOWVbMLhKH7qWR3Z8TGgijSd4lYYjabCJ564E93KvqK1u2CuS9u89N8J7AKFYMbknH1DP8E5tCD+VI3Gwut9YNofywj3Jln8uCOP4I//8p61j9A9QF7ORpY59Ru4RNzxYrFn2QSTltMfaBfVZchh5AqURUamcJd+1orZfz/v+6yH9FOW+MAG8EJdzHDsqzP1NXrt+4VtF6yqOnhBxnKVNEwFwjsinW9PFi9dXyzdEd33jKGL7UO8Old5XlBoA7idWIDH4GKKSlBRZhEKWMe4ZfxpQVg3VPz2Qqo= - -after_success: - - bash .utility/push-javadoc-to-gh-pages.sh diff --git a/.utility/push-javadoc-to-gh-pages.sh b/.utility/push-javadoc-to-gh-pages.sh deleted file mode 100644 index 186b53a9..00000000 --- a/.utility/push-javadoc-to-gh-pages.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -if [ "$TRAVIS_REPO_SLUG" == "openmessaging/openmessaging-java" ] && [ "$TRAVIS_JDK_VERSION" == "oraclejdk8" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then - - echo -e "Publishing javadoc...\n" - mvn javadoc:aggregate -pl :parent,:openmessaging-api - rm -rf $HOME/javadoc-latest - cp -R target/site/apidocs/ $HOME/javadoc-latest - - cd $HOME - git config --global user.email "travis@travis-ci.org" - git config --global user.name "travis-ci" - git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/openmessaging/openmessaging-java gh-pages > /dev/null - - cd gh-pages - git rm -rf . - cp -Rf $HOME/javadoc-latest/. . - git add -f . - git commit -m "Latest javadoc on successful travis build $TRAVIS_BUILD_NUMBER auto-pushed to gh-pages" - git push -fq origin gh-pages > /dev/null - - echo -e "Published Javadoc to gh-pages.\n" - -fi diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 0ade3d06..00000000 --- a/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2017 Alibaba - - Licensed 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. diff --git a/README.md b/README.md deleted file mode 100644 index d7a9539f..00000000 --- a/README.md +++ /dev/null @@ -1,13 +0,0 @@ -##  - -[](https://travis-ci.org/openmessaging/openmessaging-java) [](http://search.maven.org/#search%7Cga%7C1%7Copenmessaging) [](https://openmessaging.herokuapp.com/) [](https://www.apache.org/licenses/LICENSE-2.0.html) - -### A vendor-neutral open standard for distributed messaging and streaming -OpenMessaging, which includes the establishment of industry guidelines and messaging, streaming specifications to provide a common framework for finance, e-commerce, IoT and big-data area. The design principles are the cloud-oriented, simplicity, flexibility, and language independent in distributed heterogeneous environments. Conformance to these specifications will make it possible to develop a heterogeneous messaging applications across all major platforms and operating systems. - - -## Doc -[API Doc](https://openmessaging.github.io/openmessaging-java/). - - -##  diff --git a/allclasses-frame.html b/allclasses-frame.html new file mode 100644 index 00000000..243771d1 --- /dev/null +++ b/allclasses-frame.html @@ -0,0 +1,61 @@ + + + +
+ + +| Modifier and Type | +Constant Field | +Value | +
|---|---|---|
+
+public static final String |
+ACCESS_POINTS |
+"ACCESS_POINTS" |
+
+
+public static final String |
+ACCOUNT_ID |
+"ACCOUNT_ID" |
+
+
+public static final String |
+ACCOUNT_KEY |
+"ACCOUNT_KEY" |
+
+
+public static final String |
+DRIVER_IMPL |
+"DRIVER_IMPL" |
+
+
+public static final String |
+REGION |
+"REGION" |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/deprecated-list.html b/deprecated-list.html new file mode 100644 index 00000000..2bbe4853 --- /dev/null +++ b/deprecated-list.html @@ -0,0 +1,126 @@ + + + + + + +Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/help-doc.html b/help-doc.html new file mode 100644 index 00000000..936b6e75 --- /dev/null +++ b/help-doc.html @@ -0,0 +1,231 @@ + + + + + + +The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.
+Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:
+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
+Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+Each annotation type has its own separate page with the following sections:
+Each enum has its own separate page with the following sections:
+Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.
The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
+The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
+These links take you to the next or previous class, interface, package, or related page.
+These links show and hide the HTML frames. All pages are available with or without frames.
+The All Classes link shows all classes and interfaces except non-static nested types.
+Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
+The Constant Field Values page lists the static final fields and their values.
+Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/index-all.html b/index-all.html new file mode 100644 index 00000000..a053e0ab --- /dev/null +++ b/index-all.html @@ -0,0 +1,1187 @@ + + + + + + +ACCESS_POINTS key shows the specified access points in OMS driver schema.ACCOUNT_ID key shows the specified account info in OMS driver schema.ACCOUNT_KEY key shows the specified account key in OMS attribute.MessageContext.MessageContext.ConsumerInterceptor instance to this consumer.ProducerInterceptor to intercept send operations of producer.Context instance.MessagingAccessPoint instance.BatchMessageListener interface and register itself to a consumer
+ instance to asynchronously receive messages.Consumer to a collection of queue in pull model, user can use PullConsumer.receive(long)
+ to get messages from a collection of queue.Consumer to a collection of queue, with a MessageListener.Consumer to a collection of queue, with a BatchMessageListener.Client interface contains all the common behaviors of producer and consumer.PushConsumer receives messages from multiple queues, these messages are pushed from MOM server to Consumer client.ConsumerInterceptor is used to intercept consume operations of push consumer.String is a key in this KeyValue.Context is used to transfer user's business data in the interceptor.Message object.Namespace resource with some preset attributes.Producer for the specified MessagingAccessPoint.Producer for the specified MessagingAccessPoint, the producer is able
+ to respond to requests from the server to check the status of the transaction.PullConsumer for the specified MessagingAccessPoint.PullConsumer for the specified MessagingAccessPoint.PushConsumer for the specified MessagingAccessPoint.PushConsumer for the specified MessagingAccessPoint with some preset attributes.Queue resource in the configured namespace with some preset attributes.DRIVER_IMPL key represents the vendor implementation
+ entry of MessagingAccessPoint.ExtensionHeader interface contains extended properties for common implementations in current messaging
+ and streaming field, such as the queue-based partitioning implementation, but the related properties in this
+ interface are not mandatory.Future represents the result of an asynchronous computation.Consumer.boolean property with the specified key in this KeyValue object.boolean property with the specified key in this KeyValue object.double property with the specified key in this KeyValue object.double property with the specified key in this KeyValue object.OMSRuntimeException object.int property with the specified key in this KeyValue object.int property with the specified key in this KeyValue object.long property with the specified key in this KeyValue object.long property with the specified key in this KeyValue object.MessageReceipt of this Message, which will be used to acknowledge this message.MessagingAccessPoint instance from the specified OMS driver url.MessagingAccessPoint instance from the specified OMS driver url with some preset attributes,
+ which will be passed to MessagingAccessPoint's implementation class as a unique constructor parameter.OFFSET in the partition to which the message belongs to, but the premise is
+ that the implementation of the server side is dependent on the partition or a queue-like storage mechanism.short property with the specified key in this KeyValue object.short property with the specified key in this KeyValue object.String property with the specified key in this KeyValue object.String property with the specified key in this KeyValue object.Header interface is the root interface of all OMS messages, and the most commonly used by OMS message
+ Message.Message object as a KeyValue.true if this task was cancelled before it completed normally.true if this task completed.Consumer in push model is suspended.Set view of the keys contained in this KeyValue object.KeyValue class represents a persistent set of attributes, which supports method chaining.MessagingAccessPoint.Message interface is the root interface of all OMS messages, and the most commonly used OMS message is
+ Message.Message objects.MessageFactory instance from the specified MessagingAccessPoint.SendResult instance.MessageListener interface and register itself to a consumer instance
+ to asynchronously receive messages.MessageReceipt is a Message with a Receipt.MessagingAccessPoint may be obtained from OMS, which is capable of creating Producer, Consumer, ResourceManager, and other facility entities.KeyValue implementation instance.MessagingAccessPoint from the specified OMS driver url
+ and some useful util methods.OMSDestinationException must be thrown when the specified destination does not exist or the destination
+ is not readable or writableOMSMessageFormatException must be thrown when the provided message is not supported or the attributes are
+ the wrong type.OMSRuntimeException with the specified detail message
+ and error code.OMSRuntimeException with the specified error code and cause.OMSRuntimeException with the specified detail message,
+ error code and cause.OMSSecurityException must be thrown when the client have no enough authority to operate an resource.OMSTimeOutException must be thrown when a blocking operation times out.OMSTransactionException must be thrown when the client execute a transaction error.OMSUnsupportException must be thrown when the specified methods, headers or properties have not been
+ provided by vendors, these methods or headers are usually marked by Optional.Promise successful or not.Optional is an annotation to mark some certain methods ,interfaces and etc.MessageListener.onReceived(Message, MessageListener.Context).Message.header(), other header fields as well.MessageListener.onReceived(Message, MessageListener.Context).Producer is a simple object used to send messages on behalf of a MessagingAccessPoint.ProducerInterceptor is used to intercept send operations of producer.Future which is writable.Message object as a KeyValue.PullConsumer pulls messages from the specified queue, and supports submit the consume result by
+ acknowledgement.PushConsumer receives messages from multiple queues, these messages are pushed from
+ MOM server to PushConsumer client.boolean value for the specified key.short value for the specified key.int value for the specified key.long value for the specified key.double value for the specified key.String value for the specified key.QueueMetaData contains methods are used for getting configurations related some certain
+ implementation.REGION key shows the specified region in OMS driver schema.ProducerInterceptor.ResourceManager is to provide a unified interface of resource management, allowing developers to manage
+ the namespace, queue and routing resources.ResourceManager instance from the specified MessagingAccessPoint.Consumer in push model after a suspend.Message.header(), other header fields as well.Message.header(), other header fields as well.Message.header(), other header fields as well.Promise related or RuntimeException thrown.Promise related or RuntimeException thrown.BORN_HOST header field contains the born host info of a message in client side.BORN_TIMESTAMP header field contains the time a message was handed off to a Producer to be
+ sent.COMPRESSION in headers represents the message body compress algorithm.CORRELATION_ID field to link one message with another.DELAY_TIME header field contains a number that represents the delayed times in milliseconds.DELIVERY_COUNT header field contains a number, which represents the count of the message delivery.DESTINATION header field contains the destination to which the message is being sent.DURABILITY header field contains the persistent level of a message, the vendor should guarantee the
+ reliability level for a message.EXPIRE_TIME header field contains the expiration time, it represents a time-to-live value.MESSAGE_ID header field contains a value that uniquely identify each message sent by a Producer.messagekey header field contains the custom key of a message.PARTITION in extension header field contains the partition of target destination which the message
+ is being sent.PRIORITY header field contains the priority level of a message, a message with a higher priority
+ value should be delivered preferentially.STORE_HOST header field contains the store host info of a message in server side.STORE_TIMESTAMP header field contains the store timestamp of a message in server side.TRACE_ID header field contains the trace ID of a message, which represents a global and unique
+ identification, to associate key events in the whole lifecycle of a message, like sent by who, stored at where,
+ and received by who.TRANSACTION_ID is used in transactional message, and it can be used to trace a transaction.MessageContext.Consumer in push model for later resumption.Consumer in push model for later resumption.TransactionResult instance.Consumer from a collection of queues.Consumer from a collection of queues.Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/index.html b/index.html new file mode 100644 index 00000000..eb0d5a4a --- /dev/null +++ b/index.html @@ -0,0 +1,76 @@ + + + + + + +public interface Client
+
+ A Client interface contains all the common behaviors of producer and consumer. which can be used to achieve
+ some basic interaction with the server.
+
| Modifier and Type | +Method and Description | +
|---|---|
Optional<Extension> |
+getExtension()
+Get the extension method, and this interface is optional, Therefore, users need to check whether this interface
+ has been implemented by vendors.
+ |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/Future.html b/io/openmessaging/Future.html new file mode 100644 index 00000000..8eece5c0 --- /dev/null +++ b/io/openmessaging/Future.html @@ -0,0 +1,394 @@ + + + + + + +public interface Future<V>
+
+ A Future represents the result of an asynchronous computation. Methods are provided to check if the
+ computation is complete, to wait for its completion, and to retrieve the result of the computation. The result can
+ only be retrieved using method get when the computation has completed, blocking if necessary until it is
+ ready. Additional methods are provided to determine if the task completed normally or was cancelled.
+
+ The reason for adding this future is mainly to satisfy the old version of jdk, such as jdk 1.6. +
| Modifier and Type | +Method and Description | +
|---|---|
void |
+addListener(FutureListener<V> listener)
+Adds the specified listener to this future.
+ |
+
boolean |
+cancel(boolean mayInterruptIfRunning)
+Attempts to cancel execution of this task.
+ |
+
V |
+get()
+Waits if necessary for the computation to complete, and then retrieves its result.
+ |
+
V |
+get(long timeout)
+Waits if necessary for at most the given time for the computation to complete, and then retrieves its result, if
+ available.
+ |
+
Throwable |
+getThrowable()
+Returns the cause of the failed future
+ |
+
boolean |
+isCancelled()
+Returns
+true if this task was cancelled before it completed normally. |
+
boolean |
+isDone()
+Returns
+true if this task completed. |
+
boolean cancel(boolean mayInterruptIfRunning)+
cancel is called,
+ this task should never run. If the task has already started,
+ then the mayInterruptIfRunning parameter determines
+ whether the thread executing this task should be interrupted in
+ an attempt to stop the task.
+
+ After this method returns, subsequent calls to isDone() will
+ always return true. Subsequent calls to isCancelled()
+ will always return true if this method returned true.
mayInterruptIfRunning - true if the thread executing this
+ task should be interrupted; otherwise, in-progress tasks are allowed
+ to completefalse if the task could not be cancelled,
+ typically because it has already completed normally;
+ true otherwiseboolean isCancelled()+
true if this task was cancelled before it completed normally.true if this task was cancelled before it completedboolean isDone()+
true if this task completed.
+
+ Completion may be due to normal termination, an exception, or cancellation -- in all of these cases, this method
+ will return true.
true if this task completedV get()+
V get(long timeout)+
timeout - the maximum time to waitif the computation was cancelled
void addListener(FutureListener<V> listener)+
listener - FutureListenerThrowable getThrowable()+
null if succeeded or this future is not completed yet.Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/FutureListener.html b/io/openmessaging/FutureListener.html new file mode 100644 index 00000000..03fdfcf0 --- /dev/null +++ b/io/openmessaging/FutureListener.html @@ -0,0 +1,239 @@ + + + + + + +public interface FutureListener<V>
+FutureListener instances are attached to Future by passing
+ them in to Future.addListener(FutureListener).| Modifier and Type | +Method and Description | +
|---|---|
void |
+operationComplete(Future<V> future)
+Invoked when the operation completes, be the associated
+Promise successful or not. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/KeyValue.html b/io/openmessaging/KeyValue.html new file mode 100644 index 00000000..2bcdfe4c --- /dev/null +++ b/io/openmessaging/KeyValue.html @@ -0,0 +1,727 @@ + + + + + + +public interface KeyValue
+KeyValue class represents a persistent set of attributes, which supports method chaining.
+
+ A KeyValue object only allows String keys and can contain four primitive type as values: int,
+ long, double, String.
+
+ The KeyValue is a replacement of Properties, with simpler interfaces and reasonable entry limits.
+
+ A KeyValue object may be used in concurrent scenarios, so the implementation of KeyValue should
+ consider concurrent related issues.
| Modifier and Type | +Method and Description | +
|---|---|
boolean |
+containsKey(String key)
+Tests if the specified
+String is a key in this KeyValue. |
+
boolean |
+getBoolean(String key)
+Searches for the
+boolean property with the specified key in this KeyValue object. |
+
boolean |
+getBoolean(String key,
+ boolean defaultValue)
+Searches for the
+boolean property with the specified key in this KeyValue object. |
+
double |
+getDouble(String key)
+Searches for the
+double property with the specified key in this KeyValue object. |
+
double |
+getDouble(String key,
+ double defaultValue)
+Searches for the
+double property with the specified key in this KeyValue object. |
+
int |
+getInt(String key)
+Searches for the
+int property with the specified key in this KeyValue object. |
+
int |
+getInt(String key,
+ int defaultValue)
+Searches for the
+int property with the specified key in this KeyValue object. |
+
long |
+getLong(String key)
+Searches for the
+long property with the specified key in this KeyValue object. |
+
long |
+getLong(String key,
+ long defaultValue)
+Searches for the
+long property with the specified key in this KeyValue object. |
+
short |
+getShort(String key)
+Searches for the
+short property with the specified key in this KeyValue object. |
+
short |
+getShort(String key,
+ short defaultValue)
+Searches for the
+short property with the specified key in this KeyValue object. |
+
String |
+getString(String key)
+Searches for the
+String property with the specified key in this KeyValue object. |
+
String |
+getString(String key,
+ String defaultValue)
+Searches for the
+String property with the specified key in this KeyValue object. |
+
Set<String> |
+keySet()
+Returns a
+Set view of the keys contained in this KeyValue object. |
+
KeyValue |
+put(String key,
+ boolean value)
+Inserts or replaces
+boolean value for the specified key. |
+
KeyValue |
+put(String key,
+ double value)
+Inserts or replaces
+double value for the specified key. |
+
KeyValue |
+put(String key,
+ int value)
+Inserts or replaces
+int value for the specified key. |
+
KeyValue |
+put(String key,
+ long value)
+Inserts or replaces
+long value for the specified key. |
+
KeyValue |
+put(String key,
+ short value)
+Inserts or replaces
+short value for the specified key. |
+
KeyValue |
+put(String key,
+ String value)
+Inserts or replaces
+String value for the specified key. |
+
KeyValue put(String key, + boolean value)+
boolean value for the specified key.key - the key to be placed into this KeyValue objectvalue - the value corresponding to keyKeyValue put(String key, + short value)+
short value for the specified key.key - the key to be placed into this KeyValue objectvalue - the value corresponding to keyKeyValue put(String key, + int value)+
int value for the specified key.key - the key to be placed into this KeyValue objectvalue - the value corresponding to keyKeyValue put(String key, + long value)+
long value for the specified key.key - the key to be placed into this KeyValue objectvalue - the value corresponding to keyKeyValue put(String key, + double value)+
double value for the specified key.key - the key to be placed into this KeyValue objectvalue - the value corresponding to keyKeyValue put(String key, + String value)+
String value for the specified key.key - the key to be placed into this KeyValue objectvalue - the value corresponding to keyboolean getBoolean(String key)+
boolean property with the specified key in this KeyValue object. If the key is
+ not found in this property list, false is returned.key - the property keyKeyValue object with the specified key valueput(String, boolean)boolean getBoolean(String key, + boolean defaultValue)+
boolean property with the specified key in this KeyValue object. If the key is
+ not found in this property list, false is returned.key - the property keydefaultValue - a default valueKeyValue object with the specified key valueput(String, boolean)short getShort(String key)+
short property with the specified key in this KeyValue object. If the key is not
+ found in this property list, zero is returned.key - the property keyKeyValue object with the specified key valueput(String, short)short getShort(String key, + short defaultValue)+
short property with the specified key in this KeyValue object. If the key is not
+ found in this property list, zero is returned.key - the property keydefaultValue - a default valueKeyValue object with the specified key valueput(String, short)int getInt(String key)+
int property with the specified key in this KeyValue object. If the key is not
+ found in this property list, zero is returned.key - the property keyKeyValue object with the specified key valueput(String, int)int getInt(String key, + int defaultValue)+
int property with the specified key in this KeyValue object. If the key is not
+ found in this property list, the default value argument is returned.key - the property keydefaultValue - a default valueKeyValue object with the specified key valueput(String, int)long getLong(String key)+
long property with the specified key in this KeyValue object. If the key is not
+ found in this property list, zero is returned.key - the property keyKeyValue object with the specified key valueput(String, long)long getLong(String key, + long defaultValue)+
long property with the specified key in this KeyValue object. If the key is not
+ found in this property list, the default value argument is returned.key - the property keydefaultValue - a default valueKeyValue object with the specified key valueput(String, long)double getDouble(String key)+
double property with the specified key in this KeyValue object. If the key is
+ not found in this property list, zero is returned.key - the property keyKeyValue object with the specified key valueput(String, double)double getDouble(String key, + double defaultValue)+
double property with the specified key in this KeyValue object. If the key is
+ not found in this property list, the default value argument is returned.key - the property keydefaultValue - a default valueKeyValue object with the specified key valueput(String, double)String getString(String key)+
String property with the specified key in this KeyValue object. If the key is
+ not found in this property list, null is returned.key - the property keyKeyValue object with the specified key valueput(String, String)String getString(String key, + String defaultValue)+
String property with the specified key in this KeyValue object. If the key is
+ not found in this property list, the default value argument is returned.key - the property keydefaultValue - a default valueKeyValue object with the specified key valueput(String, String)Set<String> keySet()+
Set view of the keys contained in this KeyValue object.
+
+ The set is backed by the KeyValue, so changes to the set are reflected in the @code KeyValue}, and
+ vice-versa.
KeyValue object.boolean containsKey(String key)+
String is a key in this KeyValue.key - possible keytrue if and only if the specified key is in this KeyValue, false
+ otherwise.Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/MessagingAccessPoint.html b/io/openmessaging/MessagingAccessPoint.html new file mode 100644 index 00000000..4b0da581 --- /dev/null +++ b/io/openmessaging/MessagingAccessPoint.html @@ -0,0 +1,472 @@ + + + + + + +public interface MessagingAccessPoint
+MessagingAccessPoint may be obtained from OMS, which is capable of creating Producer, Consumer, ResourceManager, and other facility entities.
+ + For example: +
+ MessagingAccessPoint messagingAccessPoint = OMS.getMessagingAccessPoint("oms:rocketmq://alice@rocketmq.apache.org/us-east:default_space");
+ messagingAccessPoint.startup();
+ Producer producer = messagingAccessPoint.createProducer();
+ producer.startup();
+ producer.send(producer.createBytesMessage("HELLO_QUEUE", "HELLO_BODY".getBytes(Charset.forName("UTF-8"))));
+ | Modifier and Type | +Method and Description | +
|---|---|
KeyValue |
+attributes()
+Returns the attributes of this
+MessagingAccessPoint instance. |
+
Producer |
+createProducer()
+Creates a new
+Producer for the specified MessagingAccessPoint. |
+
Producer |
+createProducer(TransactionStateCheckListener transactionStateCheckListener)
+Creates a new transactional
+Producer for the specified MessagingAccessPoint, the producer is able
+ to respond to requests from the server to check the status of the transaction. |
+
PullConsumer |
+createPullConsumer()
+Creates a new
+PullConsumer for the specified MessagingAccessPoint. |
+
PullConsumer |
+createPullConsumer(KeyValue attributes)
+Creates a new
+PullConsumer for the specified MessagingAccessPoint. |
+
PushConsumer |
+createPushConsumer()
+Creates a new
+PushConsumer for the specified MessagingAccessPoint. |
+
PushConsumer |
+createPushConsumer(KeyValue attributes)
+Creates a new
+PushConsumer for the specified MessagingAccessPoint with some preset attributes. |
+
MessageFactory |
+messageFactory()
+Gets a
+MessageFactory instance from the specified MessagingAccessPoint. |
+
ResourceManager |
+resourceManager()
+Gets a lightweight
+ResourceManager instance from the specified MessagingAccessPoint. |
+
String |
+version()
+Returns the target OMS specification version of the specified vendor implementation.
+ |
+
String version()+
OMS.specVersionKeyValue attributes()+
MessagingAccessPoint instance.
+
+ There are some standard attributes defined by OMS for MessagingAccessPoint:
+
OMSBuiltinKeys.ACCESS_POINTS, the specified access points.
+ OMSBuiltinKeys.DRIVER_IMPL, the fully qualified class name of the specified MessagingAccessPoint's
+ implementation, the default value is io.openmessaging.<driver_type>.MessagingAccessPointImpl.
+ OMSBuiltinKeys.REGION, the region the resources reside in.
+ OMSBuiltinKeys.ACCOUNT_ID, the ID of the specific account system that owns the resource.
+ Producer createProducer()+
Producer for the specified MessagingAccessPoint.ProducerOMSRuntimeException - if the MessagingAccessPoint fails to handle this request due to some internal
+ errorOMSSecurityException - if have no authority to create a producer.Producer createProducer(TransactionStateCheckListener transactionStateCheckListener)+
Producer for the specified MessagingAccessPoint, the producer is able
+ to respond to requests from the server to check the status of the transaction.transactionStateCheckListener - transactional check listener TransactionStateCheckListenerProducerOMSRuntimeException - if the MessagingAccessPoint fails to handle this request due to some internal
+ errorOMSSecurityException - if have no authority to create a producer.PushConsumer createPushConsumer()+
PushConsumer for the specified MessagingAccessPoint.
+ The returned PushConsumer isn't attached to any queue,
+ uses PushConsumer.bindQueue(Collection, MessageListener) to attach queues.PushConsumerOMSRuntimeException - if the MessagingAccessPoint fails to handle this request
+ due to some internal errorPullConsumer createPullConsumer()+
PullConsumer for the specified MessagingAccessPoint.PullConsumerOMSRuntimeException - if the MessagingAccessPoint fails to handle this request
+ due to some internal errorPushConsumer createPushConsumer(KeyValue attributes)+
PushConsumer for the specified MessagingAccessPoint with some preset attributes.attributes - the preset attributesPushConsumerOMSRuntimeException - if the MessagingAccessPoint fails to handle this request
+ due to some internal errorPullConsumer createPullConsumer(KeyValue attributes)+
PullConsumer for the specified MessagingAccessPoint.PullConsumerOMSRuntimeException - if the MessagingAccessPoint fails to handle this request
+ due to some internal errorResourceManager resourceManager()+
ResourceManager instance from the specified MessagingAccessPoint.OMSRuntimeException - if the MessagingAccessPoint fails to handle this request due to some internal
+ errorOMSSecurityException - if have no authority to obtain a resource manager.MessageFactory messageFactory()+
MessageFactory instance from the specified MessagingAccessPoint.OMSRuntimeException - if the MessagingAccessPoint fails to handle this request due to some internal
+ errorCopyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/OMS.html b/io/openmessaging/OMS.html new file mode 100644 index 00000000..db94f9ed --- /dev/null +++ b/io/openmessaging/OMS.html @@ -0,0 +1,369 @@ + + + + + + +public final class OMS +extends Object+
MessagingAccessPoint from the specified OMS driver url
+ and some useful util methods.
+ + The complete OMS driver URL syntax is: +
+ oms:<driver_type>://[account_id@]host1[:port1][,host2[:port2],...[,hostN[:portN]]]/<region> +
+ The first part of the URL specifies which OMS implementation is to be used, rocketmq is a optional driver type. +
+ The brackets indicate that the extra access points are optional, and a correct OMS driver url needs at least one + access point, which consists of hostname and port, like localhost:8081.
ResourceManager| Modifier and Type | +Field and Description | +
|---|---|
static String |
+specVersion
+The version format is X.Y.Z (Major.Minor.Patch), a pre-release version may be denoted by appending a hyphen and a
+ series of dot-separated identifiers immediately following the patch version, like X.Y.Z-alpha.
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
static MessagingAccessPoint |
+getMessagingAccessPoint(String url)
+Returns a
+MessagingAccessPoint instance from the specified OMS driver url. |
+
static MessagingAccessPoint |
+getMessagingAccessPoint(String url,
+ KeyValue attributes)
+Returns a
+MessagingAccessPoint instance from the specified OMS driver url with some preset attributes,
+ which will be passed to MessagingAccessPoint's implementation class as a unique constructor parameter. |
+
static KeyValue |
+newKeyValue()
+Returns a default and internal
+KeyValue implementation instance. |
+
public static String specVersion+
+ OMS version follows semver scheme partially.
public static MessagingAccessPoint getMessagingAccessPoint(String url)+
MessagingAccessPoint instance from the specified OMS driver url.url - the specified OMS driver urlMessagingAccessPoint instanceOMSRuntimeException - if the factory fails to create a MessagingAccessPoint due to some driver url
+ some syntax error or internal error.public static MessagingAccessPoint getMessagingAccessPoint(String url, + KeyValue attributes)+
MessagingAccessPoint instance from the specified OMS driver url with some preset attributes,
+ which will be passed to MessagingAccessPoint's implementation class as a unique constructor parameter.
+
+ There are some standard attributes defined by OMS for this method, the same as MessagingAccessPoint.attributes() ()}url - the specified OMS driver urlMessagingAccessPoint instanceOMSRuntimeException - if the factory fails to create a MessagingAccessPoint due to some driver url
+ some syntax error or internal error.public static KeyValue newKeyValue()+
KeyValue implementation instance.KeyValue instanceCopyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/OMSBuiltinKeys.html b/io/openmessaging/OMSBuiltinKeys.html new file mode 100644 index 00000000..e17ad413 --- /dev/null +++ b/io/openmessaging/OMSBuiltinKeys.html @@ -0,0 +1,314 @@ + + + + + + +public interface OMSBuiltinKeys
+| Modifier and Type | +Field and Description | +
|---|---|
static String |
+ACCESS_POINTS
+The
+ACCESS_POINTS key shows the specified access points in OMS driver schema. |
+
static String |
+ACCOUNT_ID
+The
+ACCOUNT_ID key shows the specified account info in OMS driver schema. |
+
static String |
+ACCOUNT_KEY
+The
+ACCOUNT_KEY key shows the specified account key in OMS attribute. |
+
static String |
+DRIVER_IMPL
+The
+DRIVER_IMPL key represents the vendor implementation
+ entry of MessagingAccessPoint. |
+
static String |
+REGION
+The
+REGION key shows the specified region in OMS driver schema. |
+
static final String DRIVER_IMPL+
DRIVER_IMPL key represents the vendor implementation
+ entry of MessagingAccessPoint.static final String ACCESS_POINTS+
ACCESS_POINTS key shows the specified access points in OMS driver schema.static final String ACCOUNT_ID+
ACCOUNT_ID key shows the specified account info in OMS driver schema.static final String ACCOUNT_KEY+
ACCOUNT_KEY key shows the specified account key in OMS attribute.static final String REGION+
REGION key shows the specified region in OMS driver schema.Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/OMSResponseStatus.html b/io/openmessaging/OMSResponseStatus.html new file mode 100644 index 00000000..50c4fa6c --- /dev/null +++ b/io/openmessaging/OMSResponseStatus.html @@ -0,0 +1,795 @@ + + + + + + +public enum OMSResponseStatus +extends Enum<OMSResponseStatus>+
+ 110x: The request was received, continuing process +
++ 120x: The request was successfully received, understood, and accepted +
++ 130x: Further action needs to be taken in order to complete the request +
++ 140x: The request contains bad syntax or cannot be fulfilled +
++ 150x: The server failed to fulfill an apparently valid request +
+
+ 1000x: OpenMessaging internal status code for create MessagingAccessPoint
+
| Enum Constant and Description | +
|---|
STATUS_10000 |
+
STATUS_10001 |
+
STATUS_10002 |
+
STATUS_10003 |
+
STATUS_1101 |
+
STATUS_1200 |
+
STATUS_1400 |
+
STATUS_1401 |
+
STATUS_1402 |
+
STATUS_1403 |
+
STATUS_1404 |
+
STATUS_1405 |
+
STATUS_1406 |
+
STATUS_1407 |
+
STATUS_1408 |
+
STATUS_1409 |
+
STATUS_1410 |
+
STATUS_1411 |
+
STATUS_1412 |
+
STATUS_1413 |
+
STATUS_1414 |
+
STATUS_1415 |
+
STATUS_1416 |
+
STATUS_1417 |
+
STATUS_1418 |
+
STATUS_1500 |
+
STATUS_1501 |
+
STATUS_1502 |
+
STATUS_1503 |
+
STATUS_1504 |
+
| Modifier and Type | +Method and Description | +
|---|---|
static OMSRuntimeException |
+generateException(int statusCode,
+ String reasonPhrase) |
+
static OMSRuntimeException |
+generateException(OMSResponseStatus status) |
+
static OMSRuntimeException |
+generateException(OMSResponseStatus status,
+ String... messageArgs) |
+
static String |
+generateReasonLocation(int statusCode,
+ String reasonPhrase) |
+
String |
+getMore() |
+
String |
+getReasonPhrase() |
+
int |
+getStatusCode() |
+
static OMSResponseStatus |
+valueOf(String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static OMSResponseStatus[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
public static final OMSResponseStatus STATUS_1101+
public static final OMSResponseStatus STATUS_1200+
public static final OMSResponseStatus STATUS_1400+
public static final OMSResponseStatus STATUS_1401+
public static final OMSResponseStatus STATUS_1402+
public static final OMSResponseStatus STATUS_1403+
public static final OMSResponseStatus STATUS_1404+
public static final OMSResponseStatus STATUS_1405+
public static final OMSResponseStatus STATUS_1406+
public static final OMSResponseStatus STATUS_1407+
public static final OMSResponseStatus STATUS_1408+
public static final OMSResponseStatus STATUS_1409+
public static final OMSResponseStatus STATUS_1410+
public static final OMSResponseStatus STATUS_1411+
public static final OMSResponseStatus STATUS_1412+
public static final OMSResponseStatus STATUS_1413+
public static final OMSResponseStatus STATUS_1414+
public static final OMSResponseStatus STATUS_1415+
public static final OMSResponseStatus STATUS_1416+
public static final OMSResponseStatus STATUS_1417+
public static final OMSResponseStatus STATUS_1418+
public static final OMSResponseStatus STATUS_1500+
public static final OMSResponseStatus STATUS_1501+
public static final OMSResponseStatus STATUS_1502+
public static final OMSResponseStatus STATUS_1503+
public static final OMSResponseStatus STATUS_1504+
public static final OMSResponseStatus STATUS_10000+
public static final OMSResponseStatus STATUS_10001+
public static final OMSResponseStatus STATUS_10002+
public static final OMSResponseStatus STATUS_10003+
public static OMSResponseStatus[] values()+
+for (OMSResponseStatus c : OMSResponseStatus.values()) + System.out.println(c); +
public static OMSResponseStatus valueOf(String name)+
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic int getStatusCode()+
public String getMore()+
public String getReasonPhrase()+
public static OMSRuntimeException generateException(OMSResponseStatus status, + String... messageArgs)+
public static OMSRuntimeException generateException(OMSResponseStatus status)+
public static OMSRuntimeException generateException(int statusCode, + String reasonPhrase)+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/Promise.html b/io/openmessaging/Promise.html new file mode 100644 index 00000000..2ddff19a --- /dev/null +++ b/io/openmessaging/Promise.html @@ -0,0 +1,312 @@ + + + + + + +public interface Promise<V> +extends Future<V>+
Future which is writable.
+
+ A Promise can be completed or canceled, cancellation is performed by the cancel method.
+ Once a computation has completed, the computation cannot be cancelled. If you would like to use a Promise
+ for the sake of cancellability but not provide a usable result, you can declare type+s of the form
+ Promise<?> and return null as a result of the underlying task.
| Modifier and Type | +Method and Description | +
|---|---|
boolean |
+cancel(boolean mayInterruptIfRunning)
+Attempts to cancel execution of this task.
+ |
+
boolean |
+set(V value)
+Set the value to this promise and mark it completed if set successfully.
+ |
+
boolean |
+setFailure(Throwable cause)
+Marks this promise as a failure and notifies all listeners.
+ |
+
addListener, get, get, getThrowable, isCancelled, isDoneboolean cancel(boolean mayInterruptIfRunning)+
cancel is called, this task should never run. If the task has already started, then the mayInterruptIfRunning parameter determines whether the thread executing this task should be interrupted in an
+ attempt to stop the task.
+
+ After this method returns, subsequent calls to Future.isDone() will always return true. Subsequent calls
+ to Future.isCancelled() will always return true if this method returned true.
cancel in interface Future<V>mayInterruptIfRunning - true if the thread executing this task should be interrupted; otherwise,
+ in-progress tasks are allowed to completefalse if the task could not be cancelled, typically because it has already completed normally;
+ true otherwiseboolean set(V value)+
value - Valueboolean setFailure(Throwable cause)+
cause - the causeCopyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/ServiceLifeState.html b/io/openmessaging/ServiceLifeState.html new file mode 100644 index 00000000..390648a1 --- /dev/null +++ b/io/openmessaging/ServiceLifeState.html @@ -0,0 +1,401 @@ + + + + + + +public enum ServiceLifeState +extends Enum<ServiceLifeState>+
| Enum Constant and Description | +
|---|
INITIALIZED
+Service has been initialized.
+ |
+
STARTED
+Service in running.
+ |
+
STARTING
+Service in starting.
+ |
+
STOPPED
+Service has been stopped.
+ |
+
STOPPING
+Service is stopping.
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
static ServiceLifeState |
+valueOf(String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static ServiceLifeState[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
public static final ServiceLifeState INITIALIZED+
public static final ServiceLifeState STARTING+
public static final ServiceLifeState STARTED+
public static final ServiceLifeState STOPPING+
public static final ServiceLifeState STOPPED+
public static ServiceLifeState[] values()+
+for (ServiceLifeState c : ServiceLifeState.values()) + System.out.println(c); +
public static ServiceLifeState valueOf(String name)+
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/ServiceLifecycle.html b/io/openmessaging/ServiceLifecycle.html new file mode 100644 index 00000000..0f98ea60 --- /dev/null +++ b/io/openmessaging/ServiceLifecycle.html @@ -0,0 +1,293 @@ + + + + + + +public interface ServiceLifecycle +extends Extension+
ServiceLifecycle defines a lifecycle interface for a OMS related service endpoint, like Producer,
+ Consumer, and so on.
+
+ If the service endpoint class implements the ServiceLifecycle interface, most of the containers can manage
+ the lifecycle of the corresponding service endpoint objects easily.
+
+ Any service endpoint should support repeated restart if it implements the ServiceLifecycle interface.
| Modifier and Type | +Method and Description | +
|---|---|
ServiceLifeState |
+currentState()
+Used for get service current state, for execution of some operations is dependent on the current service state.
+ |
+
void |
+start()
+Used for startup or initialization of a service endpoint.
+ |
+
void |
+stop()
+Notify a service instance of the end of its life cycle.
+ |
+
getQueueMetaDatavoid start()+
void stop()+
ServiceLifeState currentState()+
ServiceLifeStateCopyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/annotation/Optional.html b/io/openmessaging/annotation/Optional.html new file mode 100644 index 00000000..4f1ba585 --- /dev/null +++ b/io/openmessaging/annotation/Optional.html @@ -0,0 +1,183 @@ + + + + + + +@Documented + @Retention(value=RUNTIME) + @Target(value={PACKAGE,TYPE,FIELD,METHOD,PARAMETER,LOCAL_VARIABLE}) +public @interface Optional+
+ A Optional is an annotation to mark some certain methods ,interfaces and etc. this annotation represented
+ these methods or interfaces are not mandatory in OpenMessaging.
+
+ If these methods or interfaces adopted by more and more vendors and end users, they may be become the mandatory + interface in the future. Of course, if they are used very little, they may be removed. +
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/annotation/class-use/Optional.html b/io/openmessaging/annotation/class-use/Optional.html new file mode 100644 index 00000000..42dc598f --- /dev/null +++ b/io/openmessaging/annotation/class-use/Optional.html @@ -0,0 +1,271 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging | ++ |
| io.openmessaging.consumer | ++ |
| io.openmessaging.extension | ++ |
| io.openmessaging.message | ++ |
| Modifier and Type | +Method and Description | +
|---|---|
Optional<Extension> |
+Client.getExtension()
+Get the extension method, and this interface is optional, Therefore, users need to check whether this interface
+ has been implemented by vendors.
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
List<Message> |
+PullConsumer.batchReceive(String queueName,
+ QueueMetaData queueMetaData,
+ MessageReceipt messageReceipt,
+ long timeout)
+Receive message in asynchronous way.
+ |
+
Message |
+PullConsumer.receive(String queueName,
+ QueueMetaData queueMetaData,
+ MessageReceipt messageReceipt,
+ long timeout)
+Receives the next message from the which bind queue,partition and receiptId of this consumer in pull model.
+ |
+
| Modifier and Type | +Interface and Description | +
|---|---|
interface |
+Extension
+
+ This interface contains some methods are used for getting configurations related implementation.
+ |
+
interface |
+ExtensionHeader
+
+ The
+ExtensionHeader interface contains extended properties for common implementations in current messaging
+ and streaming field, such as the queue-based partitioning implementation, but the related properties in this
+ interface are not mandatory. |
+
interface |
+QueueMetaData
+This interface
+QueueMetaData contains methods are used for getting configurations related some certain
+ implementation. |
+
| Modifier and Type | +Method and Description | +
|---|---|
ExtensionHeader |
+Message.extensionHeader()
+This interface is optional, Therefore, users need to check whether the interface is implemented and the
+ correctness of its implementation.
+ |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/annotation/package-frame.html b/io/openmessaging/annotation/package-frame.html new file mode 100644 index 00000000..b7101be4 --- /dev/null +++ b/io/openmessaging/annotation/package-frame.html @@ -0,0 +1,21 @@ + + + + + + +| Annotation Type | +Description | +
|---|---|
| Optional | +
+
+ A
+Optional is an annotation to mark some certain methods ,interfaces and etc. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/annotation/package-tree.html b/io/openmessaging/annotation/package-tree.html new file mode 100644 index 00000000..10405f32 --- /dev/null +++ b/io/openmessaging/annotation/package-tree.html @@ -0,0 +1,135 @@ + + + + + + +Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/annotation/package-use.html b/io/openmessaging/annotation/package-use.html new file mode 100644 index 00000000..f4ccaee6 --- /dev/null +++ b/io/openmessaging/annotation/package-use.html @@ -0,0 +1,228 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging | ++ |
| io.openmessaging.consumer | ++ |
| io.openmessaging.extension | ++ |
| io.openmessaging.message | ++ |
| Class and Description | +
|---|
| Optional
+
+ A
+Optional is an annotation to mark some certain methods ,interfaces and etc. |
+
| Class and Description | +
|---|
| Optional
+
+ A
+Optional is an annotation to mark some certain methods ,interfaces and etc. |
+
| Class and Description | +
|---|
| Optional
+
+ A
+Optional is an annotation to mark some certain methods ,interfaces and etc. |
+
| Class and Description | +
|---|
| Optional
+
+ A
+Optional is an annotation to mark some certain methods ,interfaces and etc. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/class-use/Client.html b/io/openmessaging/class-use/Client.html new file mode 100644 index 00000000..15f4e6b7 --- /dev/null +++ b/io/openmessaging/class-use/Client.html @@ -0,0 +1,206 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging.consumer | ++ |
| io.openmessaging.producer | ++ |
| Modifier and Type | +Interface and Description | +
|---|---|
interface |
+Consumer
+A
+PushConsumer receives messages from multiple queues, these messages are pushed from MOM server to Consumer client. |
+
interface |
+PullConsumer
+A
+PullConsumer pulls messages from the specified queue, and supports submit the consume result by
+ acknowledgement. |
+
interface |
+PushConsumer
+A
+PushConsumer receives messages from multiple queues, these messages are pushed from
+ MOM server to PushConsumer client. |
+
| Modifier and Type | +Interface and Description | +
|---|---|
interface |
+Producer
+A
+Producer is a simple object used to send messages on behalf of a MessagingAccessPoint. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/class-use/Future.html b/io/openmessaging/class-use/Future.html new file mode 100644 index 00000000..3cb971fe --- /dev/null +++ b/io/openmessaging/class-use/Future.html @@ -0,0 +1,213 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging | ++ |
| io.openmessaging.producer | ++ |
| Modifier and Type | +Interface and Description | +
|---|---|
interface |
+Promise<V>
+Special
+Future which is writable. |
+
| Modifier and Type | +Method and Description | +
|---|---|
void |
+FutureListener.operationComplete(Future<V> future)
+Invoked when the operation completes, be the associated
+Promise successful or not. |
+
| Modifier and Type | +Method and Description | +
|---|---|
Future<SendResult> |
+Producer.sendAsync(List<Message> messages)
+Send messages to the specified destination asynchronously, the destination should be preset to
+Message.header(), other header fields as well. |
+
Future<SendResult> |
+Producer.sendAsync(Message message)
+Sends a message to the specified destination asynchronously, the destination should be preset to
+Message.header(), other header fields as well. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/class-use/FutureListener.html b/io/openmessaging/class-use/FutureListener.html new file mode 100644 index 00000000..3454da71 --- /dev/null +++ b/io/openmessaging/class-use/FutureListener.html @@ -0,0 +1,168 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging | ++ |
| Modifier and Type | +Method and Description | +
|---|---|
void |
+Future.addListener(FutureListener<V> listener)
+Adds the specified listener to this future.
+ |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/class-use/KeyValue.html b/io/openmessaging/class-use/KeyValue.html new file mode 100644 index 00000000..e2f12249 --- /dev/null +++ b/io/openmessaging/class-use/KeyValue.html @@ -0,0 +1,293 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging | ++ |
| io.openmessaging.interceptor | ++ |
| io.openmessaging.message | ++ |
| Modifier and Type | +Method and Description | +
|---|---|
KeyValue |
+MessagingAccessPoint.attributes()
+Returns the attributes of this
+MessagingAccessPoint instance. |
+
static KeyValue |
+OMS.newKeyValue()
+Returns a default and internal
+KeyValue implementation instance. |
+
KeyValue |
+KeyValue.put(String key,
+ boolean value)
+Inserts or replaces
+boolean value for the specified key. |
+
KeyValue |
+KeyValue.put(String key,
+ double value)
+Inserts or replaces
+double value for the specified key. |
+
KeyValue |
+KeyValue.put(String key,
+ int value)
+Inserts or replaces
+int value for the specified key. |
+
KeyValue |
+KeyValue.put(String key,
+ long value)
+Inserts or replaces
+long value for the specified key. |
+
KeyValue |
+KeyValue.put(String key,
+ short value)
+Inserts or replaces
+short value for the specified key. |
+
KeyValue |
+KeyValue.put(String key,
+ String value)
+Inserts or replaces
+String value for the specified key. |
+
| Modifier and Type | +Method and Description | +
|---|---|
PullConsumer |
+MessagingAccessPoint.createPullConsumer(KeyValue attributes)
+Creates a new
+PullConsumer for the specified MessagingAccessPoint. |
+
PushConsumer |
+MessagingAccessPoint.createPushConsumer(KeyValue attributes)
+Creates a new
+PushConsumer for the specified MessagingAccessPoint with some preset attributes. |
+
static MessagingAccessPoint |
+OMS.getMessagingAccessPoint(String url,
+ KeyValue attributes)
+Returns a
+MessagingAccessPoint instance from the specified OMS driver url with some preset attributes,
+ which will be passed to MessagingAccessPoint's implementation class as a unique constructor parameter. |
+
| Modifier and Type | +Method and Description | +
|---|---|
KeyValue |
+Context.attributes()
+Returns the attributes of this
+Context instance. |
+
| Modifier and Type | +Method and Description | +
|---|---|
KeyValue |
+Message.properties()
+Returns all the customized user header fields of the
+Message object as a KeyValue. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/class-use/MessagingAccessPoint.html b/io/openmessaging/class-use/MessagingAccessPoint.html new file mode 100644 index 00000000..f2130e7d --- /dev/null +++ b/io/openmessaging/class-use/MessagingAccessPoint.html @@ -0,0 +1,176 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging | ++ |
| Modifier and Type | +Method and Description | +
|---|---|
static MessagingAccessPoint |
+OMS.getMessagingAccessPoint(String url)
+Returns a
+MessagingAccessPoint instance from the specified OMS driver url. |
+
static MessagingAccessPoint |
+OMS.getMessagingAccessPoint(String url,
+ KeyValue attributes)
+Returns a
+MessagingAccessPoint instance from the specified OMS driver url with some preset attributes,
+ which will be passed to MessagingAccessPoint's implementation class as a unique constructor parameter. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/class-use/OMS.html b/io/openmessaging/class-use/OMS.html new file mode 100644 index 00000000..23a07488 --- /dev/null +++ b/io/openmessaging/class-use/OMS.html @@ -0,0 +1,126 @@ + + + + + + +Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/class-use/OMSBuiltinKeys.html b/io/openmessaging/class-use/OMSBuiltinKeys.html new file mode 100644 index 00000000..6e2c3b26 --- /dev/null +++ b/io/openmessaging/class-use/OMSBuiltinKeys.html @@ -0,0 +1,126 @@ + + + + + + +Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/class-use/OMSResponseStatus.html b/io/openmessaging/class-use/OMSResponseStatus.html new file mode 100644 index 00000000..de5f11fb --- /dev/null +++ b/io/openmessaging/class-use/OMSResponseStatus.html @@ -0,0 +1,193 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging | ++ |
| Modifier and Type | +Method and Description | +
|---|---|
static OMSResponseStatus |
+OMSResponseStatus.valueOf(String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static OMSResponseStatus[] |
+OMSResponseStatus.values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
static OMSRuntimeException |
+OMSResponseStatus.generateException(OMSResponseStatus status) |
+
static OMSRuntimeException |
+OMSResponseStatus.generateException(OMSResponseStatus status,
+ String... messageArgs) |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/class-use/Promise.html b/io/openmessaging/class-use/Promise.html new file mode 100644 index 00000000..c0a27c89 --- /dev/null +++ b/io/openmessaging/class-use/Promise.html @@ -0,0 +1,126 @@ + + + + + + +Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/class-use/ServiceLifeState.html b/io/openmessaging/class-use/ServiceLifeState.html new file mode 100644 index 00000000..82a99588 --- /dev/null +++ b/io/openmessaging/class-use/ServiceLifeState.html @@ -0,0 +1,181 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging | ++ |
| Modifier and Type | +Method and Description | +
|---|---|
ServiceLifeState |
+ServiceLifecycle.currentState()
+Used for get service current state, for execution of some operations is dependent on the current service state.
+ |
+
static ServiceLifeState |
+ServiceLifeState.valueOf(String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static ServiceLifeState[] |
+ServiceLifeState.values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/class-use/ServiceLifecycle.html b/io/openmessaging/class-use/ServiceLifecycle.html new file mode 100644 index 00000000..bf486a6f --- /dev/null +++ b/io/openmessaging/class-use/ServiceLifecycle.html @@ -0,0 +1,206 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging.consumer | ++ |
| io.openmessaging.producer | ++ |
| Modifier and Type | +Interface and Description | +
|---|---|
interface |
+Consumer
+A
+PushConsumer receives messages from multiple queues, these messages are pushed from MOM server to Consumer client. |
+
interface |
+PullConsumer
+A
+PullConsumer pulls messages from the specified queue, and supports submit the consume result by
+ acknowledgement. |
+
interface |
+PushConsumer
+A
+PushConsumer receives messages from multiple queues, these messages are pushed from
+ MOM server to PushConsumer client. |
+
| Modifier and Type | +Interface and Description | +
|---|---|
interface |
+Producer
+A
+Producer is a simple object used to send messages on behalf of a MessagingAccessPoint. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/consumer/BatchMessageListener.Context.html b/io/openmessaging/consumer/BatchMessageListener.Context.html new file mode 100644 index 00000000..42b2c129 --- /dev/null +++ b/io/openmessaging/consumer/BatchMessageListener.Context.html @@ -0,0 +1,257 @@ + + + + + + +public static interface BatchMessageListener.Context
+| Modifier and Type | +Method and Description | +
|---|---|
void |
+ack()
+Acknowledges all messages in this batch, which is related to this
+MessageContext. |
+
void |
+success(MessageReceipt... messages)
+Acknowledges the specified and consumed message, which is related to this
+MessageContext. |
+
void success(MessageReceipt... messages)+
MessageContext.
+ + Messages that have been received but not acknowledged may be redelivered.
OMSRuntimeException - if the consumer fails to acknowledge the messages due to some internal error.void ack()+
MessageContext.
+ OMSRuntimeException - if the consumer fails to acknowledge the messages due to some internal error.Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/consumer/BatchMessageListener.html b/io/openmessaging/consumer/BatchMessageListener.html new file mode 100644 index 00000000..17bf12d3 --- /dev/null +++ b/io/openmessaging/consumer/BatchMessageListener.html @@ -0,0 +1,261 @@ + + + + + + +public interface BatchMessageListener
+BatchMessageListener interface and register itself to a consumer
+ instance to asynchronously receive messages.| Modifier and Type | +Interface and Description | +
|---|---|
static interface |
+BatchMessageListener.Context |
+
| Modifier and Type | +Method and Description | +
|---|---|
void |
+onReceived(List<Message> batchMessage,
+ BatchMessageListener.Context context)
+Callback method to receive incoming messages.
+ |
+
void onReceived(List<Message> batchMessage, + BatchMessageListener.Context context)+
+ A message listener should handle different types of BatchMessage.
batchMessage - the received batchMessage.Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/consumer/Consumer.html b/io/openmessaging/consumer/Consumer.html new file mode 100644 index 00000000..831c5cec --- /dev/null +++ b/io/openmessaging/consumer/Consumer.html @@ -0,0 +1,331 @@ + + + + + + +public interface Consumer +extends ServiceLifecycle, Client+
PushConsumer receives messages from multiple queues, these messages are pushed from MOM server to Consumer client.| Modifier and Type | +Method and Description | +
|---|---|
void |
+ack(MessageReceipt receipt)
+Acknowledges the specified and consumed message with the unique message receipt handle, in the scenario of using
+ manual commit.
+ |
+
void |
+addInterceptor(ConsumerInterceptor interceptor)
+Adds a
+ConsumerInterceptor instance to this consumer. |
+
Set<String> |
+getBindQueues()
+This method is used to find out the collection of queues bind to
+Consumer. |
+
void |
+removeInterceptor(ConsumerInterceptor interceptor)
+Removes an interceptor from this consumer.
+ |
+
currentState, start, stopgetQueueMetaDatagetExtensionSet<String> getBindQueues()+
Consumer.void addInterceptor(ConsumerInterceptor interceptor)+
ConsumerInterceptor instance to this consumer.interceptor - an interceptor instance.void removeInterceptor(ConsumerInterceptor interceptor)+
interceptor - an interceptor to be removed.void ack(MessageReceipt receipt)+
+ Messages that have been received but not acknowledged may be redelivered.
receipt - the receipt handle associated with the consumed message.Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/consumer/MessageListener.Context.html b/io/openmessaging/consumer/MessageListener.Context.html new file mode 100644 index 00000000..7b5ac246 --- /dev/null +++ b/io/openmessaging/consumer/MessageListener.Context.html @@ -0,0 +1,236 @@ + + + + + + +public static interface MessageListener.Context
+| Modifier and Type | +Method and Description | +
|---|---|
void |
+ack()
+Acknowledges the specified and consumed message, which is related to this
+MessageContext. |
+
void ack()+
MessageContext.
+ + Messages that have been received but not acknowledged may be redelivered.
OMSRuntimeException - if the consumer fails to acknowledge the messages due to some internal error.Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/consumer/MessageListener.html b/io/openmessaging/consumer/MessageListener.html new file mode 100644 index 00000000..66706383 --- /dev/null +++ b/io/openmessaging/consumer/MessageListener.html @@ -0,0 +1,262 @@ + + + + + + +public interface MessageListener
+MessageListener interface and register itself to a consumer instance
+ to asynchronously receive messages.| Modifier and Type | +Interface and Description | +
|---|---|
static interface |
+MessageListener.Context |
+
| Modifier and Type | +Method and Description | +
|---|---|
void |
+onReceived(Message message,
+ MessageListener.Context context)
+Callback method to receive incoming messages.
+ |
+
void onReceived(Message message, + MessageListener.Context context)+
+ A message listener should handle different types of Message.
message - the received message object.context - the context delivered to the consume thread.Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/consumer/MessageReceipt.html b/io/openmessaging/consumer/MessageReceipt.html new file mode 100644 index 00000000..aef013d3 --- /dev/null +++ b/io/openmessaging/consumer/MessageReceipt.html @@ -0,0 +1,176 @@ + + + + + + +public interface MessageReceipt
+MessageReceipt is a Message with a Receipt.Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/consumer/PullConsumer.html b/io/openmessaging/consumer/PullConsumer.html new file mode 100644 index 00000000..30a01771 --- /dev/null +++ b/io/openmessaging/consumer/PullConsumer.html @@ -0,0 +1,488 @@ + + + + + + +public interface PullConsumer +extends Consumer+
PullConsumer pulls messages from the specified queue, and supports submit the consume result by
+ acknowledgement.MessagingAccessPoint.createPullConsumer()| Modifier and Type | +Method and Description | +
|---|---|
void |
+ack(MessageReceipt receiptHandle)
+Acknowledges the specified and consumed message with the unique message receipt handle.
+ |
+
List<Message> |
+batchReceive(long timeout)
+Receive message in asynchronous way.
+ |
+
List<Message> |
+batchReceive(String queueName,
+ QueueMetaData queueMetaData,
+ MessageReceipt messageReceipt,
+ long timeout)
+Receive message in asynchronous way.
+ |
+
void |
+bindQueue(Collection<String> queueNames)
+Bind the
+Consumer to a collection of queue in pull model, user can use receive(long)
+ to get messages from a collection of queue. |
+
Message |
+receive()
+Receives the next message from the attached queues of this consumer.
+ |
+
Message |
+receive(long timeout)
+Receives the next message from the bind queues of this consumer in pull model.
+ |
+
Message |
+receive(String queueName,
+ QueueMetaData queueMetaData,
+ MessageReceipt messageReceipt,
+ long timeout)
+Receives the next message from the which bind queue,partition and receiptId of this consumer in pull model.
+ |
+
void |
+unbindQueue(Collection<String> queueNames)
+Unbind the
+Consumer from a collection of queues. |
+
addInterceptor, getBindQueues, removeInterceptorcurrentState, start, stopgetQueueMetaDatagetExtensionvoid bindQueue(Collection<String> queueNames)+
Consumer to a collection of queue in pull model, user can use receive(long)
+ to get messages from a collection of queue.
+ queueNames - a collection of queues.OMSSecurityException - when have no authority to bind to this queue.OMSDestinationException - when have no given destination in the server.OMSRuntimeException - when the Producer fails to send the message due to some internal error.void unbindQueue(Collection<String> queueNames)+
Consumer from a collection of queues.
+ + After the success call, this consumer won't receive new message from the specified queue any more.
queueNames - a collection of queues.Message receive()+
+ This call blocks indefinitely until a message is arrives, the timeout expires, or until this PullConsumer
+ is shut down.
OMSRuntimeException - if the consumer fails to pull the next message due to some internal error.Message receive(long timeout)+
+ This call blocks indefinitely until a message is arrives, the timeout expires, or until this PullConsumer
+ is shut down.
timeout - receive message will blocked at most timeout milliseconds.OMSSecurityException - when have no authority to receive messages from this queue.OMSTimeOutException - when the given timeout elapses before the send operation completes.OMSRuntimeException - when the Producer fails to send the message due to some internal error.@Optional +Message receive(String queueName, + QueueMetaData queueMetaData, + MessageReceipt messageReceipt, + long timeout)+
+ This call blocks indefinitely until a message is arrives, the timeout expires, or until this PullConsumer
+ is shut down.
queueName - receive message from which queueName in Message Queue.queueMetaData - receive message from which partition in Message Queue.messageReceipt - receive message from which receipt position in Message Queue.timeout - receive message will blocked at most timeout milliseconds.OMSSecurityException - when have no authority to receive messages from this queue.OMSTimeOutException - when the given timeout elapses before the send operation completes.OMSRuntimeException - when the Producer fails to send the message due to some internal error.List<Message> batchReceive(long timeout)+
MessageListener.
+ timeout - receive messages will blocked at most timeout milliseconds.OMSSecurityException - when have no authority to receive messages from this queue.OMSTimeOutException - when the given timeout elapses before the send operation completes.OMSRuntimeException - when the Producer fails to send the message due to some internal error.@Optional +List<Message> batchReceive(String queueName, + QueueMetaData queueMetaData, + MessageReceipt messageReceipt, + long timeout)+
MessageListener.
+ queueName - receive message from which queueName in Message Queue.queueMetaData - receive message from which partition in Message Queue.messageReceipt - receive message from which receipt position in Message Queue.timeout - receive messages will blocked at most timeout milliseconds.OMSSecurityException - when have no authority to receive messages from this queue.OMSTimeOutException - when the given timeout elapses before the send operation completes.OMSRuntimeException - when the Producer fails to send the message due to some internal error.void ack(MessageReceipt receiptHandle)+
+ Messages that have been received but not acknowledged may be redelivered.
ack in interface ConsumerreceiptHandle - the receipt handle associated with the consumed messageOMSRuntimeException - if the consumer fails to acknowledge the messages due to some internal error.Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/consumer/PushConsumer.html b/io/openmessaging/consumer/PushConsumer.html new file mode 100644 index 00000000..1767d611 --- /dev/null +++ b/io/openmessaging/consumer/PushConsumer.html @@ -0,0 +1,435 @@ + + + + + + +public interface PushConsumer +extends Consumer+
PushConsumer receives messages from multiple queues, these messages are pushed from
+ MOM server to PushConsumer client.MessagingAccessPoint.createPushConsumer()| Modifier and Type | +Method and Description | +
|---|---|
void |
+bindQueue(Collection<String> queueNames,
+ BatchMessageListener listener)
+Bind the
+Consumer to a collection of queue, with a BatchMessageListener. |
+
void |
+bindQueue(Collection<String> queueNames,
+ MessageListener listener)
+Bind the
+Consumer to a collection of queue, with a MessageListener. |
+
boolean |
+isSuspended()
+This method is used to find out whether the
+Consumer in push model is suspended. |
+
void |
+resume()
+Resumes the
+Consumer in push model after a suspend. |
+
void |
+suspend()
+Suspends the
+Consumer in push model for later resumption. |
+
void |
+suspend(long timeout)
+Suspends the
+Consumer in push model for later resumption. |
+
void |
+unbindQueue(Collection<String> queueNames)
+Unbind the
+Consumer from a collection of queues. |
+
ack, addInterceptor, getBindQueues, removeInterceptorcurrentState, start, stopgetQueueMetaDatagetExtensionvoid resume()+
Consumer in push model after a suspend.
+
+ This method resumes the Consumer instance after it was suspended. The instance will not receive new
+ messages between the suspend and resume calls.
OMSRuntimeException - if the instance has not been suspended.suspend()void suspend()+
Consumer in push model for later resumption.
+ + This method suspends the consumer until it is resumed. The consumer will not receive new messages between the + suspend and resume calls. +
+ This method behaves exactly as if it simply performs the call suspend(0).
OMSRuntimeException - if the instance is not currently running.resume()void suspend(long timeout)+
Consumer in push model for later resumption.
+ + This method suspends the consumer until it is resumed or a specified amount of time has elapsed. The consumer + will not receive new messages during the suspended state. +
+ This method is similar to the suspend() method, but it allows finer control over the amount of time to
+ suspend, and the consumer will be suspended until it is resumed if the timeout is zero.
timeout - the maximum time to suspend in milliseconds.OMSRuntimeException - if the instance is not currently running.boolean isSuspended()+
Consumer in push model is suspended.Consumer is suspended, false otherwise.void bindQueue(Collection<String> queueNames, + MessageListener listener)+
Consumer to a collection of queue, with a MessageListener.
+
+ MessageListener.onReceived(Message, MessageListener.Context) will be called when new delivered message is
+ coming.
queueNames - a collection of queues.listener - a specified listener to receive new message.OMSSecurityException - when have no authority to bind to this queue.OMSDestinationException - when have no given destination in the server.OMSRuntimeException - when the Producer fails to send the message due to some internal error.void bindQueue(Collection<String> queueNames, + BatchMessageListener listener)+
Consumer to a collection of queue, with a BatchMessageListener.
+
+ BatchMessageListener.onReceived(List, BatchMessageListener.Context) will be called when new delivered
+ messages is coming.
queueNames - a collection of queues.listener - a specified listener to receive new messages.OMSSecurityException - when have no authority to bind to this queue.OMSDestinationException - when have no given destination in the server.OMSRuntimeException - when the Producer fails to send the message due to some internal error.void unbindQueue(Collection<String> queueNames)+
Consumer from a collection of queues.
+ + After the success call, this consumer won't receive new message from the specified queue any more.
queueNames - a collection of queues.Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/consumer/class-use/BatchMessageListener.Context.html b/io/openmessaging/consumer/class-use/BatchMessageListener.Context.html new file mode 100644 index 00000000..15581af1 --- /dev/null +++ b/io/openmessaging/consumer/class-use/BatchMessageListener.Context.html @@ -0,0 +1,169 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging.consumer | ++ |
| Modifier and Type | +Method and Description | +
|---|---|
void |
+BatchMessageListener.onReceived(List<Message> batchMessage,
+ BatchMessageListener.Context context)
+Callback method to receive incoming messages.
+ |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/consumer/class-use/BatchMessageListener.html b/io/openmessaging/consumer/class-use/BatchMessageListener.html new file mode 100644 index 00000000..e1b2f8cc --- /dev/null +++ b/io/openmessaging/consumer/class-use/BatchMessageListener.html @@ -0,0 +1,169 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging.consumer | ++ |
| Modifier and Type | +Method and Description | +
|---|---|
void |
+PushConsumer.bindQueue(Collection<String> queueNames,
+ BatchMessageListener listener)
+Bind the
+Consumer to a collection of queue, with a BatchMessageListener. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/consumer/class-use/Consumer.html b/io/openmessaging/consumer/class-use/Consumer.html new file mode 100644 index 00000000..53e0dc93 --- /dev/null +++ b/io/openmessaging/consumer/class-use/Consumer.html @@ -0,0 +1,176 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging.consumer | ++ |
| Modifier and Type | +Interface and Description | +
|---|---|
interface |
+PullConsumer
+A
+PullConsumer pulls messages from the specified queue, and supports submit the consume result by
+ acknowledgement. |
+
interface |
+PushConsumer
+A
+PushConsumer receives messages from multiple queues, these messages are pushed from
+ MOM server to PushConsumer client. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/consumer/class-use/MessageListener.Context.html b/io/openmessaging/consumer/class-use/MessageListener.Context.html new file mode 100644 index 00000000..5cfdb8a8 --- /dev/null +++ b/io/openmessaging/consumer/class-use/MessageListener.Context.html @@ -0,0 +1,169 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging.consumer | ++ |
| Modifier and Type | +Method and Description | +
|---|---|
void |
+MessageListener.onReceived(Message message,
+ MessageListener.Context context)
+Callback method to receive incoming messages.
+ |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/consumer/class-use/MessageListener.html b/io/openmessaging/consumer/class-use/MessageListener.html new file mode 100644 index 00000000..b12a8599 --- /dev/null +++ b/io/openmessaging/consumer/class-use/MessageListener.html @@ -0,0 +1,169 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging.consumer | ++ |
| Modifier and Type | +Method and Description | +
|---|---|
void |
+PushConsumer.bindQueue(Collection<String> queueNames,
+ MessageListener listener)
+Bind the
+Consumer to a collection of queue, with a MessageListener. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/consumer/class-use/MessageReceipt.html b/io/openmessaging/consumer/class-use/MessageReceipt.html new file mode 100644 index 00000000..f0903903 --- /dev/null +++ b/io/openmessaging/consumer/class-use/MessageReceipt.html @@ -0,0 +1,223 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging.consumer | ++ |
| io.openmessaging.message | ++ |
| Modifier and Type | +Method and Description | +
|---|---|
void |
+PullConsumer.ack(MessageReceipt receiptHandle)
+Acknowledges the specified and consumed message with the unique message receipt handle.
+ |
+
void |
+Consumer.ack(MessageReceipt receipt)
+Acknowledges the specified and consumed message with the unique message receipt handle, in the scenario of using
+ manual commit.
+ |
+
List<Message> |
+PullConsumer.batchReceive(String queueName,
+ QueueMetaData queueMetaData,
+ MessageReceipt messageReceipt,
+ long timeout)
+Receive message in asynchronous way.
+ |
+
Message |
+PullConsumer.receive(String queueName,
+ QueueMetaData queueMetaData,
+ MessageReceipt messageReceipt,
+ long timeout)
+Receives the next message from the which bind queue,partition and receiptId of this consumer in pull model.
+ |
+
void |
+BatchMessageListener.Context.success(MessageReceipt... messages)
+Acknowledges the specified and consumed message, which is related to this
+MessageContext. |
+
| Modifier and Type | +Method and Description | +
|---|---|
MessageReceipt |
+Message.getMessageReceipt()
+Get the
+MessageReceipt of this Message, which will be used to acknowledge this message. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/consumer/class-use/PullConsumer.html b/io/openmessaging/consumer/class-use/PullConsumer.html new file mode 100644 index 00000000..6afc0a15 --- /dev/null +++ b/io/openmessaging/consumer/class-use/PullConsumer.html @@ -0,0 +1,174 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging | ++ |
| Modifier and Type | +Method and Description | +
|---|---|
PullConsumer |
+MessagingAccessPoint.createPullConsumer()
+Creates a new
+PullConsumer for the specified MessagingAccessPoint. |
+
PullConsumer |
+MessagingAccessPoint.createPullConsumer(KeyValue attributes)
+Creates a new
+PullConsumer for the specified MessagingAccessPoint. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/consumer/class-use/PushConsumer.html b/io/openmessaging/consumer/class-use/PushConsumer.html new file mode 100644 index 00000000..bba26c23 --- /dev/null +++ b/io/openmessaging/consumer/class-use/PushConsumer.html @@ -0,0 +1,174 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging | ++ |
| Modifier and Type | +Method and Description | +
|---|---|
PushConsumer |
+MessagingAccessPoint.createPushConsumer()
+Creates a new
+PushConsumer for the specified MessagingAccessPoint. |
+
PushConsumer |
+MessagingAccessPoint.createPushConsumer(KeyValue attributes)
+Creates a new
+PushConsumer for the specified MessagingAccessPoint with some preset attributes. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/consumer/package-frame.html b/io/openmessaging/consumer/package-frame.html new file mode 100644 index 00000000..bf28bb7b --- /dev/null +++ b/io/openmessaging/consumer/package-frame.html @@ -0,0 +1,28 @@ + + + + + + +| Interface | +Description | +
|---|---|
| BatchMessageListener | +
+ A message listener can implement this
+BatchMessageListener interface and register itself to a consumer
+ instance to asynchronously receive messages. |
+
| BatchMessageListener.Context | ++ |
| Consumer | +
+ A
+PushConsumer receives messages from multiple queues, these messages are pushed from MOM server to Consumer client. |
+
| MessageListener | +
+ A message listener must implement this
+MessageListener interface and register itself to a consumer instance
+ to asynchronously receive messages. |
+
| MessageListener.Context | ++ |
| MessageReceipt | +
+ A
+MessageReceipt is a Message with a Receipt. |
+
| PullConsumer | +
+ A
+PullConsumer pulls messages from the specified queue, and supports submit the consume result by
+ acknowledgement. |
+
| PushConsumer | +
+ A
+PushConsumer receives messages from multiple queues, these messages are pushed from
+ MOM server to PushConsumer client. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/consumer/package-tree.html b/io/openmessaging/consumer/package-tree.html new file mode 100644 index 00000000..9bb64b2b --- /dev/null +++ b/io/openmessaging/consumer/package-tree.html @@ -0,0 +1,163 @@ + + + + + + +Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/consumer/package-use.html b/io/openmessaging/consumer/package-use.html new file mode 100644 index 00000000..b1d33472 --- /dev/null +++ b/io/openmessaging/consumer/package-use.html @@ -0,0 +1,233 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging | ++ |
| io.openmessaging.consumer | ++ |
| io.openmessaging.message | ++ |
| Class and Description | +
|---|
| PullConsumer
+ A
+PullConsumer pulls messages from the specified queue, and supports submit the consume result by
+ acknowledgement. |
+
| PushConsumer
+ A
+PushConsumer receives messages from multiple queues, these messages are pushed from
+ MOM server to PushConsumer client. |
+
| Class and Description | +
|---|
| BatchMessageListener
+ A message listener can implement this
+BatchMessageListener interface and register itself to a consumer
+ instance to asynchronously receive messages. |
+
| BatchMessageListener.Context | +
| Consumer
+ A
+PushConsumer receives messages from multiple queues, these messages are pushed from MOM server to Consumer client. |
+
| MessageListener
+ A message listener must implement this
+MessageListener interface and register itself to a consumer instance
+ to asynchronously receive messages. |
+
| MessageListener.Context | +
| MessageReceipt
+ A
+MessageReceipt is a Message with a Receipt. |
+
| Class and Description | +
|---|
| MessageReceipt
+ A
+MessageReceipt is a Message with a Receipt. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/exception/OMSDestinationException.html b/io/openmessaging/exception/OMSDestinationException.html new file mode 100644 index 00000000..651d1f2b --- /dev/null +++ b/io/openmessaging/exception/OMSDestinationException.html @@ -0,0 +1,331 @@ + + + + + + +public class OMSDestinationException +extends OMSRuntimeException+
OMSDestinationException must be thrown when the specified destination does not exist or the destination
+ is not readable or writable| Constructor and Description | +
|---|
OMSDestinationException(int errorCode,
+ String message) |
+
OMSDestinationException(int errorCode,
+ String message,
+ Throwable cause) |
+
OMSDestinationException(int errorCode,
+ Throwable cause) |
+
getErrorCodeaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic OMSDestinationException(int errorCode, + String message)+
OMSRuntimeException.OMSRuntimeException(int, String)public OMSDestinationException(int errorCode, + Throwable cause)+
OMSRuntimeException.OMSRuntimeException(int, Throwable)Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/exception/OMSMessageFormatException.html b/io/openmessaging/exception/OMSMessageFormatException.html new file mode 100644 index 00000000..173dde82 --- /dev/null +++ b/io/openmessaging/exception/OMSMessageFormatException.html @@ -0,0 +1,331 @@ + + + + + + +public class OMSMessageFormatException +extends OMSRuntimeException+
OMSMessageFormatException must be thrown when the provided message is not supported or the attributes are
+ the wrong type.| Constructor and Description | +
|---|
OMSMessageFormatException(int errorCode,
+ String message) |
+
OMSMessageFormatException(int errorCode,
+ String message,
+ Throwable cause) |
+
OMSMessageFormatException(int errorCode,
+ Throwable cause) |
+
getErrorCodeaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic OMSMessageFormatException(int errorCode, + String message)+
OMSRuntimeException.OMSRuntimeException(int, String)public OMSMessageFormatException(int errorCode, + Throwable cause)+
OMSRuntimeException.OMSRuntimeException(int, Throwable)Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/exception/OMSRuntimeException.html b/io/openmessaging/exception/OMSRuntimeException.html new file mode 100644 index 00000000..13a46373 --- /dev/null +++ b/io/openmessaging/exception/OMSRuntimeException.html @@ -0,0 +1,386 @@ + + + + + + +public class OMSRuntimeException +extends RuntimeException+
+ A OMSException consists of the following parts: +
| Constructor and Description | +
|---|
OMSRuntimeException(int errorCode,
+ String message)
+Constructs a
+OMSRuntimeException with the specified detail message
+ and error code. |
+
OMSRuntimeException(int errorCode,
+ String message,
+ Throwable cause)
+Constructs a
+OMSRuntimeException with the specified detail message,
+ error code and cause. |
+
OMSRuntimeException(int errorCode,
+ Throwable cause)
+Constructs a
+OMSRuntimeException with the specified error code and cause. |
+
| Modifier and Type | +Method and Description | +
|---|---|
int |
+getErrorCode()
+Returns the error code of this
+OMSRuntimeException object. |
+
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic OMSRuntimeException(int errorCode, + String message)+
OMSRuntimeException with the specified detail message
+ and error code.errorCode - a specified error codemessage - a description of the exceptionpublic OMSRuntimeException(int errorCode, + Throwable cause)+
OMSRuntimeException with the specified error code and cause.errorCode - a specified error codecause - the underlying cause of this exceptionpublic OMSRuntimeException(int errorCode, + String message, + Throwable cause)+
OMSRuntimeException with the specified detail message,
+ error code and cause.errorCode - a specified error codemessage - a description of the exceptioncause - the underlying cause of this exceptionCopyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/exception/OMSSecurityException.html b/io/openmessaging/exception/OMSSecurityException.html new file mode 100644 index 00000000..e5358f60 --- /dev/null +++ b/io/openmessaging/exception/OMSSecurityException.html @@ -0,0 +1,330 @@ + + + + + + +public class OMSSecurityException +extends OMSRuntimeException+
OMSSecurityException must be thrown when the client have no enough authority to operate an resource.| Constructor and Description | +
|---|
OMSSecurityException(int errorCode,
+ String message) |
+
OMSSecurityException(int errorCode,
+ String message,
+ Throwable cause) |
+
OMSSecurityException(int errorCode,
+ Throwable cause) |
+
getErrorCodeaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic OMSSecurityException(int errorCode, + String message)+
OMSRuntimeException.OMSRuntimeException(int, String)public OMSSecurityException(int errorCode, + Throwable cause)+
OMSRuntimeException.OMSRuntimeException(int, Throwable)Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/exception/OMSTimeOutException.html b/io/openmessaging/exception/OMSTimeOutException.html new file mode 100644 index 00000000..079a8932 --- /dev/null +++ b/io/openmessaging/exception/OMSTimeOutException.html @@ -0,0 +1,332 @@ + + + + + + +public class OMSTimeOutException +extends OMSRuntimeException+
OMSTimeOutException must be thrown when a blocking operation times out.
+ + Blocking operations for which a timeout is specified need a means to indicate that the timeout has occurred.
| Constructor and Description | +
|---|
OMSTimeOutException(int errorCode,
+ String message) |
+
OMSTimeOutException(int errorCode,
+ String message,
+ Throwable cause) |
+
OMSTimeOutException(int errorCode,
+ Throwable cause) |
+
getErrorCodeaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic OMSTimeOutException(int errorCode, + String message)+
OMSRuntimeException.OMSRuntimeException(int, String)public OMSTimeOutException(int errorCode, + Throwable cause)+
OMSRuntimeException.OMSRuntimeException(int, Throwable)Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/exception/OMSTransactionException.html b/io/openmessaging/exception/OMSTransactionException.html new file mode 100644 index 00000000..55987976 --- /dev/null +++ b/io/openmessaging/exception/OMSTransactionException.html @@ -0,0 +1,330 @@ + + + + + + +public class OMSTransactionException +extends OMSRuntimeException+
OMSTransactionException must be thrown when the client execute a transaction error.| Constructor and Description | +
|---|
OMSTransactionException(int errorCode,
+ String message) |
+
OMSTransactionException(int errorCode,
+ String message,
+ Throwable cause) |
+
OMSTransactionException(int errorCode,
+ Throwable cause) |
+
getErrorCodeaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic OMSTransactionException(int errorCode, + String message)+
OMSRuntimeException.OMSRuntimeException(int, String)public OMSTransactionException(int errorCode, + Throwable cause)+
OMSRuntimeException.OMSRuntimeException(int, Throwable)Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/exception/OMSUnsupportException.html b/io/openmessaging/exception/OMSUnsupportException.html new file mode 100644 index 00000000..c84f8654 --- /dev/null +++ b/io/openmessaging/exception/OMSUnsupportException.html @@ -0,0 +1,331 @@ + + + + + + +public class OMSUnsupportException +extends OMSRuntimeException+
OMSUnsupportException must be thrown when the specified methods, headers or properties have not been
+ provided by vendors, these methods or headers are usually marked by Optional.| Constructor and Description | +
|---|
OMSUnsupportException(int errorCode,
+ String message) |
+
OMSUnsupportException(int errorCode,
+ String message,
+ Throwable cause) |
+
OMSUnsupportException(int errorCode,
+ Throwable cause) |
+
getErrorCodeaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic OMSUnsupportException(int errorCode, + String message)+
OMSUnsupportException(int, String)public OMSUnsupportException(int errorCode, + Throwable cause)+
OMSUnsupportException(int, Throwable)public OMSUnsupportException(int errorCode, + String message, + Throwable cause)+
OMSUnsupportException(int, String, Throwable)Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/exception/class-use/OMSDestinationException.html b/io/openmessaging/exception/class-use/OMSDestinationException.html new file mode 100644 index 00000000..552b6a70 --- /dev/null +++ b/io/openmessaging/exception/class-use/OMSDestinationException.html @@ -0,0 +1,126 @@ + + + + + + +Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/exception/class-use/OMSMessageFormatException.html b/io/openmessaging/exception/class-use/OMSMessageFormatException.html new file mode 100644 index 00000000..87620cd2 --- /dev/null +++ b/io/openmessaging/exception/class-use/OMSMessageFormatException.html @@ -0,0 +1,126 @@ + + + + + + +Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/exception/class-use/OMSRuntimeException.html b/io/openmessaging/exception/class-use/OMSRuntimeException.html new file mode 100644 index 00000000..5aac763e --- /dev/null +++ b/io/openmessaging/exception/class-use/OMSRuntimeException.html @@ -0,0 +1,233 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging | ++ |
| io.openmessaging.exception | ++ |
| Modifier and Type | +Method and Description | +
|---|---|
static OMSRuntimeException |
+OMSResponseStatus.generateException(int statusCode,
+ String reasonPhrase) |
+
static OMSRuntimeException |
+OMSResponseStatus.generateException(OMSResponseStatus status) |
+
static OMSRuntimeException |
+OMSResponseStatus.generateException(OMSResponseStatus status,
+ String... messageArgs) |
+
| Modifier and Type | +Class and Description | +
|---|---|
class |
+OMSDestinationException
+The
+OMSDestinationException must be thrown when the specified destination does not exist or the destination
+ is not readable or writable |
+
class |
+OMSMessageFormatException
+The
+OMSMessageFormatException must be thrown when the provided message is not supported or the attributes are
+ the wrong type. |
+
class |
+OMSSecurityException
+The
+OMSSecurityException must be thrown when the client have no enough authority to operate an resource. |
+
class |
+OMSTimeOutException
+The
+OMSTimeOutException must be thrown when a blocking operation times out. |
+
class |
+OMSTransactionException
+The
+OMSTransactionException must be thrown when the client execute a transaction error. |
+
class |
+OMSUnsupportException
+The
+OMSUnsupportException must be thrown when the specified methods, headers or properties have not been
+ provided by vendors, these methods or headers are usually marked by Optional. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/exception/class-use/OMSSecurityException.html b/io/openmessaging/exception/class-use/OMSSecurityException.html new file mode 100644 index 00000000..ae587f82 --- /dev/null +++ b/io/openmessaging/exception/class-use/OMSSecurityException.html @@ -0,0 +1,126 @@ + + + + + + +Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/exception/class-use/OMSTimeOutException.html b/io/openmessaging/exception/class-use/OMSTimeOutException.html new file mode 100644 index 00000000..fb3dc7f2 --- /dev/null +++ b/io/openmessaging/exception/class-use/OMSTimeOutException.html @@ -0,0 +1,126 @@ + + + + + + +Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/exception/class-use/OMSTransactionException.html b/io/openmessaging/exception/class-use/OMSTransactionException.html new file mode 100644 index 00000000..c58af49d --- /dev/null +++ b/io/openmessaging/exception/class-use/OMSTransactionException.html @@ -0,0 +1,126 @@ + + + + + + +Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/exception/class-use/OMSUnsupportException.html b/io/openmessaging/exception/class-use/OMSUnsupportException.html new file mode 100644 index 00000000..4cf68193 --- /dev/null +++ b/io/openmessaging/exception/class-use/OMSUnsupportException.html @@ -0,0 +1,126 @@ + + + + + + +Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/exception/package-frame.html b/io/openmessaging/exception/package-frame.html new file mode 100644 index 00000000..28efaeeb --- /dev/null +++ b/io/openmessaging/exception/package-frame.html @@ -0,0 +1,27 @@ + + + + + + +| Exception | +Description | +
|---|---|
| OMSDestinationException | +
+ The
+OMSDestinationException must be thrown when the specified destination does not exist or the destination
+ is not readable or writable |
+
| OMSMessageFormatException | +
+ The
+OMSMessageFormatException must be thrown when the provided message is not supported or the attributes are
+ the wrong type. |
+
| OMSRuntimeException | +
+ This is the root class of all unchecked exceptions in the OMS API.
+ |
+
| OMSSecurityException | +
+ The
+OMSSecurityException must be thrown when the client have no enough authority to operate an resource. |
+
| OMSTimeOutException | +
+ The
+OMSTimeOutException must be thrown when a blocking operation times out. |
+
| OMSTransactionException | +
+ The
+OMSTransactionException must be thrown when the client execute a transaction error. |
+
| OMSUnsupportException | +
+ The
+OMSUnsupportException must be thrown when the specified methods, headers or properties have not been
+ provided by vendors, these methods or headers are usually marked by Optional. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/exception/package-tree.html b/io/openmessaging/exception/package-tree.html new file mode 100644 index 00000000..808cac3d --- /dev/null +++ b/io/openmessaging/exception/package-tree.html @@ -0,0 +1,160 @@ + + + + + + +Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/exception/package-use.html b/io/openmessaging/exception/package-use.html new file mode 100644 index 00000000..6d75bbd0 --- /dev/null +++ b/io/openmessaging/exception/package-use.html @@ -0,0 +1,182 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging | ++ |
| io.openmessaging.exception | ++ |
| Class and Description | +
|---|
| OMSRuntimeException
+ This is the root class of all unchecked exceptions in the OMS API.
+ |
+
| Class and Description | +
|---|
| OMSRuntimeException
+ This is the root class of all unchecked exceptions in the OMS API.
+ |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/extension/Extension.html b/io/openmessaging/extension/Extension.html new file mode 100644 index 00000000..8e7fc546 --- /dev/null +++ b/io/openmessaging/extension/Extension.html @@ -0,0 +1,255 @@ + + + + + + +@Optional +public interface Extension+
+ This interface contains some methods are used for getting configurations related implementation. but this interface + are not mandatory. +
| Modifier and Type | +Method and Description | +
|---|---|
Set<QueueMetaData> |
+getQueueMetaData(String queueName)
+This method used for getting the related queue's meta data, and this method is optional, vendors may not provide
+ this method based on their implementation.
+ |
+
Set<QueueMetaData> getQueueMetaData(String queueName)+
queueName - Queue name, message destination.QueueMetaData Queue config in the serverOMSSecurityException - when have no authority to send messages to a given destination.OMSTimeOutException - when the given timeout elapses before the send operation completes.OMSDestinationException - when have no given destination in the server.OMSRuntimeException - when the Producer fails to send the message due to some internal error.Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/extension/ExtensionHeader.html b/io/openmessaging/extension/ExtensionHeader.html new file mode 100644 index 00000000..48b42f38 --- /dev/null +++ b/io/openmessaging/extension/ExtensionHeader.html @@ -0,0 +1,638 @@ + + + + + + +@Optional +public interface ExtensionHeader+
+ The ExtensionHeader interface contains extended properties for common implementations in current messaging
+ and streaming field, such as the queue-based partitioning implementation, but the related properties in this
+ interface are not mandatory.
+
| Modifier and Type | +Method and Description | +
|---|---|
String |
+getCorrelationId()
+
+ |
+
long |
+getDelayTime()
+
+ |
+
long |
+getExpireTime()
+
+ |
+
String |
+getMessageKey()
+
+ |
+
long |
+getOffset()
+This method will return the
+OFFSET in the partition to which the message belongs to, but the premise is
+ that the implementation of the server side is dependent on the partition or a queue-like storage mechanism. |
+
int |
+getPartiton()
+This method will return the partition of this message belongs.
+ |
+
String |
+getStoreHost()
+
+ |
+
long |
+getStoreTimestamp()
+
+ |
+
String |
+getTraceId()
+
+ |
+
String |
+getTransactionId()
+
+ |
+
ExtensionHeader |
+setCorrelationId(String correlationId)
+A client can use the
+CORRELATION_ID field to link one message with another. |
+
ExtensionHeader |
+setDelayTime(long delayTime)
+The
+DELAY_TIME header field contains a number that represents the delayed times in milliseconds. |
+
ExtensionHeader |
+setExpireTime(long expireTime)
+The
+EXPIRE_TIME header field contains the expiration time, it represents a time-to-live value. |
+
ExtensionHeader |
+setMessageKey(String messageKey)
+The
+messagekey header field contains the custom key of a message. |
+
ExtensionHeader |
+setOffset(long offset)
+This method is only called by the server.
+ |
+
ExtensionHeader |
+setPartition(int partition)
+The
+PARTITION in extension header field contains the partition of target destination which the message
+ is being sent. |
+
ExtensionHeader |
+setStoreHost(String storeHost)
+The
+STORE_HOST header field contains the store host info of a message in server side. |
+
ExtensionHeader |
+setStoreTimestamp(long storeTimestamp)
+The
+STORE_TIMESTAMP header field contains the store timestamp of a message in server side. |
+
ExtensionHeader |
+setTraceId(String traceId)
+The
+TRACE_ID header field contains the trace ID of a message, which represents a global and unique
+ identification, to associate key events in the whole lifecycle of a message, like sent by who, stored at where,
+ and received by who. |
+
ExtensionHeader |
+setTransactionId(String transactionId)
+This field
+TRANSACTION_ID is used in transactional message, and it can be used to trace a transaction. |
+
ExtensionHeader setPartition(int partition)+
PARTITION in extension header field contains the partition of target destination which the message
+ is being sent.
+
+
+ When a Message is set with this value, this message will be delivered to specified partition, but the
+ premise is that the implementation of the server side is dependent on the partition or a queue-like storage
+ mechanism.
+
partition - The specified partition will be sent to.ExtensionHeader setOffset(long offset)+
OFFSET represents this message offset in partition.
+ offset - The offset in the current partition, used to quickly get this message in the queueExtensionHeader setCorrelationId(String correlationId)+
CORRELATION_ID field to link one message with another. A typical use is to link a
+ response message with its request message.ExtensionHeader setTransactionId(String transactionId)+
TRANSACTION_ID is used in transactional message, and it can be used to trace a transaction.
+
+ So the same TRANSACTION_ID will be appeared not only in prepare message, but also in commit message, and
+ consumer received message also contains this field.ExtensionHeader setStoreTimestamp(long storeTimestamp)+
STORE_TIMESTAMP header field contains the store timestamp of a message in server side.
+ + When a message is sent, STORE_TIMESTAMP is ignored. +
+ When the send method returns it contains a server-assigned value. +
+ This filed is a long value, measured in milliseconds.
ExtensionHeader setStoreHost(String storeHost)+
STORE_HOST header field contains the store host info of a message in server side.
+ + When a message is sent, STORE_HOST is ignored. +
+ When the send method returns it contains a server-assigned value.
ExtensionHeader setMessageKey(String messageKey)+
messagekey header field contains the custom key of a message.
+ + This key is a customer identifier for a class of messages, and this key may be used for server to hash or + dispatch messages, or even can use this key to implement order message. +
ExtensionHeader setTraceId(String traceId)+
TRACE_ID header field contains the trace ID of a message, which represents a global and unique
+ identification, to associate key events in the whole lifecycle of a message, like sent by who, stored at where,
+ and received by who.
+
+ And, the messaging system only plays exchange role in a distributed system in most cases, so the TraceID can be
+ used to trace the whole call link with other parts in the whole system.ExtensionHeader setDelayTime(long delayTime)+
DELAY_TIME header field contains a number that represents the delayed times in milliseconds.
+
+ The message will be delivered after delayTime milliseconds starting from BORN_TIMESTAMP . When this filed
+ isn't set explicitly, this means this message should be delivered immediately.ExtensionHeader setExpireTime(long expireTime)+
EXPIRE_TIME header field contains the expiration time, it represents a time-to-live value.
+
+ The EXPIRE_TIME represents a relative valid interval that a message can be delivered in it. If the
+ EXPIRE_TIME field is specified as zero, that indicates the message does not expire.
+
+ When an undelivered message's expiration time is reached, the message should be destroyed. OMS does not define a + notification of message expiration. +
int getPartiton()+
PARTITION to which the message belongslong getOffset()+
OFFSET in the partition to which the message belongs to, but the premise is
+ that the implementation of the server side is dependent on the partition or a queue-like storage mechanism.String getCorrelationId()+ +
String getTransactionId()+ +
long getStoreTimestamp()+ +
String getStoreHost()+ +
long getDelayTime()+ +
long getExpireTime()+ +
String getMessageKey()+ +
String getTraceId()+ +
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/extension/QueueMetaData.html b/io/openmessaging/extension/QueueMetaData.html new file mode 100644 index 00000000..dd51cad6 --- /dev/null +++ b/io/openmessaging/extension/QueueMetaData.html @@ -0,0 +1,307 @@ + + + + + + +@Optional +public interface QueueMetaData+
QueueMetaData contains methods are used for getting configurations related some certain
+ implementation. but this interface are not mandatory.
+ + + In order to improve performance, in some scenarios where message persistence is required, some message middleware + will store messages on multiple partitions in multi servers. +
+ + In some scenarios, it is very useful to get the relevant partitions meta data for a queue.
| Modifier and Type | +Method and Description | +
|---|---|
int |
+partitionId()
+Get partition identifier of target queue.
+ |
+
String |
+queueName()
+Queue name
+ |
+
void |
+setPartitionId(int partitionId)
+Set the specified partition.
+ |
+
void |
+setQueueName(String queueName)
+Set queueName to this Message Queue.
+ |
+
void setQueueName(String queueName)+
queueName - void setPartitionId(int partitionId)+
partitionId - int partitionId()+
String queueName()+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/extension/class-use/Extension.html b/io/openmessaging/extension/class-use/Extension.html new file mode 100644 index 00000000..4abbfebe --- /dev/null +++ b/io/openmessaging/extension/class-use/Extension.html @@ -0,0 +1,247 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging | ++ |
| io.openmessaging.consumer | ++ |
| io.openmessaging.producer | ++ |
| Modifier and Type | +Interface and Description | +
|---|---|
interface |
+ServiceLifecycle
+
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
Optional<Extension> |
+Client.getExtension()
+Get the extension method, and this interface is optional, Therefore, users need to check whether this interface
+ has been implemented by vendors.
+ |
+
| Modifier and Type | +Interface and Description | +
|---|---|
interface |
+Consumer
+A
+PushConsumer receives messages from multiple queues, these messages are pushed from MOM server to Consumer client. |
+
interface |
+PullConsumer
+A
+PullConsumer pulls messages from the specified queue, and supports submit the consume result by
+ acknowledgement. |
+
interface |
+PushConsumer
+A
+PushConsumer receives messages from multiple queues, these messages are pushed from
+ MOM server to PushConsumer client. |
+
| Modifier and Type | +Interface and Description | +
|---|---|
interface |
+Producer
+A
+Producer is a simple object used to send messages on behalf of a MessagingAccessPoint. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/extension/class-use/ExtensionHeader.html b/io/openmessaging/extension/class-use/ExtensionHeader.html new file mode 100644 index 00000000..a97455a1 --- /dev/null +++ b/io/openmessaging/extension/class-use/ExtensionHeader.html @@ -0,0 +1,250 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging.extension | ++ |
| io.openmessaging.message | ++ |
| Modifier and Type | +Method and Description | +
|---|---|
ExtensionHeader |
+ExtensionHeader.setCorrelationId(String correlationId)
+A client can use the
+CORRELATION_ID field to link one message with another. |
+
ExtensionHeader |
+ExtensionHeader.setDelayTime(long delayTime)
+The
+DELAY_TIME header field contains a number that represents the delayed times in milliseconds. |
+
ExtensionHeader |
+ExtensionHeader.setExpireTime(long expireTime)
+The
+EXPIRE_TIME header field contains the expiration time, it represents a time-to-live value. |
+
ExtensionHeader |
+ExtensionHeader.setMessageKey(String messageKey)
+The
+messagekey header field contains the custom key of a message. |
+
ExtensionHeader |
+ExtensionHeader.setOffset(long offset)
+This method is only called by the server.
+ |
+
ExtensionHeader |
+ExtensionHeader.setPartition(int partition)
+The
+PARTITION in extension header field contains the partition of target destination which the message
+ is being sent. |
+
ExtensionHeader |
+ExtensionHeader.setStoreHost(String storeHost)
+The
+STORE_HOST header field contains the store host info of a message in server side. |
+
ExtensionHeader |
+ExtensionHeader.setStoreTimestamp(long storeTimestamp)
+The
+STORE_TIMESTAMP header field contains the store timestamp of a message in server side. |
+
ExtensionHeader |
+ExtensionHeader.setTraceId(String traceId)
+The
+TRACE_ID header field contains the trace ID of a message, which represents a global and unique
+ identification, to associate key events in the whole lifecycle of a message, like sent by who, stored at where,
+ and received by who. |
+
ExtensionHeader |
+ExtensionHeader.setTransactionId(String transactionId)
+This field
+TRANSACTION_ID is used in transactional message, and it can be used to trace a transaction. |
+
| Modifier and Type | +Method and Description | +
|---|---|
ExtensionHeader |
+Message.extensionHeader()
+This interface is optional, Therefore, users need to check whether the interface is implemented and the
+ correctness of its implementation.
+ |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/extension/class-use/QueueMetaData.html b/io/openmessaging/extension/class-use/QueueMetaData.html new file mode 100644 index 00000000..5a027df8 --- /dev/null +++ b/io/openmessaging/extension/class-use/QueueMetaData.html @@ -0,0 +1,205 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging.consumer | ++ |
| io.openmessaging.extension | ++ |
| Modifier and Type | +Method and Description | +
|---|---|
List<Message> |
+PullConsumer.batchReceive(String queueName,
+ QueueMetaData queueMetaData,
+ MessageReceipt messageReceipt,
+ long timeout)
+Receive message in asynchronous way.
+ |
+
Message |
+PullConsumer.receive(String queueName,
+ QueueMetaData queueMetaData,
+ MessageReceipt messageReceipt,
+ long timeout)
+Receives the next message from the which bind queue,partition and receiptId of this consumer in pull model.
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
Set<QueueMetaData> |
+Extension.getQueueMetaData(String queueName)
+This method used for getting the related queue's meta data, and this method is optional, vendors may not provide
+ this method based on their implementation.
+ |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/extension/package-frame.html b/io/openmessaging/extension/package-frame.html new file mode 100644 index 00000000..372b4ad1 --- /dev/null +++ b/io/openmessaging/extension/package-frame.html @@ -0,0 +1,23 @@ + + + + + + +| Interface | +Description | +
|---|---|
| Extension | +
+
+ This interface contains some methods are used for getting configurations related implementation.
+ |
+
| ExtensionHeader | +
+
+ The
+ExtensionHeader interface contains extended properties for common implementations in current messaging
+ and streaming field, such as the queue-based partitioning implementation, but the related properties in this
+ interface are not mandatory. |
+
| QueueMetaData | +
+ This interface
+QueueMetaData contains methods are used for getting configurations related some certain
+ implementation. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/extension/package-tree.html b/io/openmessaging/extension/package-tree.html new file mode 100644 index 00000000..d3b6f50a --- /dev/null +++ b/io/openmessaging/extension/package-tree.html @@ -0,0 +1,137 @@ + + + + + + +Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/extension/package-use.html b/io/openmessaging/extension/package-use.html new file mode 100644 index 00000000..12bb4b3d --- /dev/null +++ b/io/openmessaging/extension/package-use.html @@ -0,0 +1,266 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging | ++ |
| io.openmessaging.consumer | ++ |
| io.openmessaging.extension | ++ |
| io.openmessaging.message | ++ |
| io.openmessaging.producer | ++ |
| Class and Description | +
|---|
| Extension
+
+ This interface contains some methods are used for getting configurations related implementation.
+ |
+
| Class and Description | +
|---|
| Extension
+
+ This interface contains some methods are used for getting configurations related implementation.
+ |
+
| QueueMetaData
+ This interface
+QueueMetaData contains methods are used for getting configurations related some certain
+ implementation. |
+
| Class and Description | +
|---|
| ExtensionHeader
+
+ The
+ExtensionHeader interface contains extended properties for common implementations in current messaging
+ and streaming field, such as the queue-based partitioning implementation, but the related properties in this
+ interface are not mandatory. |
+
| QueueMetaData
+ This interface
+QueueMetaData contains methods are used for getting configurations related some certain
+ implementation. |
+
| Class and Description | +
|---|
| ExtensionHeader
+
+ The
+ExtensionHeader interface contains extended properties for common implementations in current messaging
+ and streaming field, such as the queue-based partitioning implementation, but the related properties in this
+ interface are not mandatory. |
+
| Class and Description | +
|---|
| Extension
+
+ This interface contains some methods are used for getting configurations related implementation.
+ |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/interceptor/ConsumerInterceptor.html b/io/openmessaging/interceptor/ConsumerInterceptor.html new file mode 100644 index 00000000..4a1ba8a1 --- /dev/null +++ b/io/openmessaging/interceptor/ConsumerInterceptor.html @@ -0,0 +1,263 @@ + + + + + + +public interface ConsumerInterceptor
+ConsumerInterceptor is used to intercept consume operations of push consumer.| Modifier and Type | +Method and Description | +
|---|---|
void |
+postReceive(Message message,
+ Context attributes)
+Invoked after the invocation of
+MessageListener.onReceived(Message, MessageListener.Context). |
+
void |
+preReceive(Message message,
+ Context attributes)
+Invoked before the invocation of
+MessageListener.onReceived(Message, MessageListener.Context). |
+
void preReceive(Message message, + Context attributes)+
MessageListener.onReceived(Message, MessageListener.Context).message - the message is actually received.attributes - the extensible attributes delivered to the intercept thread.void postReceive(Message message, + Context attributes)+
MessageListener.onReceived(Message, MessageListener.Context).message - the message is actually received.attributes - the extensible attributes delivered to the intercept thread.Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/interceptor/Context.html b/io/openmessaging/interceptor/Context.html new file mode 100644 index 00000000..d64da19c --- /dev/null +++ b/io/openmessaging/interceptor/Context.html @@ -0,0 +1,237 @@ + + + + + + +public interface Context
+Context is used to transfer user's business data in the interceptor.| Modifier and Type | +Method and Description | +
|---|---|
KeyValue |
+attributes()
+Returns the attributes of this
+Context instance. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/interceptor/ProducerInterceptor.html b/io/openmessaging/interceptor/ProducerInterceptor.html new file mode 100644 index 00000000..9160e07a --- /dev/null +++ b/io/openmessaging/interceptor/ProducerInterceptor.html @@ -0,0 +1,267 @@ + + + + + + +public interface ProducerInterceptor
+ProducerInterceptor is used to intercept send operations of producer.
+ + The interceptor is able to view or modify the message being transmitted and collect the send record.
| Modifier and Type | +Method and Description | +
|---|---|
void |
+postSend(Message message,
+ Context attributes)
+Invoked immediately after the successful send invocation.
+ |
+
void |
+preSend(Message message,
+ Context attributes)
+Invoked before the message is actually sent to the network.
+ |
+
void preSend(Message message, + Context attributes)+
+ This allows for modification of the message if necessary.
message - a message will be sent.attributes - the extensible attributes delivered to the intercept thread.Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/interceptor/class-use/ConsumerInterceptor.html b/io/openmessaging/interceptor/class-use/ConsumerInterceptor.html new file mode 100644 index 00000000..3d30c7fc --- /dev/null +++ b/io/openmessaging/interceptor/class-use/ConsumerInterceptor.html @@ -0,0 +1,174 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging.consumer | ++ |
| Modifier and Type | +Method and Description | +
|---|---|
void |
+Consumer.addInterceptor(ConsumerInterceptor interceptor)
+Adds a
+ConsumerInterceptor instance to this consumer. |
+
void |
+Consumer.removeInterceptor(ConsumerInterceptor interceptor)
+Removes an interceptor from this consumer.
+ |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/interceptor/class-use/Context.html b/io/openmessaging/interceptor/class-use/Context.html new file mode 100644 index 00000000..fb2b7695 --- /dev/null +++ b/io/openmessaging/interceptor/class-use/Context.html @@ -0,0 +1,190 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging.interceptor | ++ |
| Modifier and Type | +Method and Description | +
|---|---|
void |
+ConsumerInterceptor.postReceive(Message message,
+ Context attributes)
+Invoked after the invocation of
+MessageListener.onReceived(Message, MessageListener.Context). |
+
void |
+ProducerInterceptor.postSend(Message message,
+ Context attributes)
+Invoked immediately after the successful send invocation.
+ |
+
void |
+ConsumerInterceptor.preReceive(Message message,
+ Context attributes)
+Invoked before the invocation of
+MessageListener.onReceived(Message, MessageListener.Context). |
+
void |
+ProducerInterceptor.preSend(Message message,
+ Context attributes)
+Invoked before the message is actually sent to the network.
+ |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/interceptor/class-use/ProducerInterceptor.html b/io/openmessaging/interceptor/class-use/ProducerInterceptor.html new file mode 100644 index 00000000..d2835cd5 --- /dev/null +++ b/io/openmessaging/interceptor/class-use/ProducerInterceptor.html @@ -0,0 +1,174 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging.producer | ++ |
| Modifier and Type | +Method and Description | +
|---|---|
void |
+Producer.addInterceptor(ProducerInterceptor interceptor)
+Adds a
+ProducerInterceptor to intercept send operations of producer. |
+
void |
+Producer.removeInterceptor(ProducerInterceptor interceptor)
+Remove a
+ProducerInterceptor. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/interceptor/package-frame.html b/io/openmessaging/interceptor/package-frame.html new file mode 100644 index 00000000..971a4ef8 --- /dev/null +++ b/io/openmessaging/interceptor/package-frame.html @@ -0,0 +1,23 @@ + + + + + + +| Interface | +Description | +
|---|---|
| ConsumerInterceptor | +
+ A
+ConsumerInterceptor is used to intercept consume operations of push consumer. |
+
| Context | +
+ A
+Context is used to transfer user's business data in the interceptor. |
+
| ProducerInterceptor | +
+ A
+ProducerInterceptor is used to intercept send operations of producer. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/interceptor/package-tree.html b/io/openmessaging/interceptor/package-tree.html new file mode 100644 index 00000000..d9b69e01 --- /dev/null +++ b/io/openmessaging/interceptor/package-tree.html @@ -0,0 +1,137 @@ + + + + + + +Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/interceptor/package-use.html b/io/openmessaging/interceptor/package-use.html new file mode 100644 index 00000000..f704012d --- /dev/null +++ b/io/openmessaging/interceptor/package-use.html @@ -0,0 +1,203 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging.consumer | ++ |
| io.openmessaging.interceptor | ++ |
| io.openmessaging.producer | ++ |
| Class and Description | +
|---|
| ConsumerInterceptor
+ A
+ConsumerInterceptor is used to intercept consume operations of push consumer. |
+
| Class and Description | +
|---|
| Context
+ A
+Context is used to transfer user's business data in the interceptor. |
+
| Class and Description | +
|---|
| ProducerInterceptor
+ A
+ProducerInterceptor is used to intercept send operations of producer. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/manager/ResourceManager.html b/io/openmessaging/manager/ResourceManager.html new file mode 100644 index 00000000..81661d6d --- /dev/null +++ b/io/openmessaging/manager/ResourceManager.html @@ -0,0 +1,472 @@ + + + + + + +public interface ResourceManager
+ResourceManager is to provide a unified interface of resource management, allowing developers to manage
+ the namespace, queue and routing resources.
+
+ Create, set, get and delete are the four basic operations of ResourceManager.
+
+ ResourceManager also supports dynamic fetch and update of resource attributes.
+
+ MessagingAccessPoint.resourceManager() ()} is the unique method to obtain a ResourceManager instance.
+ Changes made through this instance will immediately apply to the message-oriented middleware (MOM) behind MessagingAccessPoint.
| Modifier and Type | +Method and Description | +
|---|---|
void |
+createNamespace(String nsName)
+Creates a
+Namespace resource with some preset attributes. |
+
void |
+createQueue(String queueName)
+Creates a
+Queue resource in the configured namespace with some preset attributes. |
+
void |
+deleteNamespace(String nsName)
+Deletes an existing namespace.
+ |
+
void |
+deleteQueue(String queueName)
+Deletes an existing queue resource.
+ |
+
void |
+filter(String queueName,
+ String filterString)
+In order to enable consumers to get the message in the specified mode, the filter rule follows the sql standard
+ to filter out messages.
+ |
+
Set<String> |
+listNamespaces()
+Gets the namespace list in the current
+MessagingAccessPoint. |
+
Set<String> |
+listQueues(String nsName)
+Gets the queue list in the specific namespace.
+ |
+
void |
+routing(String sourceQueue,
+ String targetQueue)
+Routing from sourceQueue to targetQueue.
+ |
+
void |
+switchNamespace(String targetNamespace)
+Switch to an existing namespace.
+ |
+
void createNamespace(String nsName)+
Namespace resource with some preset attributes.
+ + A namespace wraps the OMS resources in an abstract concept that makes it appear to the users within the namespace + that they have their own isolated instance of the global OMS resources.
nsName - the name of the new namespace.OMSSecurityException - when have no authority to create namespace.OMSTimeOutException - when the given timeout elapses before the create operation completes.OMSDestinationException - when this given destination has been created in the server.OMSRuntimeException - when the ResourceManager fails to create namespace due to some internal
+ error.void deleteNamespace(String nsName)+
nsName - the namespace needs to be deleted.OMSSecurityException - when have no authority to delete this namespace.OMSTimeOutException - when the given timeout elapses before the delete operation completes.OMSDestinationException - when have no given destination in the server.OMSRuntimeException - when the ResourceManager fails to delete the namespace due to some internal
+ error.void switchNamespace(String targetNamespace)+
targetNamespace - the namespace needs to be switched.OMSSecurityException - when have no authority to delete this namespace.OMSTimeOutException - when the given timeout elapses before the delete operation completes.OMSDestinationException - when have no given destination in the server.OMSRuntimeException - when the ResourceManager fails to delete the namespace due to some internal
+ error.Set<String> listNamespaces()+
MessagingAccessPoint.OMSSecurityException - when have no authority to delete this namespace.OMSTimeOutException - when the given timeout elapses before the list operation completes.OMSRuntimeException - when the ResourceManager fails to list the namespace due to some internal
+ error.void createQueue(String queueName)+
Queue resource in the configured namespace with some preset attributes.
+
+ The standard OMS Queue schema must start with the Namespace prefix:
+
+ <namespace_name>://<queue_name>
queueName - the name of the new queue.OMSSecurityException - when have no authority to create this queue.OMSTimeOutException - when the given timeout elapses before the create operation completes.OMSDestinationException - when the given destination has been created in the server.OMSRuntimeException - when the ResourceManager fails to delete the namespace due to some internal
+ error.void deleteQueue(String queueName)+
queueName - the queue needs to be deleted.OMSSecurityException - when have no authority to delete this namespace.OMSTimeOutException - when the given timeout elapses before the delete operation completes.OMSDestinationException - when have no given destination in the server.OMSRuntimeException - when the ResourceManager fails to delete the namespace due to some internal
+ error.Set<String> listQueues(String nsName)+
nsName - the specific namespace.OMSSecurityException - when have no authority to delete this namespace.OMSTimeOutException - when the given timeout elapses before the list operation completes.OMSRuntimeException - when the ResourceManager fails to list the namespace due to some internal
+ error.void filter(String queueName, + String filterString)+
queueName - queue name.filterString - SQL expression to filter out messages.OMSSecurityException - when have no authority to add this filter.OMSTimeOutException - when the given timeout elapses before the add filter operation completes.OMSRuntimeException - when the ResourceManager fails to add a new filter due to some internal
+ error.void routing(String sourceQueue, + String targetQueue)+
sourceQueue - source queue, process messages received from producer and duplicate those to target queue.targetQueue - receive messages from source queue.OMSSecurityException - when have no authority to add this routing.OMSTimeOutException - when the given timeout elapses before the routing operation completes.OMSRuntimeException - when the ResourceManager fails to add a new routing due to some internal
+ error.Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/manager/class-use/ResourceManager.html b/io/openmessaging/manager/class-use/ResourceManager.html new file mode 100644 index 00000000..3d86c3cb --- /dev/null +++ b/io/openmessaging/manager/class-use/ResourceManager.html @@ -0,0 +1,168 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging | ++ |
| Modifier and Type | +Method and Description | +
|---|---|
ResourceManager |
+MessagingAccessPoint.resourceManager()
+Gets a lightweight
+ResourceManager instance from the specified MessagingAccessPoint. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/manager/package-frame.html b/io/openmessaging/manager/package-frame.html new file mode 100644 index 00000000..0c8dc1ac --- /dev/null +++ b/io/openmessaging/manager/package-frame.html @@ -0,0 +1,21 @@ + + + + + + +| Interface | +Description | +
|---|---|
| ResourceManager | +
+ The
+ResourceManager is to provide a unified interface of resource management, allowing developers to manage
+ the namespace, queue and routing resources. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/manager/package-tree.html b/io/openmessaging/manager/package-tree.html new file mode 100644 index 00000000..14e226d5 --- /dev/null +++ b/io/openmessaging/manager/package-tree.html @@ -0,0 +1,135 @@ + + + + + + +Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/manager/package-use.html b/io/openmessaging/manager/package-use.html new file mode 100644 index 00000000..5effd858 --- /dev/null +++ b/io/openmessaging/manager/package-use.html @@ -0,0 +1,162 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging | ++ |
| Class and Description | +
|---|
| ResourceManager
+ The
+ResourceManager is to provide a unified interface of resource management, allowing developers to manage
+ the namespace, queue and routing resources. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/message/Header.html b/io/openmessaging/message/Header.html new file mode 100644 index 00000000..382a89eb --- /dev/null +++ b/io/openmessaging/message/Header.html @@ -0,0 +1,566 @@ + + + + + + +public interface Header
+Header interface is the root interface of all OMS messages, and the most commonly used by OMS message
+ Message.
+ + The header contains fields used by the messaging system that describes the message's meta information, while the body + contains the application data being transmitted. +
+ As for the message header, OMS defines three kinds types: headers Header ExtensionHeader and
+ properties KeyValue, with respect to flexibility in vendor implementation and user usage.
+
+
+ The header part is placed in the implementation classes of Message.
| Modifier and Type | +Method and Description | +
|---|---|
String |
+getBornHost()
+
+ |
+
long |
+getBornTimestamp()
+
+ |
+
short |
+getCompression()
+
+ |
+
int |
+getDeliveryCount()
+
+ |
+
String |
+getDestination()
+
+ |
+
short |
+getDurability()
+
+ |
+
String |
+getMessageId()
+
+ |
+
short |
+getPriority()
+
+ |
+
Header |
+setBornHost(String bornHost)
+The
+BORN_HOST header field contains the born host info of a message in client side. |
+
Header |
+setBornTimestamp(long bornTimestamp)
+The
+BORN_TIMESTAMP header field contains the time a message was handed off to a Producer to be
+ sent. |
+
Header |
+setCompression(short compression)
+The field
+COMPRESSION in headers represents the message body compress algorithm. |
+
Header |
+setDeliveryCount(int deliveryCount)
+The
+DELIVERY_COUNT header field contains a number, which represents the count of the message delivery. |
+
Header |
+setDestination(String destination)
+The
+DESTINATION header field contains the destination to which the message is being sent. |
+
Header |
+setDurability(short durability)
+The
+DURABILITY header field contains the persistent level of a message, the vendor should guarantee the
+ reliability level for a message. |
+
Header |
+setMessageId(String messageId)
+The
+MESSAGE_ID header field contains a value that uniquely identify each message sent by a Producer. |
+
Header |
+setPriority(short priority)
+The
+PRIORITY header field contains the priority level of a message, a message with a higher priority
+ value should be delivered preferentially. |
+
Header setDestination(String destination)+
DESTINATION header field contains the destination to which the message is being sent.
+
+ When a message is set to the Queue, then the message will be sent to the specified destination.
+
+ When a message is received, its destination is equivalent to the Queue where the message resides in.
Header setMessageId(String messageId)+
MESSAGE_ID header field contains a value that uniquely identify each message sent by a Producer. this identifier is generated by producer.Header setBornTimestamp(long bornTimestamp)+
BORN_TIMESTAMP header field contains the time a message was handed off to a Producer to be
+ sent.
+ + When a message is sent, BORN_TIMESTAMP will be set with current timestamp as the born timestamp of a message in + client side, on return from the send method, the message's BORN_TIMESTAMP header field contains this value. +
+ When a message is received its, BORN_TIMESTAMP header field contains this same value. +
+ This filed is a long value, measured in milliseconds.
Header setBornHost(String bornHost)+
BORN_HOST header field contains the born host info of a message in client side.
+ + When a message is sent, BORN_HOST will be set with the local host info, on return from the send method, the + message's BORN_HOST header field contains this value. +
+ When a message is received, its BORN_HOST header field contains this same value.
Header setPriority(short priority)+
PRIORITY header field contains the priority level of a message, a message with a higher priority
+ value should be delivered preferentially.
+ + OMS defines a ten level priority value with 1 as the lowest priority and 10 as the highest, and the default + priority is 5. The priority beyond this region will be ignored. +
+ OMS does not require or provide any guarantee that the message should be delivered in priority order strictly, + but the vendor should provide a best effort to deliver expedited messages ahead of normal messages. +
+ If PRIORITY field isn't set explicitly, use 5 as the default priority.
Header setDurability(short durability)+
DURABILITY header field contains the persistent level of a message, the vendor should guarantee the
+ reliability level for a message.
+ + OMS defines two modes of message delivery: +
Header setDeliveryCount(int deliveryCount)+
DELIVERY_COUNT header field contains a number, which represents the count of the message delivery.Header setCompression(short compression)+
COMPRESSION in headers represents the message body compress algorithm. vendors are free to
+ choose the compression algorithm, but must ensure that the decompressed message is delivered to the user.String getDestination()+ +
String getMessageId()+ +
long getBornTimestamp()+ +
String getBornHost()+ +
short getPriority()+ +
short getDurability()+ +
int getDeliveryCount()+ +
short getCompression()+ +
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/message/Message.html b/io/openmessaging/message/Message.html new file mode 100644 index 00000000..84ef26e1 --- /dev/null +++ b/io/openmessaging/message/Message.html @@ -0,0 +1,373 @@ + + + + + + +public interface Message
+Message interface is the root interface of all OMS messages, and the most commonly used OMS message is
+ Message.
+ + Most message-oriented middleware (MOM) products treat messages as lightweight entities that consist of header and + body and is used by separate applications to exchange a piece of information, like Apache RocketMQ. +
+ The header contains fields used by the messaging system that describes the message's meta information, while the body + contains the application data being transmitted. +
+ As for the message header, OMS defines three kinds types: headers Header ExtensionHeader and
+ properties KeyValue, with respect to flexibility in vendor implementation and user usage.
+
+ In BytesMessage, the body is just a byte array, may be compressed and uncompressed in the transmitting process by the
+ messaging system. The application is responsible for explaining the concrete content and format of the message body,
+ OMS is never aware of that.
+
+ The body part is placed in the implementation classes of Message.
| Modifier and Type | +Method and Description | +
|---|---|
ExtensionHeader |
+extensionHeader()
+This interface is optional, Therefore, users need to check whether the interface is implemented and the
+ correctness of its implementation.
+ |
+
byte[] |
+getData()
+Get data from message body
+ |
+
MessageReceipt |
+getMessageReceipt()
+Get the
+MessageReceipt of this Message, which will be used to acknowledge this message. |
+
Header |
+header()
+Returns all the system header fields of the
+Message object as a KeyValue. |
+
KeyValue |
+properties()
+Returns all the customized user header fields of the
+Message object as a KeyValue. |
+
void |
+setData(byte[] data)
+Set data to message body
+ |
+
Header header()+
Message object as a KeyValue.Message@Optional +ExtensionHeader extensionHeader()+
ExtensionHeaderKeyValue properties()+
Message object as a KeyValue.Messagebyte[] getData()+
OMSMessageFormatException - if the message body cannot be assigned to the specified typevoid setData(byte[] data)+
data - set message body in binary streamMessageReceipt getMessageReceipt()+
MessageReceipt of this Message, which will be used to acknowledge this message.Consumer.ack(io.openmessaging.consumer.MessageReceipt),
+MessageListener.Context#ack(),
+BatchMessageListener.Context#success(io.openmessaging.consumer.MessageReceipt...)Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/message/MessageFactory.html b/io/openmessaging/message/MessageFactory.html new file mode 100644 index 00000000..39c8438c --- /dev/null +++ b/io/openmessaging/message/MessageFactory.html @@ -0,0 +1,251 @@ + + + + + + +public interface MessageFactory
+Message objects.| Modifier and Type | +Method and Description | +
|---|---|
Message |
+createMessage(String queueName,
+ byte[] body)
+Creates a
+Message object. |
+
Message createMessage(String queueName, + byte[] body)+
Message object. A Message object is used to send a message containing a stream of
+ uninterpreted bytes.
+
+ The returned Message object only can be sent to the specified queue.
queueName - the target queue to sendbody - the body data for a messageMessage objectOMSMessageFormatException - when body exceed the maximum length or others.Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/message/class-use/Header.html b/io/openmessaging/message/class-use/Header.html new file mode 100644 index 00000000..7f05c899 --- /dev/null +++ b/io/openmessaging/message/class-use/Header.html @@ -0,0 +1,219 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging.message | ++ |
| Modifier and Type | +Method and Description | +
|---|---|
Header |
+Message.header()
+Returns all the system header fields of the
+Message object as a KeyValue. |
+
Header |
+Header.setBornHost(String bornHost)
+The
+BORN_HOST header field contains the born host info of a message in client side. |
+
Header |
+Header.setBornTimestamp(long bornTimestamp)
+The
+BORN_TIMESTAMP header field contains the time a message was handed off to a Producer to be
+ sent. |
+
Header |
+Header.setCompression(short compression)
+The field
+COMPRESSION in headers represents the message body compress algorithm. |
+
Header |
+Header.setDeliveryCount(int deliveryCount)
+The
+DELIVERY_COUNT header field contains a number, which represents the count of the message delivery. |
+
Header |
+Header.setDestination(String destination)
+The
+DESTINATION header field contains the destination to which the message is being sent. |
+
Header |
+Header.setDurability(short durability)
+The
+DURABILITY header field contains the persistent level of a message, the vendor should guarantee the
+ reliability level for a message. |
+
Header |
+Header.setMessageId(String messageId)
+The
+MESSAGE_ID header field contains a value that uniquely identify each message sent by a Producer. |
+
Header |
+Header.setPriority(short priority)
+The
+PRIORITY header field contains the priority level of a message, a message with a higher priority
+ value should be delivered preferentially. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/message/class-use/Message.html b/io/openmessaging/message/class-use/Message.html new file mode 100644 index 00000000..086085dc --- /dev/null +++ b/io/openmessaging/message/class-use/Message.html @@ -0,0 +1,390 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging.consumer | ++ |
| io.openmessaging.interceptor | ++ |
| io.openmessaging.message | ++ |
| io.openmessaging.producer | ++ |
| Modifier and Type | +Method and Description | +
|---|---|
Message |
+PullConsumer.receive()
+Receives the next message from the attached queues of this consumer.
+ |
+
Message |
+PullConsumer.receive(long timeout)
+Receives the next message from the bind queues of this consumer in pull model.
+ |
+
Message |
+PullConsumer.receive(String queueName,
+ QueueMetaData queueMetaData,
+ MessageReceipt messageReceipt,
+ long timeout)
+Receives the next message from the which bind queue,partition and receiptId of this consumer in pull model.
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
List<Message> |
+PullConsumer.batchReceive(long timeout)
+Receive message in asynchronous way.
+ |
+
List<Message> |
+PullConsumer.batchReceive(String queueName,
+ QueueMetaData queueMetaData,
+ MessageReceipt messageReceipt,
+ long timeout)
+Receive message in asynchronous way.
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
void |
+MessageListener.onReceived(Message message,
+ MessageListener.Context context)
+Callback method to receive incoming messages.
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
void |
+BatchMessageListener.onReceived(List<Message> batchMessage,
+ BatchMessageListener.Context context)
+Callback method to receive incoming messages.
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
void |
+ConsumerInterceptor.postReceive(Message message,
+ Context attributes)
+Invoked after the invocation of
+MessageListener.onReceived(Message, MessageListener.Context). |
+
void |
+ProducerInterceptor.postSend(Message message,
+ Context attributes)
+Invoked immediately after the successful send invocation.
+ |
+
void |
+ConsumerInterceptor.preReceive(Message message,
+ Context attributes)
+Invoked before the invocation of
+MessageListener.onReceived(Message, MessageListener.Context). |
+
void |
+ProducerInterceptor.preSend(Message message,
+ Context attributes)
+Invoked before the message is actually sent to the network.
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
Message |
+MessageFactory.createMessage(String queueName,
+ byte[] body)
+Creates a
+Message object. |
+
| Modifier and Type | +Method and Description | +
|---|---|
void |
+TransactionStateCheckListener.check(Message message,
+ TransactionStateCheckListener.TransactionalContext context)
+Checks the status of the local transaction branch.
+ |
+
TransactionalResult |
+Producer.prepare(Message message)
+Sends a transactional message to the specified destination synchronously, the destination should be preset to
+
+header(), other header fields as well. |
+
SendResult |
+Producer.send(Message message)
+Sends a message to the specified destination synchronously, the destination should be preset to
+header(), other header fields as well. |
+
Future<SendResult> |
+Producer.sendAsync(Message message)
+Sends a message to the specified destination asynchronously, the destination should be preset to
+header(), other header fields as well. |
+
void |
+Producer.sendOneway(Message message)
+
+ There is no
+Promise related or RuntimeException thrown. |
+
| Modifier and Type | +Method and Description | +
|---|---|
void |
+Producer.send(List<Message> messages)
+
+ Send batch messages to server.
+ |
+
Future<SendResult> |
+Producer.sendAsync(List<Message> messages)
+Send messages to the specified destination asynchronously, the destination should be preset to
+header(), other header fields as well. |
+
void |
+Producer.sendOneway(List<Message> messages)
+
+ There is no
+Promise related or RuntimeException thrown. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/message/class-use/MessageFactory.html b/io/openmessaging/message/class-use/MessageFactory.html new file mode 100644 index 00000000..216adc97 --- /dev/null +++ b/io/openmessaging/message/class-use/MessageFactory.html @@ -0,0 +1,192 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging | ++ |
| io.openmessaging.producer | ++ |
| Modifier and Type | +Method and Description | +
|---|---|
MessageFactory |
+MessagingAccessPoint.messageFactory()
+Gets a
+MessageFactory instance from the specified MessagingAccessPoint. |
+
| Modifier and Type | +Interface and Description | +
|---|---|
interface |
+Producer
+A
+Producer is a simple object used to send messages on behalf of a MessagingAccessPoint. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/message/package-frame.html b/io/openmessaging/message/package-frame.html new file mode 100644 index 00000000..039e8b76 --- /dev/null +++ b/io/openmessaging/message/package-frame.html @@ -0,0 +1,23 @@ + + + + + + +| Interface | +Description | +
|---|---|
| Header | +
+ The
+Header interface is the root interface of all OMS messages, and the most commonly used by OMS message
+ Message. |
+
| Message | +
+ The
+Message interface is the root interface of all OMS messages, and the most commonly used OMS message is
+ Message. |
+
| MessageFactory | +
+ A factory interface for creating
+Message objects. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/message/package-tree.html b/io/openmessaging/message/package-tree.html new file mode 100644 index 00000000..63fe2b2c --- /dev/null +++ b/io/openmessaging/message/package-tree.html @@ -0,0 +1,137 @@ + + + + + + +Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/message/package-use.html b/io/openmessaging/message/package-use.html new file mode 100644 index 00000000..ff084ecc --- /dev/null +++ b/io/openmessaging/message/package-use.html @@ -0,0 +1,260 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging | ++ |
| io.openmessaging.consumer | ++ |
| io.openmessaging.interceptor | ++ |
| io.openmessaging.message | ++ |
| io.openmessaging.producer | ++ |
| Class and Description | +
|---|
| MessageFactory
+ A factory interface for creating
+Message objects. |
+
| Class and Description | +
|---|
| Message
+ The
+Message interface is the root interface of all OMS messages, and the most commonly used OMS message is
+ Message. |
+
| Class and Description | +
|---|
| Message
+ The
+Message interface is the root interface of all OMS messages, and the most commonly used OMS message is
+ Message. |
+
| Class and Description | +
|---|
| Header
+ The
+Header interface is the root interface of all OMS messages, and the most commonly used by OMS message
+ Message. |
+
| Message
+ The
+Message interface is the root interface of all OMS messages, and the most commonly used OMS message is
+ Message. |
+
| Class and Description | +
|---|
| Message
+ The
+Message interface is the root interface of all OMS messages, and the most commonly used OMS message is
+ Message. |
+
| MessageFactory
+ A factory interface for creating
+Message objects. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/package-frame.html b/io/openmessaging/package-frame.html new file mode 100644 index 00000000..8a2f6935 --- /dev/null +++ b/io/openmessaging/package-frame.html @@ -0,0 +1,37 @@ + + + + + + +| Interface | +Description | +
|---|---|
| Client | +
+
+ A
+Client interface contains all the common behaviors of producer and consumer. |
+
| Future<V> | +
+
+ A
+Future represents the result of an asynchronous computation. |
+
| FutureListener<V> | +
+ A listener that is called back when a Promise is done.
+ |
+
| KeyValue | +
+ The
+KeyValue class represents a persistent set of attributes, which supports method chaining. |
+
| MessagingAccessPoint | +
+ An instance of
+MessagingAccessPoint may be obtained from OMS, which is capable of creating Producer, Consumer, ResourceManager, and other facility entities. |
+
| OMSBuiltinKeys | +
+ This is the centralized source for keys that are used for OMS standard attributes.
+ |
+
| Promise<V> | +
+ Special
+Future which is writable. |
+
| ServiceLifecycle | ++ + | +
| Class | +Description | +
|---|---|
| OMS | +
+ The oms class provides some static methods to create a
+MessagingAccessPoint from the specified OMS driver url
+ and some useful util methods. |
+
| Enum | +Description | +
|---|---|
| OMSResponseStatus | +
+ This class defined OpenMessaging response status code:
+ |
+
| ServiceLifeState | +
+ A collection of all service states.
+ |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/package-tree.html b/io/openmessaging/package-tree.html new file mode 100644 index 00000000..84fd45e2 --- /dev/null +++ b/io/openmessaging/package-tree.html @@ -0,0 +1,170 @@ + + + + + + +Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/package-use.html b/io/openmessaging/package-use.html new file mode 100644 index 00000000..ed018b44 --- /dev/null +++ b/io/openmessaging/package-use.html @@ -0,0 +1,291 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging | ++ |
| io.openmessaging.consumer | ++ |
| io.openmessaging.interceptor | ++ |
| io.openmessaging.message | ++ |
| io.openmessaging.producer | ++ |
| Class and Description | +
|---|
| Future
+
+ A
+Future represents the result of an asynchronous computation. |
+
| FutureListener
+ A listener that is called back when a Promise is done.
+ |
+
| KeyValue
+ The
+KeyValue class represents a persistent set of attributes, which supports method chaining. |
+
| MessagingAccessPoint
+ An instance of
+MessagingAccessPoint may be obtained from OMS, which is capable of creating Producer, Consumer, ResourceManager, and other facility entities. |
+
| OMSResponseStatus
+ This class defined OpenMessaging response status code:
+ |
+
| ServiceLifeState
+ A collection of all service states.
+ |
+
| Class and Description | +
|---|
| Client
+
+ A
+Client interface contains all the common behaviors of producer and consumer. |
+
| ServiceLifecycle + + | +
| Class and Description | +
|---|
| KeyValue
+ The
+KeyValue class represents a persistent set of attributes, which supports method chaining. |
+
| Class and Description | +
|---|
| KeyValue
+ The
+KeyValue class represents a persistent set of attributes, which supports method chaining. |
+
| Class and Description | +
|---|
| Client
+
+ A
+Client interface contains all the common behaviors of producer and consumer. |
+
| Future
+
+ A
+Future represents the result of an asynchronous computation. |
+
| ServiceLifecycle + + | +
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/producer/Producer.html b/io/openmessaging/producer/Producer.html new file mode 100644 index 00000000..a37c48e9 --- /dev/null +++ b/io/openmessaging/producer/Producer.html @@ -0,0 +1,487 @@ + + + + + + +public interface Producer +extends MessageFactory, ServiceLifecycle, Client+
Producer is a simple object used to send messages on behalf of a MessagingAccessPoint. An instance
+ of Producer is created by calling the MessagingAccessPoint.createProducer() method.
+
+ It provides various send methods to send a message to a specified destination, which is a Queue in
+ OMS.
+
+ send(Message) means send a message to the destination synchronously, the calling thread will block
+ until the send request complete.
+
+ sendAsync(Message) means send a message to the destination asynchronously, the calling thread won't
+ block and will return immediately. Since the send call is asynchronous it returns a Future for the send
+ result.
| Modifier and Type | +Method and Description | +
|---|---|
void |
+addInterceptor(ProducerInterceptor interceptor)
+Adds a
+ProducerInterceptor to intercept send operations of producer. |
+
TransactionalResult |
+prepare(Message message)
+Sends a transactional message to the specified destination synchronously, the destination should be preset to
+
+Message.header(), other header fields as well. |
+
void |
+removeInterceptor(ProducerInterceptor interceptor)
+Remove a
+ProducerInterceptor. |
+
void |
+send(List<Message> messages)
+
+ Send batch messages to server.
+ |
+
SendResult |
+send(Message message)
+Sends a message to the specified destination synchronously, the destination should be preset to
+Message.header(), other header fields as well. |
+
Future<SendResult> |
+sendAsync(List<Message> messages)
+Send messages to the specified destination asynchronously, the destination should be preset to
+Message.header(), other header fields as well. |
+
Future<SendResult> |
+sendAsync(Message message)
+Sends a message to the specified destination asynchronously, the destination should be preset to
+Message.header(), other header fields as well. |
+
void |
+sendOneway(List<Message> messages)
+
+ There is no
+Promise related or RuntimeException thrown. |
+
void |
+sendOneway(Message message)
+
+ There is no
+Promise related or RuntimeException thrown. |
+
createMessagecurrentState, start, stopgetQueueMetaDatagetExtensionSendResult send(Message message)+
Message.header(), other header fields as well.message - a message will be sent.SendResult.OMSSecurityException - when have no authority to send messages to a given destination.OMSMessageFormatException - when an invalid message is specified.OMSTimeOutException - when the given timeout elapses before the send operation completes.OMSDestinationException - when have no given destination in the server.OMSRuntimeException - when the Producer fails to send the message due to some internal error.Future<SendResult> sendAsync(Message message)+
Message.header(), other header fields as well.
+
+ The returned Promise will have the result once the operation completes, and the registered FutureListener will be notified, either because the operation was successful or because of an error.
message - a message will be sent.Promise of an asynchronous message send operation.Future,
+FutureListenervoid sendOneway(Message message)+
+ There is no Promise related or RuntimeException thrown. The calling thread doesn't care about the
+ send result and also have no context to get the result.
message - a message will be sent.void send(List<Message> messages)+
+ Send batch messages to server.
messages - messages to be sent.Future<SendResult> sendAsync(List<Message> messages)+
Message.header(), other header fields as well.
+
+ The returned Promise will have the result once the operation completes, and the registered FutureListener will be notified, either because the operation was successful or because of an error.
messages - a batch messages will be sent.Promise of an asynchronous messages send operation.Future,
+FutureListenervoid sendOneway(List<Message> messages)+
+ There is no Promise related or RuntimeException thrown. The calling thread doesn't care about the
+ send result and also have no context to get the result.
messages - a batch message will be sent.void addInterceptor(ProducerInterceptor interceptor)+
ProducerInterceptor to intercept send operations of producer.interceptor - a producer interceptor.void removeInterceptor(ProducerInterceptor interceptor)+
ProducerInterceptor.interceptor - a producer interceptor will be removed.TransactionalResult prepare(Message message)+
Message.header(), other header fields as well.
+
+ A transactional send result will be exposed to consumer if this prepare message send success, and then, you can
+ execute your local transaction, when local transaction execute success, users can use TransactionalResult.commit() to commit prepare message,otherwise can use TransactionalResult.rollback()
+ to roll back this prepare message.
+
message - a prepare transactional message will be sent.SendResult.OMSSecurityException - when have no authority to send messages to a given destination.OMSMessageFormatException - when an invalid message is specified.OMSTimeOutException - when the given timeout elapses before the send operation completes.OMSDestinationException - when have no given destination in the server.OMSRuntimeException - when the Producer fails to send the message due to some internal error.OMSTransactionException - when used normal producer which haven't register TransactionStateCheckListener.Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/producer/SendResult.html b/io/openmessaging/producer/SendResult.html new file mode 100644 index 00000000..8a489b65 --- /dev/null +++ b/io/openmessaging/producer/SendResult.html @@ -0,0 +1,241 @@ + + + + + + +public interface SendResult
+| Modifier and Type | +Method and Description | +
|---|---|
String |
+messageId()
+The unique message id related to the
+SendResult instance. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/producer/TransactionStateCheckListener.TransactionalContext.html b/io/openmessaging/producer/TransactionStateCheckListener.TransactionalContext.html new file mode 100644 index 00000000..c99d723f --- /dev/null +++ b/io/openmessaging/producer/TransactionStateCheckListener.TransactionalContext.html @@ -0,0 +1,262 @@ + + + + + + +public static interface TransactionStateCheckListener.TransactionalContext
+| Modifier and Type | +Method and Description | +
|---|---|
void |
+commit()
+Commits a transaction.
+ |
+
void |
+rollback()
+Rolls back a transaction.
+ |
+
void |
+unknown()
+Unknown transaction status, may be this transaction still on going.
+ |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/producer/TransactionStateCheckListener.html b/io/openmessaging/producer/TransactionStateCheckListener.html new file mode 100644 index 00000000..74a7d6b7 --- /dev/null +++ b/io/openmessaging/producer/TransactionStateCheckListener.html @@ -0,0 +1,268 @@ + + + + + + +public interface TransactionStateCheckListener
++ + The associated message will be exposed to consumer when the local transaction has been committed, or be discarded if + local transaction has been rolled back. + +
+ If the executor doesn't submit the transaction status for a long time, the server may lookup it forwardly through
+ check(Message, TransactionalContext)
| Modifier and Type | +Interface and Description | +
|---|---|
static interface |
+TransactionStateCheckListener.TransactionalContext |
+
| Modifier and Type | +Method and Description | +
|---|---|
void |
+check(Message message,
+ TransactionStateCheckListener.TransactionalContext context)
+Checks the status of the local transaction branch.
+ |
+
void check(Message message, + TransactionStateCheckListener.TransactionalContext context)+
message - the associated message.context - the check context.Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/producer/TransactionalResult.html b/io/openmessaging/producer/TransactionalResult.html new file mode 100644 index 00000000..f63c2665 --- /dev/null +++ b/io/openmessaging/producer/TransactionalResult.html @@ -0,0 +1,282 @@ + + + + + + +public interface TransactionalResult +extends SendResult+
| Modifier and Type | +Method and Description | +
|---|---|
void |
+commit()
+Commits a transaction.
+ |
+
void |
+rollback()
+Rolls back a transaction.
+ |
+
String |
+transactionId()
+The unique transactionId id related to the
+TransactionResult instance. |
+
messageIdString transactionId()+
TransactionResult instance.void commit()+
void rollback()+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/producer/class-use/Producer.html b/io/openmessaging/producer/class-use/Producer.html new file mode 100644 index 00000000..0aff0ce6 --- /dev/null +++ b/io/openmessaging/producer/class-use/Producer.html @@ -0,0 +1,175 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging | ++ |
| Modifier and Type | +Method and Description | +
|---|---|
Producer |
+MessagingAccessPoint.createProducer()
+Creates a new
+Producer for the specified MessagingAccessPoint. |
+
Producer |
+MessagingAccessPoint.createProducer(TransactionStateCheckListener transactionStateCheckListener)
+Creates a new transactional
+Producer for the specified MessagingAccessPoint, the producer is able
+ to respond to requests from the server to check the status of the transaction. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/producer/class-use/SendResult.html b/io/openmessaging/producer/class-use/SendResult.html new file mode 100644 index 00000000..aa2f2106 --- /dev/null +++ b/io/openmessaging/producer/class-use/SendResult.html @@ -0,0 +1,205 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging.producer | ++ |
| Modifier and Type | +Interface and Description | +
|---|---|
interface |
+TransactionalResult
+The result of sending a OMS prepare message to server with the message id, this result can be used to commits or or
+ rolls back a prepare message.
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
SendResult |
+Producer.send(Message message)
+Sends a message to the specified destination synchronously, the destination should be preset to
+Message.header(), other header fields as well. |
+
| Modifier and Type | +Method and Description | +
|---|---|
Future<SendResult> |
+Producer.sendAsync(List<Message> messages)
+Send messages to the specified destination asynchronously, the destination should be preset to
+Message.header(), other header fields as well. |
+
Future<SendResult> |
+Producer.sendAsync(Message message)
+Sends a message to the specified destination asynchronously, the destination should be preset to
+Message.header(), other header fields as well. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/producer/class-use/TransactionStateCheckListener.TransactionalContext.html b/io/openmessaging/producer/class-use/TransactionStateCheckListener.TransactionalContext.html new file mode 100644 index 00000000..1a6300cd --- /dev/null +++ b/io/openmessaging/producer/class-use/TransactionStateCheckListener.TransactionalContext.html @@ -0,0 +1,169 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging.producer | ++ |
| Modifier and Type | +Method and Description | +
|---|---|
void |
+TransactionStateCheckListener.check(Message message,
+ TransactionStateCheckListener.TransactionalContext context)
+Checks the status of the local transaction branch.
+ |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/producer/class-use/TransactionStateCheckListener.html b/io/openmessaging/producer/class-use/TransactionStateCheckListener.html new file mode 100644 index 00000000..e39aee21 --- /dev/null +++ b/io/openmessaging/producer/class-use/TransactionStateCheckListener.html @@ -0,0 +1,169 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging | ++ |
| Modifier and Type | +Method and Description | +
|---|---|
Producer |
+MessagingAccessPoint.createProducer(TransactionStateCheckListener transactionStateCheckListener)
+Creates a new transactional
+Producer for the specified MessagingAccessPoint, the producer is able
+ to respond to requests from the server to check the status of the transaction. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/producer/class-use/TransactionalResult.html b/io/openmessaging/producer/class-use/TransactionalResult.html new file mode 100644 index 00000000..ee835346 --- /dev/null +++ b/io/openmessaging/producer/class-use/TransactionalResult.html @@ -0,0 +1,169 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging.producer | ++ |
| Modifier and Type | +Method and Description | +
|---|---|
TransactionalResult |
+Producer.prepare(Message message)
+Sends a transactional message to the specified destination synchronously, the destination should be preset to
+
+Message.header(), other header fields as well. |
+
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/producer/package-frame.html b/io/openmessaging/producer/package-frame.html new file mode 100644 index 00000000..d8e0f348 --- /dev/null +++ b/io/openmessaging/producer/package-frame.html @@ -0,0 +1,25 @@ + + + + + + +| Interface | +Description | +
|---|---|
| Producer | +
+ A
+Producer is a simple object used to send messages on behalf of a MessagingAccessPoint. |
+
| SendResult | +
+ The result of sending a OMS message to server with the message id and some attributes.
+ |
+
| TransactionalResult | +
+ The result of sending a OMS prepare message to server with the message id, this result can be used to commits or or
+ rolls back a prepare message.
+ |
+
| TransactionStateCheckListener | +
+ Each executor will be associated with a transactional message, can be used to execute local transaction branch and
+ submit the transaction status(commit or rollback).
+ |
+
| TransactionStateCheckListener.TransactionalContext | ++ |
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/producer/package-tree.html b/io/openmessaging/producer/package-tree.html new file mode 100644 index 00000000..e270e112 --- /dev/null +++ b/io/openmessaging/producer/package-tree.html @@ -0,0 +1,160 @@ + + + + + + +Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/io/openmessaging/producer/package-use.html b/io/openmessaging/producer/package-use.html new file mode 100644 index 00000000..d39eb022 --- /dev/null +++ b/io/openmessaging/producer/package-use.html @@ -0,0 +1,197 @@ + + + + + + +| Package | +Description | +
|---|---|
| io.openmessaging | ++ |
| io.openmessaging.producer | ++ |
| Class and Description | +
|---|
| Producer
+ A
+Producer is a simple object used to send messages on behalf of a MessagingAccessPoint. |
+
| TransactionStateCheckListener
+ Each executor will be associated with a transactional message, can be used to execute local transaction branch and
+ submit the transaction status(commit or rollback).
+ |
+
| Class and Description | +
|---|
| SendResult
+ The result of sending a OMS message to server with the message id and some attributes.
+ |
+
| TransactionalResult
+ The result of sending a OMS prepare message to server with the message id, this result can be used to commits or or
+ rolls back a prepare message.
+ |
+
| TransactionStateCheckListener.TransactionalContext | +
Copyright © 2017–2020 OpenMessaging. All rights reserved.
+ + diff --git a/openmessaging-admin/pom.xml b/openmessaging-admin/pom.xml deleted file mode 100644 index debe8f13..00000000 --- a/openmessaging-admin/pom.xml +++ /dev/null @@ -1,12 +0,0 @@ -- * A {@code Client} interface contains all the common behaviors of producer and consumer. which can be used to achieve - * some basic interaction with the server. - *
- * - * @version OMS 1.0.0 - * @since OMS 1.0.0 - */ -public interface Client { - /** - * Get the extension method, and this interface is optional, Therefore, users need to check whether this interface - * has been implemented by vendors. - *
- *
- * @return the implementation of {@link Extension}
- */
- @io.openmessaging.annotation.Optional
- Optional
- * A {@code Future} represents the result of an asynchronous computation. Methods are provided to check if the
- * computation is complete, to wait for its completion, and to retrieve the result of the computation. The result can
- * only be retrieved using method {@code get} when the computation has completed, blocking if necessary until it is
- * ready. Additional methods are provided to determine if the task completed normally or was cancelled.
- *
- * The reason for adding this future is mainly to satisfy the old version of jdk, such as jdk 1.6.
- * After this method returns, subsequent calls to {@link #isDone} will
- * always return {@code true}. Subsequent calls to {@link #isCancelled}
- * will always return {@code true} if this method returned {@code true}.
- *
- * @param mayInterruptIfRunning {@code true} if the thread executing this
- * task should be interrupted; otherwise, in-progress tasks are allowed
- * to complete
- * @return {@code false} if the task could not be cancelled,
- * typically because it has already completed normally;
- * {@code true} otherwise
- */
- boolean cancel(boolean mayInterruptIfRunning);
-
- /**
- * Returns {@code true} if this task was cancelled before it completed normally.
- *
- * @return {@code true} if this task was cancelled before it completed
- */
- boolean isCancelled();
-
- /**
- * Returns {@code true} if this task completed.
- *
- * Completion may be due to normal termination, an exception, or cancellation -- in all of these cases, this method
- * will return {@code true}.
- *
- * @return {@code true} if this task completed
- */
- boolean isDone();
-
- /**
- * Waits if necessary for the computation to complete, and then retrieves its result.
- *
- * @return the computed result
- */
- V get();
-
- /**
- * Waits if necessary for at most the given time for the computation to complete, and then retrieves its result, if
- * available.
- *
- * @param timeout the maximum time to wait
- * @return the computed result if the computation was cancelled
- */
- V get(long timeout);
-
- /**
- * Adds the specified listener to this future. The specified listener is notified when this future is done. If this
- * future is already completed, the specified listener will be notified immediately.
- *
- * @param listener FutureListener
- */
- void addListener(FutureListener
- * A {@code KeyValue} object only allows {@code String} keys and can contain four primitive type as values: {@code int},
- * {@code long}, {@code double}, {@code String}.
- *
- * The {@code KeyValue} is a replacement of {@code Properties}, with simpler interfaces and reasonable entry limits.
- *
- * A {@code KeyValue} object may be used in concurrent scenarios, so the implementation of {@code KeyValue} should
- * consider concurrent related issues.
- *
- * @version OMS 1.0.0
- * @since OMS 1.0.0
- */
-public interface KeyValue {
-
- /**
- * Inserts or replaces {@code boolean} value for the specified key.
- *
- * @param key the key to be placed into this {@code KeyValue} object
- * @param value the value corresponding to key
- */
- KeyValue put(String key, boolean value);
-
- /**
- * Inserts or replaces {@code short} value for the specified key.
- *
- * @param key the key to be placed into this {@code KeyValue} object
- * @param value the value corresponding to key
- */
- KeyValue put(String key, short value);
-
- /**
- * Inserts or replaces {@code int} value for the specified key.
- *
- * @param key the key to be placed into this {@code KeyValue} object
- * @param value the value corresponding to key
- */
- KeyValue put(String key, int value);
-
- /**
- * Inserts or replaces {@code long} value for the specified key.
- *
- * @param key the key to be placed into this {@code KeyValue} object
- * @param value the value corresponding to key
- */
- KeyValue put(String key, long value);
-
- /**
- * Inserts or replaces {@code double} value for the specified key.
- *
- * @param key the key to be placed into this {@code KeyValue} object
- * @param value the value corresponding to key
- */
- KeyValue put(String key, double value);
-
- /**
- * Inserts or replaces {@code String} value for the specified key.
- *
- * @param key the key to be placed into this {@code KeyValue} object
- * @param value the value corresponding to key
- */
- KeyValue put(String key, String value);
-
- /**
- * Searches for the {@code boolean} property with the specified key in this {@code KeyValue} object. If the key is
- * not found in this property list, false is returned.
- *
- * @param key the property key
- * @return the value in this {@code KeyValue} object with the specified key value
- * @see #put(String, boolean)
- */
- boolean getBoolean(String key);
-
- /**
- * Searches for the {@code boolean} property with the specified key in this {@code KeyValue} object. If the key is
- * not found in this property list, false is returned.
- *
- * @param key the property key
- * @param defaultValue a default value
- * @return the value in this {@code KeyValue} object with the specified key value
- * @see #put(String, boolean)
- */
- boolean getBoolean(String key, boolean defaultValue);
-
- /**
- * Searches for the {@code short} property with the specified key in this {@code KeyValue} object. If the key is not
- * found in this property list, zero is returned.
- *
- * @param key the property key
- * @return the value in this {@code KeyValue} object with the specified key value
- * @see #put(String, short)
- */
- short getShort(String key);
-
- /**
- * Searches for the {@code short} property with the specified key in this {@code KeyValue} object. If the key is not
- * found in this property list, zero is returned.
- *
- * @param key the property key
- * @param defaultValue a default value
- * @return the value in this {@code KeyValue} object with the specified key value
- * @see #put(String, short)
- */
- short getShort(String key, short defaultValue);
-
- /**
- * Searches for the {@code int} property with the specified key in this {@code KeyValue} object. If the key is not
- * found in this property list, zero is returned.
- *
- * @param key the property key
- * @return the value in this {@code KeyValue} object with the specified key value
- * @see #put(String, int)
- */
- int getInt(String key);
-
- /**
- * Searches for the {@code int} property with the specified key in this {@code KeyValue} object. If the key is not
- * found in this property list, the default value argument is returned.
- *
- * @param key the property key
- * @param defaultValue a default value
- * @return the value in this {@code KeyValue} object with the specified key value
- * @see #put(String, int)
- */
- int getInt(String key, int defaultValue);
-
- /**
- * Searches for the {@code long} property with the specified key in this {@code KeyValue} object. If the key is not
- * found in this property list, zero is returned.
- *
- * @param key the property key
- * @return the value in this {@code KeyValue} object with the specified key value
- * @see #put(String, long)
- */
- long getLong(String key);
-
- /**
- * Searches for the {@code long} property with the specified key in this {@code KeyValue} object. If the key is not
- * found in this property list, the default value argument is returned.
- *
- * @param key the property key
- * @param defaultValue a default value
- * @return the value in this {@code KeyValue} object with the specified key value
- * @see #put(String, long)
- */
- long getLong(String key, long defaultValue);
-
- /**
- * Searches for the {@code double} property with the specified key in this {@code KeyValue} object. If the key is
- * not found in this property list, zero is returned.
- *
- * @param key the property key
- * @return the value in this {@code KeyValue} object with the specified key value
- * @see #put(String, double)
- */
- double getDouble(String key);
-
- /**
- * Searches for the {@code double} property with the specified key in this {@code KeyValue} object. If the key is
- * not found in this property list, the default value argument is returned.
- *
- * @param key the property key
- * @param defaultValue a default value
- * @return the value in this {@code KeyValue} object with the specified key value
- * @see #put(String, double)
- */
- double getDouble(String key, double defaultValue);
-
- /**
- * Searches for the {@code String} property with the specified key in this {@code KeyValue} object. If the key is
- * not found in this property list, {@code null} is returned.
- *
- * @param key the property key
- * @return the value in this {@code KeyValue} object with the specified key value
- * @see #put(String, String)
- */
- String getString(String key);
-
- /**
- * Searches for the {@code String} property with the specified key in this {@code KeyValue} object. If the key is
- * not found in this property list, the default value argument is returned.
- *
- * @param key the property key
- * @param defaultValue a default value
- * @return the value in this {@code KeyValue} object with the specified key value
- * @see #put(String, String)
- */
- String getString(String key, String defaultValue);
-
- /**
- * Returns a {@link Set} view of the keys contained in this {@code KeyValue} object.
- *
- * The set is backed by the {@code KeyValue}, so changes to the set are reflected in the @code KeyValue}, and
- * vice-versa.
- *
- * @return the key set view of this {@code KeyValue} object.
- */
- Set
- * For example:
- *
- * There are some standard attributes defined by OMS for {@code MessagingAccessPoint}:
- *
- * The complete OMS driver URL syntax is:
- *
- * {@literal oms:
- * The first part of the URL specifies which OMS implementation is to be used, rocketmq is a optional driver type.
- *
- * The brackets indicate that the extra access points are optional, and a correct OMS driver url needs at least one
- * access point, which consists of hostname and port, like localhost:8081.
- *
- * @version OMS 1.0.0
- * @see ResourceManager
- * @since OMS 1.0.0
- */
-public final class OMS {
- /**
- * Returns a {@code MessagingAccessPoint} instance from the specified OMS driver url.
- *
- * @param url the specified OMS driver url
- * @return a {@code MessagingAccessPoint} instance
- * @throws OMSRuntimeException if the factory fails to create a {@code MessagingAccessPoint} due to some driver url
- * some syntax error or internal error.
- */
- public static MessagingAccessPoint getMessagingAccessPoint(String url) {
- return getMessagingAccessPoint(url, OMS.newKeyValue());
- }
-
- /**
- * Returns a {@code MessagingAccessPoint} instance from the specified OMS driver url with some preset attributes,
- * which will be passed to MessagingAccessPoint's implementation class as a unique constructor parameter.
- *
- * There are some standard attributes defined by OMS for this method, the same as {@link
- * MessagingAccessPoint#attributes()} ()}
- *
- * @param url the specified OMS driver url
- * @return a {@code MessagingAccessPoint} instance
- * @throws OMSRuntimeException if the factory fails to create a {@code MessagingAccessPoint} due to some driver url
- * some syntax error or internal error.
- */
- public static MessagingAccessPoint getMessagingAccessPoint(String url, KeyValue attributes) {
- return MessagingAccessPointAdapter.getMessagingAccessPoint(url, attributes);
- }
-
- /**
- * Returns a default and internal {@code KeyValue} implementation instance.
- *
- * @return a {@code KeyValue} instance
- */
- public static KeyValue newKeyValue() {
- return new DefaultKeyValue();
- }
-
- /**
- * The version format is X.Y.Z (Major.Minor.Patch), a pre-release version may be denoted by appending a hyphen and a
- * series of dot-separated identifiers immediately following the patch version, like X.Y.Z-alpha.
- *
- *
- * OMS version follows semver scheme partially.
- *
- * @see http://semver.org
- */
- public static String specVersion = "UnKnown";
-
- static {
- InputStream stream = OMS.class.getClassLoader().getResourceAsStream("oms.spec.properties");
- try {
- if (stream != null) {
- Properties properties = new Properties();
- properties.load(stream);
- specVersion = String.valueOf(properties.get("version"));
- }
- } catch (IOException ignore) {
- }
- }
-
- private OMS() {
- }
-}
diff --git a/openmessaging-api/src/main/java/io/openmessaging/OMSBuiltinKeys.java b/openmessaging-api/src/main/java/io/openmessaging/OMSBuiltinKeys.java
deleted file mode 100644
index 7d47d9a6..00000000
--- a/openmessaging-api/src/main/java/io/openmessaging/OMSBuiltinKeys.java
+++ /dev/null
@@ -1,53 +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 io.openmessaging;
-
-/**
- * This is the centralized source for keys that are used for OMS standard attributes.
- *
- * @version OMS 1.0.0
- * @since OMS 1.0.0
- */
-public interface OMSBuiltinKeys {
- /**
- * The {@code DRIVER_IMPL} key represents the vendor implementation
- * entry of {@link MessagingAccessPoint}.
- */
- String DRIVER_IMPL = "DRIVER_IMPL";
-
- /**
- * The {@code ACCESS_POINTS} key shows the specified access points in OMS driver schema.
- * @see Access Point Schema
- */
- String ACCESS_POINTS = "ACCESS_POINTS";
-
- /**
- * The {@code ACCOUNT_ID} key shows the specified account info in OMS driver schema.
- */
- String ACCOUNT_ID = "ACCOUNT_ID";
-
- /**
- * The {@code ACCOUNT_KEY} key shows the specified account key in OMS attribute.
- */
- String ACCOUNT_KEY = "ACCOUNT_KEY";
-
- /**
- * The {@code REGION} key shows the specified region in OMS driver schema.
- */
- String REGION = "REGION";
-}
diff --git a/openmessaging-api/src/main/java/io/openmessaging/OMSResponseStatus.java b/openmessaging-api/src/main/java/io/openmessaging/OMSResponseStatus.java
deleted file mode 100644
index cdca2b55..00000000
--- a/openmessaging-api/src/main/java/io/openmessaging/OMSResponseStatus.java
+++ /dev/null
@@ -1,147 +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 io.openmessaging;
-
-import io.openmessaging.exception.OMSRuntimeException;
-
-/**
- * This class defined OpenMessaging response status code:
- *
- * 110x: The request was received, continuing process
- *
- * 120x: The request was successfully received, understood, and accepted
- *
- * 130x: Further action needs to be taken in order to complete the request
- *
- * 140x: The request contains bad syntax or cannot be fulfilled
- *
- * 150x: The server failed to fulfill an apparently valid request
- *
- * 1000x: OpenMessaging internal status code for create {@link MessagingAccessPoint}
- *
- * A {@code Promise} can be completed or canceled, cancellation is performed by the {@code cancel} method.
- * Once a computation has completed, the computation cannot be cancelled. If you would like to use a {@code Promise}
- * for the sake of cancellability but not provide a usable result, you can declare type+s of the form
- * {@code Promise>} and return {@code null} as a result of the underlying task.
- *
- * @version OMS 1.0.0
- * @since OMS 1.0.0
- */
-public interface Promise
- * After this method returns, subsequent calls to {@link #isDone} will always return {@code true}. Subsequent calls
- * to {@link #isCancelled} will always return {@code true} if this method returned {@code true}.
- *
- * @param mayInterruptIfRunning {@code true} if the thread executing this task should be interrupted; otherwise,
- * in-progress tasks are allowed to complete
- * @return {@code false} if the task could not be cancelled, typically because it has already completed normally;
- * {@code true} otherwise
- */
- boolean cancel(boolean mayInterruptIfRunning);
-
- /**
- * Set the value to this promise and mark it completed if set successfully.
- *
- * @param value Value
- * @return Whether set is success
- */
- boolean set(V value);
-
- /**
- * Marks this promise as a failure and notifies all listeners.
- *
- * @param cause the cause
- * @return Whether set is success
- */
- boolean setFailure(Throwable cause);
-}
diff --git a/openmessaging-api/src/main/java/io/openmessaging/ServiceLifeState.java b/openmessaging-api/src/main/java/io/openmessaging/ServiceLifeState.java
deleted file mode 100644
index eafdb18f..00000000
--- a/openmessaging-api/src/main/java/io/openmessaging/ServiceLifeState.java
+++ /dev/null
@@ -1,52 +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 io.openmessaging;
-
-/**
- * A collection of all service states.
- *
- * @version OMS 1.0.0
- * @since OMS 1.0.0
- */
-public enum ServiceLifeState {
-
- /**
- * Service has been initialized.
- */
- INITIALIZED,
-
- /**
- * Service in starting.
- */
- STARTING,
-
- /**
- * Service in running.
- */
- STARTED,
-
- /**
- * Service is stopping.
- */
- STOPPING,
-
- /**
- * Service has been stopped.
- */
- STOPPED,
-}
diff --git a/openmessaging-api/src/main/java/io/openmessaging/ServiceLifecycle.java b/openmessaging-api/src/main/java/io/openmessaging/ServiceLifecycle.java
deleted file mode 100644
index 3066cd56..00000000
--- a/openmessaging-api/src/main/java/io/openmessaging/ServiceLifecycle.java
+++ /dev/null
@@ -1,56 +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 io.openmessaging;
-
-import io.openmessaging.consumer.Consumer;
-import io.openmessaging.extension.Extension;
-import io.openmessaging.producer.Producer;
-
-/**
- * The {@code ServiceLifecycle} defines a lifecycle interface for a OMS related service endpoint, like {@link Producer},
- * {@link Consumer}, and so on.
- *
- * If the service endpoint class implements the {@code ServiceLifecycle} interface, most of the containers can manage
- * the lifecycle of the corresponding service endpoint objects easily.
- *
- * Any service endpoint should support repeated restart if it implements the {@code ServiceLifecycle} interface.
- *
- * @version OMS 1.0.0
- * @since OMS 1.0.0
- */
-public interface ServiceLifecycle extends Extension {
- /**
- * Used for startup or initialization of a service endpoint. A service endpoint instance will be in a ready state
- * after this method has been completed.
- */
- void start();
-
- /**
- * Notify a service instance of the end of its life cycle. Once this method completes, the service endpoint could be
- * destroyed and eligible for garbage collection.
- */
- void stop();
-
- /**
- * Used for get service current state, for execution of some operations is dependent on the current service state.
- *
- * @return This service current state {@link ServiceLifeState}
- */
- ServiceLifeState currentState();
-
-}
diff --git a/openmessaging-api/src/main/java/io/openmessaging/annotation/Optional.java b/openmessaging-api/src/main/java/io/openmessaging/annotation/Optional.java
deleted file mode 100644
index b5b9d490..00000000
--- a/openmessaging-api/src/main/java/io/openmessaging/annotation/Optional.java
+++ /dev/null
@@ -1,43 +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 io.openmessaging.annotation;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- *
- * A {@code Optional} is an annotation to mark some certain methods ,interfaces and etc. this annotation represented
- * these methods or interfaces are not mandatory in OpenMessaging.
- *
- * If these methods or interfaces adopted by more and more vendors and end users, they may be become the mandatory
- * interface in the future. Of course, if they are used very little, they may be removed.
- *
- * A message listener should handle different types of {@code BatchMessage}.
- *
- * @param batchMessage the received batchMessage.
- */
- void onReceived(List
- * Messages that have been received but not acknowledged may be redelivered.
- *
- * @throws OMSRuntimeException if the consumer fails to acknowledge the messages due to some internal error.
- */
- void success(MessageReceipt... messages);
-
- /**
- * Acknowledges all messages in this batch, which is related to this {@code MessageContext}.
- *
- *
- * @throws OMSRuntimeException if the consumer fails to acknowledge the messages due to some internal error.
- */
- void ack();
- }
-}
diff --git a/openmessaging-api/src/main/java/io/openmessaging/consumer/Consumer.java b/openmessaging-api/src/main/java/io/openmessaging/consumer/Consumer.java
deleted file mode 100644
index 4ea4ea61..00000000
--- a/openmessaging-api/src/main/java/io/openmessaging/consumer/Consumer.java
+++ /dev/null
@@ -1,72 +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 io.openmessaging.consumer;
-
-import io.openmessaging.Client;
-import io.openmessaging.MessagingAccessPoint;
-import io.openmessaging.ServiceLifecycle;
-import io.openmessaging.exception.OMSDestinationException;
-import io.openmessaging.exception.OMSRuntimeException;
-import io.openmessaging.exception.OMSSecurityException;
-import io.openmessaging.interceptor.ConsumerInterceptor;
-import io.openmessaging.message.Message;
-import java.util.Collection;
-import java.util.List;
-import java.util.Set;
-
-/**
- * A {@code PushConsumer} receives messages from multiple queues, these messages are pushed from MOM server to {@code
- * Consumer} client.
- *
- * @version OMS 1.0.0
- * @since OMS 1.0.0
- */
-public interface Consumer extends ServiceLifecycle, Client {
-
- /**
- * This method is used to find out the collection of queues bind to {@code Consumer}.
- *
- * @return the queues this consumer is bind, or null if the consumer is not bind queue.
- */
- Set
- * Messages that have been received but not acknowledged may be redelivered.
- *
- * @param receipt the receipt handle associated with the consumed message.
- */
- void ack(MessageReceipt receipt);
-
-}
\ No newline at end of file
diff --git a/openmessaging-api/src/main/java/io/openmessaging/consumer/MessageListener.java b/openmessaging-api/src/main/java/io/openmessaging/consumer/MessageListener.java
deleted file mode 100644
index 81a3fa8e..00000000
--- a/openmessaging-api/src/main/java/io/openmessaging/consumer/MessageListener.java
+++ /dev/null
@@ -1,51 +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 io.openmessaging.consumer;
-
-import io.openmessaging.message.Message;
-import io.openmessaging.exception.OMSRuntimeException;
-
-/**
- * A message listener must implement this {@code MessageListener} interface and register itself to a consumer instance
- * to asynchronously receive messages.
- *
- * @version OMS 1.0.0
- * @since OMS 1.0.0
- */
-public interface MessageListener {
- /**
- * Callback method to receive incoming messages.
- *
- * A message listener should handle different types of {@code Message}.
- *
- * @param message the received message object.
- * @param context the context delivered to the consume thread.
- */
- void onReceived(Message message, Context context);
-
- interface Context {
- /**
- * Acknowledges the specified and consumed message, which is related to this {@code MessageContext}.
- *
- * Messages that have been received but not acknowledged may be redelivered.
- *
- * @throws OMSRuntimeException if the consumer fails to acknowledge the messages due to some internal error.
- */
- void ack();
- }
-}
diff --git a/openmessaging-api/src/main/java/io/openmessaging/consumer/MessageReceipt.java b/openmessaging-api/src/main/java/io/openmessaging/consumer/MessageReceipt.java
deleted file mode 100644
index 26a75395..00000000
--- a/openmessaging-api/src/main/java/io/openmessaging/consumer/MessageReceipt.java
+++ /dev/null
@@ -1,27 +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 io.openmessaging.consumer;
-
-/**
- * A {@code MessageReceipt} is a {@code Message} with a {@code Receipt}.
- *
- * @version OMS 1.0.0
- * @since OMS 1.0.0
- */
-public interface MessageReceipt {
-}
diff --git a/openmessaging-api/src/main/java/io/openmessaging/consumer/PullConsumer.java b/openmessaging-api/src/main/java/io/openmessaging/consumer/PullConsumer.java
deleted file mode 100755
index 82f7814a..00000000
--- a/openmessaging-api/src/main/java/io/openmessaging/consumer/PullConsumer.java
+++ /dev/null
@@ -1,147 +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 io.openmessaging.consumer;
-
-import io.openmessaging.MessagingAccessPoint;
-import io.openmessaging.annotation.Optional;
-import io.openmessaging.exception.OMSDestinationException;
-import io.openmessaging.exception.OMSRuntimeException;
-import io.openmessaging.exception.OMSSecurityException;
-import io.openmessaging.exception.OMSTimeOutException;
-import io.openmessaging.extension.QueueMetaData;
-import io.openmessaging.message.Message;
-import java.util.Collection;
-import java.util.List;
-
-/**
- * A {@code PullConsumer} pulls messages from the specified queue, and supports submit the consume result by
- * acknowledgement.
- *
- * @version OMS 1.0.0
- * @see MessagingAccessPoint#createPullConsumer()
- * @since OMS 1.0.0
- */
-public interface PullConsumer extends Consumer {
-
- /**
- * Bind the {@code Consumer} to a collection of queue in pull model, user can use {@link PullConsumer#receive(long)}
- * to get messages from a collection of queue.
- *
- *
- * @param queueNames a collection of queues.
- * @throws OMSSecurityException when have no authority to bind to this queue.
- * @throws OMSDestinationException when have no given destination in the server.
- * @throws OMSRuntimeException when the {@code Producer} fails to send the message due to some internal error.
- */
- void bindQueue(Collection
- * After the success call, this consumer won't receive new message from the specified queue any more.
- *
- * @param queueNames a collection of queues.
- */
- void unbindQueue(Collection
- * This call blocks indefinitely until a message is arrives, the timeout expires, or until this {@code PullConsumer}
- * is shut down.
- *
- * @return the next message received from the attached queues, or null if the consumer is concurrently shut down or
- * the timeout expires
- * @throws OMSRuntimeException if the consumer fails to pull the next message due to some internal error.
- */
- Message receive();
-
- /**
- * Receives the next message from the bind queues of this consumer in pull model.
- *
- * This call blocks indefinitely until a message is arrives, the timeout expires, or until this {@code PullConsumer}
- * is shut down.
- *
- * @param timeout receive message will blocked at most
- * This call blocks indefinitely until a message is arrives, the timeout expires, or until this {@code PullConsumer}
- * is shut down.
- *
- * @param queueName receive message from which queueName in Message Queue.
- * @param queueMetaData receive message from which partition in Message Queue.
- * @param messageReceipt receive message from which receipt position in Message Queue.
- * @param timeout receive message will blocked at most
- *
- * @param timeout receive messages will blocked at most
- *
- * @param queueName receive message from which queueName in Message Queue.
- * @param queueMetaData receive message from which partition in Message Queue.
- * @param messageReceipt receive message from which receipt position in Message Queue.
- * @param timeout receive messages will blocked at most
- * Messages that have been received but not acknowledged may be redelivered.
- *
- * @param receiptHandle the receipt handle associated with the consumed message
- * @throws OMSRuntimeException if the consumer fails to acknowledge the messages due to some internal error.
- */
- void ack(MessageReceipt receiptHandle);
-
-}
\ No newline at end of file
diff --git a/openmessaging-api/src/main/java/io/openmessaging/consumer/PushConsumer.java b/openmessaging-api/src/main/java/io/openmessaging/consumer/PushConsumer.java
deleted file mode 100644
index 3eaf5ae6..00000000
--- a/openmessaging-api/src/main/java/io/openmessaging/consumer/PushConsumer.java
+++ /dev/null
@@ -1,120 +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 io.openmessaging.consumer;
-
-import io.openmessaging.KeyValue;
-import io.openmessaging.MessagingAccessPoint;
-import io.openmessaging.exception.OMSDestinationException;
-import io.openmessaging.exception.OMSRuntimeException;
-import io.openmessaging.exception.OMSSecurityException;
-import io.openmessaging.message.Message;
-import java.util.Collection;
-import java.util.List;
-
-/**
- * A {@code PushConsumer} receives messages from multiple queues, these messages are pushed from
- * MOM server to {@code PushConsumer} client.
- *
- * @version OMS 1.0.0
- * @see MessagingAccessPoint#createPushConsumer()
- * @since OMS 1.0.0
- */
-public interface PushConsumer extends Consumer{
- /**
- * Resumes the {@code Consumer} in push model after a suspend.
- *
- * This method resumes the {@code Consumer} instance after it was suspended. The instance will not receive new
- * messages between the suspend and resume calls.
- *
- * @throws OMSRuntimeException if the instance has not been suspended.
- * @see PushConsumer#suspend()
- */
- void resume();
-
- /**
- * Suspends the {@code Consumer} in push model for later resumption.
- *
- * This method suspends the consumer until it is resumed. The consumer will not receive new messages between the
- * suspend and resume calls.
- *
- * This method behaves exactly as if it simply performs the call {@code suspend(0)}.
- *
- * @throws OMSRuntimeException if the instance is not currently running.
- * @see PushConsumer#resume()
- */
- void suspend();
-
- /**
- * Suspends the {@code Consumer} in push model for later resumption.
- *
- * This method suspends the consumer until it is resumed or a specified amount of time has elapsed. The consumer
- * will not receive new messages during the suspended state.
- *
- * This method is similar to the {@link #suspend()} method, but it allows finer control over the amount of time to
- * suspend, and the consumer will be suspended until it is resumed if the timeout is zero.
- *
- * @param timeout the maximum time to suspend in milliseconds.
- * @throws OMSRuntimeException if the instance is not currently running.
- */
- void suspend(long timeout);
-
- /**
- * This method is used to find out whether the {@code Consumer} in push model is suspended.
- *
- * @return true if this {@code Consumer} is suspended, false otherwise.
- */
- boolean isSuspended();
-
- /**
- * Bind the {@code Consumer} to a collection of queue, with a {@code MessageListener}.
- *
- * {@link MessageListener#onReceived(Message, MessageListener.Context)} will be called when new delivered message is
- * coming.
- *
- * @param queueNames a collection of queues.
- * @param listener a specified listener to receive new message.
- * @throws OMSSecurityException when have no authority to bind to this queue.
- * @throws OMSDestinationException when have no given destination in the server.
- * @throws OMSRuntimeException when the {@code Producer} fails to send the message due to some internal error.
- */
- void bindQueue(Collection
- * {@link BatchMessageListener#onReceived(List, BatchMessageListener.Context)} will be called when new delivered
- * messages is coming.
- *
- * @param queueNames a collection of queues.
- * @param listener a specified listener to receive new messages.
- * @throws OMSSecurityException when have no authority to bind to this queue.
- * @throws OMSDestinationException when have no given destination in the server.
- * @throws OMSRuntimeException when the {@code Producer} fails to send the message due to some internal error.
- */
- void bindQueue(Collection
- * After the success call, this consumer won't receive new message from the specified queue any more.
- *
- * @param queueNames a collection of queues.
- */
- void unbindQueue(Collection
- * A OMSException consists of the following parts:
- *
- * Blocking operations for which a timeout is specified need a means to indicate that the timeout has occurred.
- *
- * @version OMS 1.0.0
- * @since OMS 1.0.0
- */
-public class OMSTimeOutException extends OMSRuntimeException {
- /**
- * @see OMSRuntimeException#OMSRuntimeException(int, String)
- */
- public OMSTimeOutException(int errorCode, String message) {
- super(errorCode, message);
- }
-
- /**
- * @see OMSRuntimeException#OMSRuntimeException(int, Throwable)
- */
- public OMSTimeOutException(int errorCode, Throwable cause) {
- super(errorCode, cause);
- }
-
- /**
- * @see OMSRuntimeException#OMSRuntimeException(int, String, Throwable)
- */
- public OMSTimeOutException(int errorCode, String message, Throwable cause) {
- super(errorCode, message, cause);
- }
-}
diff --git a/openmessaging-api/src/main/java/io/openmessaging/exception/OMSTransactionException.java b/openmessaging-api/src/main/java/io/openmessaging/exception/OMSTransactionException.java
deleted file mode 100644
index 07523790..00000000
--- a/openmessaging-api/src/main/java/io/openmessaging/exception/OMSTransactionException.java
+++ /dev/null
@@ -1,47 +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 io.openmessaging.exception;
-
-/**
- * The {@code OMSTransactionException} must be thrown when the client execute a transaction error.
- *
- * @version OMS 1.0.0
- * @since OMS 1.0.0
- */
-public class OMSTransactionException extends OMSRuntimeException {
- /**
- * @see OMSRuntimeException#OMSRuntimeException(int, String)
- */
- public OMSTransactionException(int errorCode, String message) {
- super(errorCode, message);
- }
-
- /**
- * @see OMSRuntimeException#OMSRuntimeException(int, Throwable)
- */
- public OMSTransactionException(int errorCode, Throwable cause) {
- super(errorCode, cause);
- }
-
- /**
- * @see OMSRuntimeException#OMSRuntimeException(int, String, Throwable)
- */
- public OMSTransactionException(int errorCode, String message, Throwable cause) {
- super(errorCode, message, cause);
- }
-}
diff --git a/openmessaging-api/src/main/java/io/openmessaging/exception/OMSUnsupportException.java b/openmessaging-api/src/main/java/io/openmessaging/exception/OMSUnsupportException.java
deleted file mode 100644
index 5720d452..00000000
--- a/openmessaging-api/src/main/java/io/openmessaging/exception/OMSUnsupportException.java
+++ /dev/null
@@ -1,49 +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 io.openmessaging.exception;
-
-import io.openmessaging.annotation.Optional;
-
-/**
- * The {@code OMSUnsupportException} must be thrown when the specified methods, headers or properties have not been
- * provided by vendors, these methods or headers are usually marked by {@link Optional}.
- *
- * @version OMS 1.0.0
- * @since OMS 1.0.0
- */
-public class OMSUnsupportException extends OMSRuntimeException {
- /**
- * @see OMSUnsupportException#OMSUnsupportException(int, String)
- */
- public OMSUnsupportException(int errorCode, String message) {
- super(errorCode, message);
- }
-
- /**
- * @see OMSUnsupportException#OMSUnsupportException(int, Throwable)
- */
- public OMSUnsupportException(int errorCode, Throwable cause) {
- super(errorCode, cause);
- }
-
- /**
- * @see OMSUnsupportException#OMSUnsupportException(int, String, Throwable)
- */
- public OMSUnsupportException(int errorCode, String message, Throwable cause) {
- super(errorCode, message, cause);
- }
-}
diff --git a/openmessaging-api/src/main/java/io/openmessaging/extension/Extension.java b/openmessaging-api/src/main/java/io/openmessaging/extension/Extension.java
deleted file mode 100644
index 56edceb9..00000000
--- a/openmessaging-api/src/main/java/io/openmessaging/extension/Extension.java
+++ /dev/null
@@ -1,51 +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 io.openmessaging.extension;
-
-import io.openmessaging.annotation.Optional;
-import io.openmessaging.exception.OMSDestinationException;
-import io.openmessaging.exception.OMSRuntimeException;
-import io.openmessaging.exception.OMSSecurityException;
-import io.openmessaging.exception.OMSTimeOutException;
-import java.util.Set;
-
-/**
- *
- * This interface contains some methods are used for getting configurations related implementation. but this interface
- * are not mandatory.
- *
- *
- * @param queueName Queue name, message destination.
- * @return {@link QueueMetaData} Queue config in the server
- * @throws OMSSecurityException when have no authority to send messages to a given destination.
- * @throws OMSTimeOutException when the given timeout elapses before the send operation completes.
- * @throws OMSDestinationException when have no given destination in the server.
- * @throws OMSRuntimeException when the {@code Producer} fails to send the message due to some internal error.
- */
- Set
- * The {@code ExtensionHeader} interface contains extended properties for common implementations in current messaging
- * and streaming field, such as the queue-based partitioning implementation, but the related properties in this
- * interface are not mandatory.
- *
- *
- * When a {@link Message} is set with this value, this message will be delivered to specified partition, but the
- * premise is that the implementation of the server side is dependent on the partition or a queue-like storage
- * mechanism.
- *
- *
- * @param partition The specified partition will be sent to.
- */
- ExtensionHeader setPartition(int partition);
-
- /**
- * This method is only called by the server. and {@code OFFSET} represents this message offset in partition.
- *
- *
- * @param offset The offset in the current partition, used to quickly get this message in the queue
- */
- ExtensionHeader setOffset(long offset);
-
- /**
- * A client can use the {@code CORRELATION_ID} field to link one message with another. A typical use is to link a
- * response message with its request message.
- */
- ExtensionHeader setCorrelationId(String correlationId);
-
- /**
- * This field {@code TRANSACTION_ID} is used in transactional message, and it can be used to trace a transaction.
- *
- * When a message is sent, STORE_TIMESTAMP is ignored.
- *
- * When the send method returns it contains a server-assigned value.
- *
- * This filed is a {@code long} value, measured in milliseconds.
- */
- ExtensionHeader setStoreTimestamp(long storeTimestamp);
-
- /**
- * The {@code STORE_HOST} header field contains the store host info of a message in server side.
- *
- * When a message is sent, STORE_HOST is ignored.
- *
- * When the send method returns it contains a server-assigned value.
- */
- ExtensionHeader setStoreHost(String storeHost);
-
- /**
- * The {@code messagekey} header field contains the custom key of a message.
- *
- * This key is a customer identifier for a class of messages, and this key may be used for server to hash or
- * dispatch messages, or even can use this key to implement order message.
- *
- */
- ExtensionHeader setMessageKey(String messageKey);
-
- /**
- * The {@code TRACE_ID} header field contains the trace ID of a message, which represents a global and unique
- * identification, to associate key events in the whole lifecycle of a message, like sent by who, stored at where,
- * and received by who.
- *
- * The {@code EXPIRE_TIME} represents a relative valid interval that a message can be delivered in it. If the
- * EXPIRE_TIME field is specified as zero, that indicates the message does not expire.
- *
- * When an undelivered message's expiration time is reached, the message should be destroyed. OMS does not define a
- * notification of message expiration.
- *
- *
- * @return The {@code PARTITION} to which the message belongs
- */
- int getPartiton();
-
- /**
- * This method will return the {@code OFFSET} in the partition to which the message belongs to, but the premise is
- * that the implementation of the server side is dependent on the partition or a queue-like storage mechanism.
- *
- * @return The offset of the partition to which the message belongs.
- */
- long getOffset();
-
- /**
- * See {@link ExtensionHeader#setCorrelationId(String)}
- *
- * @return correlationId
- */
- String getCorrelationId();
-
- /**
- * See {@link ExtensionHeader#setTransactionId(String)}
- *
- * @return transactionId
- */
- String getTransactionId();
-
- /**
- * See {@link ExtensionHeader#setStoreTimestamp(long)}
- *
- * @return storeTimestamp
- */
- long getStoreTimestamp();
-
- /**
- * See {@link ExtensionHeader#setStoreHost(String)}
- *
- * @return storeHost
- */
- String getStoreHost();
-
- /**
- * See {@link ExtensionHeader#setDelayTime(long)}
- *
- * @return delayTime
- */
- long getDelayTime();
-
- /**
- * See {@link ExtensionHeader#setExpireTime(long)}
- *
- * @return expireTime
- */
- long getExpireTime();
-
- /**
- * See {@link ExtensionHeader#setMessageKey(String)}
- *
- * @return messageKey
- */
- String getMessageKey();
-
- /**
- * See {@link ExtensionHeader#setTraceId(String)}
- *
- * @return traceId
- */
- String getTraceId();
-}
diff --git a/openmessaging-api/src/main/java/io/openmessaging/extension/QueueMetaData.java b/openmessaging-api/src/main/java/io/openmessaging/extension/QueueMetaData.java
deleted file mode 100644
index 0a0409b7..00000000
--- a/openmessaging-api/src/main/java/io/openmessaging/extension/QueueMetaData.java
+++ /dev/null
@@ -1,66 +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 io.openmessaging.extension;
-
-import io.openmessaging.annotation.Optional;
-import java.util.List;
-import java.util.Set;
-
-/**
- * This interface {@code QueueMetaData} contains methods are used for getting configurations related some certain
- * implementation. but this interface are not mandatory.
- *
- *
- * In order to improve performance, in some scenarios where message persistence is required, some message middleware
- * will store messages on multiple partitions in multi servers.
- *
- *
- * In some scenarios, it is very useful to get the relevant partitions meta data for a queue.
- *
- * @version OMS 1.0.0
- * @since OMS 1.0.0
- */
-@Optional
-public interface QueueMetaData {
-
- /**
- * Set queueName to this Message Queue.
- * @param queueName
- */
- void setQueueName(String queueName);
-
- /**
- * Set the specified partition.
- * @param partitionId
- */
- void setPartitionId(int partitionId);
-
- /**
- * Get partition identifier of target queue.
- *
- * @return Partition identifier
- */
- int partitionId();
-
- /**
- * Queue name
- *
- *
- * @return Queue name.
- */
- String queueName();
-}
diff --git a/openmessaging-api/src/main/java/io/openmessaging/interceptor/ConsumerInterceptor.java b/openmessaging-api/src/main/java/io/openmessaging/interceptor/ConsumerInterceptor.java
deleted file mode 100644
index 98aba203..00000000
--- a/openmessaging-api/src/main/java/io/openmessaging/interceptor/ConsumerInterceptor.java
+++ /dev/null
@@ -1,45 +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 io.openmessaging.interceptor;
-
-import io.openmessaging.message.Message;
-import io.openmessaging.consumer.MessageListener;
-
-/**
- * A {@code ConsumerInterceptor} is used to intercept consume operations of push consumer.
- *
- * @version OMS 1.0.0
- * @since OMS 1.0.0
- */
-public interface ConsumerInterceptor {
- /**
- * Invoked before the invocation of {@link MessageListener#onReceived(Message, MessageListener.Context)}.
- *
- * @param message the message is actually received.
- * @param attributes the extensible attributes delivered to the intercept thread.
- */
- void preReceive(Message message, Context attributes);
-
- /**
- * Invoked after the invocation of {@link MessageListener#onReceived(Message, MessageListener.Context)}.
- *
- * @param message the message is actually received.
- * @param attributes the extensible attributes delivered to the intercept thread.
- */
- void postReceive(Message message, Context attributes);
-}
diff --git a/openmessaging-api/src/main/java/io/openmessaging/interceptor/Context.java b/openmessaging-api/src/main/java/io/openmessaging/interceptor/Context.java
deleted file mode 100644
index 2ec6498b..00000000
--- a/openmessaging-api/src/main/java/io/openmessaging/interceptor/Context.java
+++ /dev/null
@@ -1,35 +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 io.openmessaging.interceptor;
-
-import io.openmessaging.KeyValue;
-
-/**
- * A {@code Context} is used to transfer user's business data in the interceptor.
- *
- * @version OMS 1.0.0
- * @since OMS 1.0.0
- */
-public interface Context {
-
- /**
- * Returns the attributes of this {@code Context} instance.
- *
- * @return the attributes.
- */
- KeyValue attributes();
-}
diff --git a/openmessaging-api/src/main/java/io/openmessaging/interceptor/ProducerInterceptor.java b/openmessaging-api/src/main/java/io/openmessaging/interceptor/ProducerInterceptor.java
deleted file mode 100644
index e41f60a0..00000000
--- a/openmessaging-api/src/main/java/io/openmessaging/interceptor/ProducerInterceptor.java
+++ /dev/null
@@ -1,49 +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 io.openmessaging.interceptor;
-
-import io.openmessaging.message.Message;
-
-/**
- * A {@code ProducerInterceptor} is used to intercept send operations of producer.
- *
- * The interceptor is able to view or modify the message being transmitted and collect the send record.
- *
- * @version OMS 1.0.0
- * @since OMS 1.0.0
- */
-public interface ProducerInterceptor {
- /**
- * Invoked before the message is actually sent to the network.
- *
- * This allows for modification of the message if necessary.
- *
- * @param message a message will be sent.
- * @param attributes the extensible attributes delivered to the intercept thread.
- */
- void preSend(Message message, Context attributes);
-
- /**
- * Invoked immediately after the successful send invocation.
- *
- * @param message the message is actually sent.
- * @param attributes the extensible attributes delivered to the intercept thread.
- */
- void postSend(Message message, Context attributes);
-
-}
diff --git a/openmessaging-api/src/main/java/io/openmessaging/internal/AccessPointURI.java b/openmessaging-api/src/main/java/io/openmessaging/internal/AccessPointURI.java
deleted file mode 100644
index 52336b91..00000000
--- a/openmessaging-api/src/main/java/io/openmessaging/internal/AccessPointURI.java
+++ /dev/null
@@ -1,101 +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 io.openmessaging.internal;
-
-import io.openmessaging.OMSResponseStatus;
-
-import static io.openmessaging.OMSResponseStatus.generateException;
-
-/**
- * Represents a AccessPoint String.
- * The Connection String describes the details to connect a specific OMS service provider.
- */
-public class AccessPointURI {
- private static final String PREFIX = "oms:";
-
- private final String accessPointString;
- private final String driverType;
- private final String accountId;
- private final String hosts;
- private final String region;
-
- /**
- * The standard OMS access point schema is:
- *
- * {@literal oms:
- *
- * More details please refer to:
- * Access Point Schema
- */
- private static final String PATTERN = "^oms:.+://.+/.+$";
-
- AccessPointURI(String accessPointString) {
- validateAccessPointString(accessPointString);
- this.accessPointString = accessPointString;
- String unprocessedString = accessPointString.substring(PREFIX.length());
-
- // Split out the user OMS driver info
- int idx = unprocessedString.indexOf(":");
- this.driverType = unprocessedString.substring(0, idx);
-
- //Skip '
- * Create, set, get and delete are the four basic operations of {@code ResourceManager}.
- *
- * {@code ResourceManager} also supports dynamic fetch and update of resource attributes.
- *
- * {@link MessagingAccessPoint#resourceManager()} ()} is the unique method to obtain a {@code ResourceManager} instance.
- * Changes made through this instance will immediately apply to the message-oriented middleware (MOM) behind {@code
- * MessagingAccessPoint}.
- *
- * @version OMS 1.0.0
- * @since OMS 1.0.0
- */
-public interface ResourceManager {
- /**
- * Creates a {@code Namespace} resource with some preset attributes.
- *
- * A namespace wraps the OMS resources in an abstract concept that makes it appear to the users within the namespace
- * that they have their own isolated instance of the global OMS resources.
- *
- * @param nsName the name of the new namespace.
- * @throws OMSSecurityException when have no authority to create namespace.
- * @throws OMSTimeOutException when the given timeout elapses before the create operation completes.
- * @throws OMSDestinationException when this given destination has been created in the server.
- * @throws OMSRuntimeException when the {@code ResourceManager} fails to create namespace due to some internal
- * error.
- */
- void createNamespace(String nsName);
-
- /**
- * Deletes an existing namespace.
- *
- * @param nsName the namespace needs to be deleted.
- * @throws OMSSecurityException when have no authority to delete this namespace.
- * @throws OMSTimeOutException when the given timeout elapses before the delete operation completes.
- * @throws OMSDestinationException when have no given destination in the server.
- * @throws OMSRuntimeException when the {@code ResourceManager} fails to delete the namespace due to some internal
- * error.
- */
- void deleteNamespace(String nsName);
-
- /**
- * Switch to an existing namespace.
- *
- * @param targetNamespace the namespace needs to be switched.
- * @throws OMSSecurityException when have no authority to delete this namespace.
- * @throws OMSTimeOutException when the given timeout elapses before the delete operation completes.
- * @throws OMSDestinationException when have no given destination in the server.
- * @throws OMSRuntimeException when the {@code ResourceManager} fails to delete the namespace due to some internal
- * error.
- */
- void switchNamespace(String targetNamespace);
-
- /**
- * Gets the namespace list in the current {@code MessagingAccessPoint}.
- *
- * @return the set of all namespaces.
- * @throws OMSSecurityException when have no authority to delete this namespace.
- * @throws OMSTimeOutException when the given timeout elapses before the list operation completes.
- * @throws OMSRuntimeException when the {@code ResourceManager} fails to list the namespace due to some internal
- * error.
- */
- Set
- * The standard OMS {@code Queue} schema must start with the {@code Namespace} prefix:
- *
- * {@literal
- * The header contains fields used by the messaging system that describes the message's meta information, while the body
- * contains the application data being transmitted.
- *
- * As for the message header, OMS defines three kinds types: headers {@link Header} {@link ExtensionHeader} and
- * properties {@link KeyValue}, with respect to flexibility in vendor implementation and user usage.
- *
- *
- * The header part is placed in the implementation classes of {@code Message}.
- *
- * @version OMS 1.0.0
- * @since OMS 1.0.0
- */
-public interface Header {
- /**
- * The {@code DESTINATION} header field contains the destination to which the message is being sent.
- *
- * When a message is set to the {@code Queue}, then the message will be sent to the specified destination.
- *
- * When a message is received, its destination is equivalent to the {@code Queue} where the message resides in.
- */
- Header setDestination(String destination);
-
- /**
- * The {@code MESSAGE_ID} header field contains a value that uniquely identify each message sent by a {@code
- * Producer}. this identifier is generated by producer.
- */
- Header setMessageId(String messageId);
-
- /**
- * The {@code BORN_TIMESTAMP} header field contains the time a message was handed off to a {@code Producer} to be
- * sent.
- *
- * When a message is sent, BORN_TIMESTAMP will be set with current timestamp as the born timestamp of a message in
- * client side, on return from the send method, the message's BORN_TIMESTAMP header field contains this value.
- *
- * When a message is received its, BORN_TIMESTAMP header field contains this same value.
- *
- * This filed is a {@code long} value, measured in milliseconds.
- */
- Header setBornTimestamp(long bornTimestamp);
-
- /**
- * The {@code BORN_HOST} header field contains the born host info of a message in client side.
- *
- * When a message is sent, BORN_HOST will be set with the local host info, on return from the send method, the
- * message's BORN_HOST header field contains this value.
- *
- * When a message is received, its BORN_HOST header field contains this same value.
- */
- Header setBornHost(String bornHost);
-
- /**
- * The {@code PRIORITY} header field contains the priority level of a message, a message with a higher priority
- * value should be delivered preferentially.
- *
- * OMS defines a ten level priority value with 1 as the lowest priority and 10 as the highest, and the default
- * priority is 5. The priority beyond this region will be ignored.
- *
- * OMS does not require or provide any guarantee that the message should be delivered in priority order strictly,
- * but the vendor should provide a best effort to deliver expedited messages ahead of normal messages.
- *
- * If PRIORITY field isn't set explicitly, use {@code 5} as the default priority.
- */
- Header setPriority(short priority);
-
- /**
- * The {@code DURABILITY} header field contains the persistent level of a message, the vendor should guarantee the
- * reliability level for a message.
- *
- * OMS defines two modes of message delivery:
- *
- * Most message-oriented middleware (MOM) products treat messages as lightweight entities that consist of header and
- * body and is used by separate applications to exchange a piece of information, like Apache RocketMQ.
- *
- * The header contains fields used by the messaging system that describes the message's meta information, while the body
- * contains the application data being transmitted.
- *
- * As for the message header, OMS defines three kinds types: headers {@link Header} {@link ExtensionHeader} and
- * properties {@link KeyValue}, with respect to flexibility in vendor implementation and user usage.
- *
- * In BytesMessage, the body is just a byte array, may be compressed and uncompressed in the transmitting process by the
- * messaging system. The application is responsible for explaining the concrete content and format of the message body,
- * OMS is never aware of that.
- *
- * The body part is placed in the implementation classes of {@code Message}.
- *
- * @version OMS 1.0.0
- * @since OMS 1.0.0
- */
-public interface Message {
- /**
- * Returns all the system header fields of the {@code Message} object as a {@code KeyValue}.
- *
- * @return the system headers of a {@code Message}
- */
- Header header();
-
- /**
- * This interface is optional, Therefore, users need to check whether the interface is implemented and the
- * correctness of its implementation.
- *
- *
- * @return The implementation of {@link ExtensionHeader}
- */
- @Optional
- ExtensionHeader extensionHeader();
-
- /**
- * Returns all the customized user header fields of the {@code Message} object as a {@code KeyValue}.
- *
- * @return the user properties of a {@code Message}
- */
- KeyValue properties();
-
- /**
- * Get data from message body
- *
- * @return message body
- * @throws OMSMessageFormatException if the message body cannot be assigned to the specified type
- */
- byte[] getData();
-
- /**
- * Set data to message body
- *
- * @param data set message body in binary stream
- */
- void setData(byte[] data);
-
- /**
- * Get the {@code MessageReceipt} of this Message, which will be used to acknowledge this message.
- *
- * @see Consumer#ack(io.openmessaging.consumer.MessageReceipt)
- * @see MessageListener.Context#ack()
- * @see BatchMessageListener.Context#success(io.openmessaging.consumer.MessageReceipt...)
- */
- MessageReceipt getMessageReceipt();
-
-}
\ No newline at end of file
diff --git a/openmessaging-api/src/main/java/io/openmessaging/message/MessageFactory.java b/openmessaging-api/src/main/java/io/openmessaging/message/MessageFactory.java
deleted file mode 100644
index 4902d4b6..00000000
--- a/openmessaging-api/src/main/java/io/openmessaging/message/MessageFactory.java
+++ /dev/null
@@ -1,42 +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 io.openmessaging.message;
-
-import io.openmessaging.exception.OMSMessageFormatException;
-import io.openmessaging.message.Message;
-
-/**
- * A factory interface for creating {@code Message} objects.
- *
- * @version OMS 1.0.0
- * @since OMS 1.0.0
- */
-public interface MessageFactory {
- /**
- * Creates a {@code Message} object. A {@code Message} object is used to send a message containing a stream of
- * uninterpreted bytes.
- *
- * The returned {@code Message} object only can be sent to the specified queue.
- *
- * @param queueName the target queue to send
- * @param body the body data for a message
- * @return the created {@code Message} object
- * @throws OMSMessageFormatException when body exceed the maximum length or others.
- */
- Message createMessage(String queueName, byte[] body);
-}
\ No newline at end of file
diff --git a/openmessaging-api/src/main/java/io/openmessaging/producer/Producer.java b/openmessaging-api/src/main/java/io/openmessaging/producer/Producer.java
deleted file mode 100644
index 3dbc10d4..00000000
--- a/openmessaging-api/src/main/java/io/openmessaging/producer/Producer.java
+++ /dev/null
@@ -1,159 +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 io.openmessaging.producer;
-
-import io.openmessaging.Client;
-import io.openmessaging.Future;
-import io.openmessaging.FutureListener;
-import io.openmessaging.MessagingAccessPoint;
-import io.openmessaging.ServiceLifecycle;
-import io.openmessaging.exception.OMSDestinationException;
-import io.openmessaging.exception.OMSMessageFormatException;
-import io.openmessaging.exception.OMSRuntimeException;
-import io.openmessaging.exception.OMSSecurityException;
-import io.openmessaging.exception.OMSTimeOutException;
-import io.openmessaging.exception.OMSTransactionException;
-import io.openmessaging.interceptor.ProducerInterceptor;
-import io.openmessaging.message.Message;
-import io.openmessaging.message.MessageFactory;
-import java.util.List;
-
-/**
- * A {@code Producer} is a simple object used to send messages on behalf of a {@code MessagingAccessPoint}. An instance
- * of {@code Producer} is created by calling the {@link MessagingAccessPoint#createProducer()} method.
- *
- * It provides various {@code send} methods to send a message to a specified destination, which is a {@code Queue} in
- * OMS.
- *
- * {@link Producer#send(Message)} means send a message to the destination synchronously, the calling thread will block
- * until the send request complete.
- *
- * {@link Producer#sendAsync(Message)} means send a message to the destination asynchronously, the calling thread won't
- * block and will return immediately. Since the send call is asynchronous it returns a {@link Future} for the send
- * result.
- *
- * @version OMS 1.0.0
- * @since OMS 1.0.0
- */
-public interface Producer extends MessageFactory, ServiceLifecycle, Client {
-
- /**
- * Sends a message to the specified destination synchronously, the destination should be preset to {@link
- * Message#header()}, other header fields as well.
- *
- * @param message a message will be sent.
- * @return the successful {@code SendResult}.
- * @throws OMSSecurityException when have no authority to send messages to a given destination.
- * @throws OMSMessageFormatException when an invalid message is specified.
- * @throws OMSTimeOutException when the given timeout elapses before the send operation completes.
- * @throws OMSDestinationException when have no given destination in the server.
- * @throws OMSRuntimeException when the {@code Producer} fails to send the message due to some internal error.
- */
- SendResult send(Message message);
-
- /**
- * Sends a message to the specified destination asynchronously, the destination should be preset to {@link
- * Message#header()}, other header fields as well.
- *
- * The returned {@code Promise} will have the result once the operation completes, and the registered {@code
- * FutureListener} will be notified, either because the operation was successful or because of an error.
- *
- * @param message a message will be sent.
- * @return the {@code Promise} of an asynchronous message send operation.
- * @see Future
- * @see FutureListener
- */
- Future
- * There is no {@code Promise} related or {@code RuntimeException} thrown. The calling thread doesn't care about the
- * send result and also have no context to get the result.
- *
- * @param message a message will be sent.
- */
- void sendOneway(Message message);
-
- /**
- *
- * Send batch messages to server.
- *
- * @param messages messages to be sent.
- */
- void send(List
- * The returned {@code Promise} will have the result once the operation completes, and the registered {@code
- * FutureListener} will be notified, either because the operation was successful or because of an error.
- *
- * @param messages a batch messages will be sent.
- * @return the {@code Promise} of an asynchronous messages send operation.
- * @see Future
- * @see FutureListener
- */
- Future
- * There is no {@code Promise} related or {@code RuntimeException} thrown. The calling thread doesn't care about the
- * send result and also have no context to get the result.
- *
- * @param messages a batch message will be sent.
- */
- void sendOneway(List
- * A transactional send result will be exposed to consumer if this prepare message send success, and then, you can
- * execute your local transaction, when local transaction execute success, users can use {@link
- * TransactionalResult#commit()} to commit prepare message,otherwise can use {@link TransactionalResult#rollback()}
- * to roll back this prepare message.
- *
- *
- * The associated message will be exposed to consumer when the local transaction has been committed, or be discarded if
- * local transaction has been rolled back.
- *
- *
- * If the executor doesn't submit the transaction status for a long time, the server may lookup it forwardly through
- * {@link TransactionStateCheckListener#check(Message, TransactionalContext)}
- *
- * @version OMS 1.0.0
- * @since OMS 1.0.0
- */
-public interface TransactionStateCheckListener {
-
- /**
- * Checks the status of the local transaction branch.
- *
- * @param message the associated message.
- * @param context the check context.
- */
- void check(Message message, TransactionalContext context);
-
- interface TransactionalContext {
- /**
- * Commits a transaction.
- */
- void commit();
-
- /**
- * Rolls back a transaction.
- */
- void rollback();
-
- /**
- * Unknown transaction status, may be this transaction still on going.
- */
- void unknown();
- }
-}
diff --git a/openmessaging-api/src/main/java/io/openmessaging/producer/TransactionalResult.java b/openmessaging-api/src/main/java/io/openmessaging/producer/TransactionalResult.java
deleted file mode 100644
index ed1644b8..00000000
--- a/openmessaging-api/src/main/java/io/openmessaging/producer/TransactionalResult.java
+++ /dev/null
@@ -1,44 +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 io.openmessaging.producer;
-
-/**
- * The result of sending a OMS prepare message to server with the message id, this result can be used to commits or or
- * rolls back a prepare message.
- *
- * @version OMS 1.0.0
- * @since OMS 1.0.0
- */
-public interface TransactionalResult extends SendResult {
- /**
- * The unique transactionId id related to the {@code TransactionResult} instance.
- *
- * @return the transactional id
- */
- String transactionId();
-
- /**
- * Commits a transaction.
- */
- void commit();
-
- /**
- * Rolls back a transaction.
- */
- void rollback();
-}
diff --git a/openmessaging-api/src/main/resources/oms.spec.properties b/openmessaging-api/src/main/resources/oms.spec.properties
deleted file mode 100644
index e5683df8..00000000
--- a/openmessaging-api/src/main/resources/oms.spec.properties
+++ /dev/null
@@ -1 +0,0 @@
-version=${project.version}
\ No newline at end of file
diff --git a/openmessaging-api/src/test/java/io/openmessaging/internal/AccessPointURITest.java b/openmessaging-api/src/test/java/io/openmessaging/internal/AccessPointURITest.java
deleted file mode 100644
index b11ff408..00000000
--- a/openmessaging-api/src/test/java/io/openmessaging/internal/AccessPointURITest.java
+++ /dev/null
@@ -1,83 +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 io.openmessaging.internal;
-
-import io.openmessaging.exception.OMSRuntimeException;
-import org.junit.Test;
-
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.core.api.Fail.failBecauseExceptionWasNotThrown;
-
-public class AccessPointURITest {
- private String fullSchemaURI = "oms:rocketmq://alice@rocketmq.apache.org/us-east";
-
- @Test
- public void testParse_DriverIsIllegal() {
- String missDriverType = "oms://alice@rocketmq.apache.org/us-east";
- try {
- new AccessPointURI(missDriverType);
- failBecauseExceptionWasNotThrown(OMSRuntimeException.class);
- } catch (Exception e) {
- assertThat(e).hasMessageContaining(String.format("The OMS driver URL [%s] is illegal.", missDriverType));
- }
-
-
- String missRegion = "oms:rocketmq://alice@rocketmq.apache.org/";
- try {
- new AccessPointURI(missRegion);
- failBecauseExceptionWasNotThrown(OMSRuntimeException.class);
- } catch (Exception e) {
- assertThat(e).hasMessageContaining(String.format("The OMS driver URL [%s] is illegal.", missRegion));
- }
- }
-
- @Test
- public void testGetAccessPointString() {
- AccessPointURI accessPointURI = new AccessPointURI(fullSchemaURI);
- assertThat(accessPointURI.getAccessPointString()).isEqualTo(fullSchemaURI);
- }
-
- @Test
- public void testGetDriverType() {
- AccessPointURI accessPointURI = new AccessPointURI(fullSchemaURI);
- assertThat(accessPointURI.getDriverType()).isEqualTo("rocketmq");
- }
-
- @Test
- public void testGetAccountId() {
- AccessPointURI accessPointURI = new AccessPointURI(fullSchemaURI);
- assertThat(accessPointURI.getAccountId()).isEqualTo("alice");
- }
-
- @Test
- public void testGetHosts() {
- AccessPointURI accessPointURI = new AccessPointURI(fullSchemaURI);
- assertThat(accessPointURI.getHosts()).isEqualTo("rocketmq.apache.org");
-
- String multipleHostsURI = "oms:rocketmq://alice@rocketmq.apache.org,pulsar.apache.org:9091/us-east:default_space";
- accessPointURI = new AccessPointURI(multipleHostsURI);
- assertThat(accessPointURI.getHosts()).isEqualTo("rocketmq.apache.org,pulsar.apache.org:9091");
- }
-
- @Test
- public void testGetRegion() {
- AccessPointURI accessPointURI = new AccessPointURI(fullSchemaURI);
-
- assertThat(accessPointURI.getRegion()).isEqualTo("us-east");
- }
-}
\ No newline at end of file
diff --git a/openmessaging-api/src/test/java/io/openmessaging/internal/DefaultKeyValueTest.java b/openmessaging-api/src/test/java/io/openmessaging/internal/DefaultKeyValueTest.java
deleted file mode 100644
index 71d70484..00000000
--- a/openmessaging-api/src/test/java/io/openmessaging/internal/DefaultKeyValueTest.java
+++ /dev/null
@@ -1,55 +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 io.openmessaging.internal;
-
-import io.openmessaging.KeyValue;
-import org.junit.Test;
-
-import static org.assertj.core.api.Assertions.assertThat;
-
-public class DefaultKeyValueTest {
- private KeyValue keyValue = new DefaultKeyValue();
-
- @Test
- public void testPutAndGet() throws Exception {
- keyValue.put("IntKey", 123);
- assertThat(keyValue.getInt("IntKey")).isEqualTo(123);
-
- keyValue.put("StringKey", "HELLO");
- assertThat(keyValue.getString("StringKey")).isEqualTo("HELLO");
-
- keyValue.put("LongKey", 123L);
- assertThat(keyValue.getLong("LongKey")).isEqualTo(123L);
-
- keyValue.put("DoubleKey", 1.23);
- assertThat(keyValue.getDouble("DoubleKey")).isEqualTo(1.23);
- }
-
- @Test
- public void testKeySet() throws Exception {
- keyValue.put("IndexKey", 123);
- assertThat(keyValue.keySet()).contains("IndexKey");
- }
-
- @Test
- public void testContainsKey() throws Exception {
- keyValue.put("ContainsKey", 123);
- assertThat(keyValue.containsKey("ContainsKey")).isTrue();
- }
-
-}
\ No newline at end of file
diff --git a/openmessaging-api/src/test/java/io/openmessaging/internal/InternalErrorCodeTest.java b/openmessaging-api/src/test/java/io/openmessaging/internal/InternalErrorCodeTest.java
deleted file mode 100644
index f13833bb..00000000
--- a/openmessaging-api/src/test/java/io/openmessaging/internal/InternalErrorCodeTest.java
+++ /dev/null
@@ -1,35 +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 io.openmessaging.internal;
-
-import io.openmessaging.OMSResponseStatus;
-import io.openmessaging.exception.OMSRuntimeException;
-import org.junit.Test;
-
-import static org.assertj.core.api.Assertions.assertThat;
-
-public class InternalErrorCodeTest {
- @Test
- public void generateInternalException() {
- OMSRuntimeException runtimeException = OMSResponseStatus.generateException(OMSResponseStatus.STATUS_10002, "1.1.0");
- assertThat(runtimeException.getErrorCode()).isEqualTo(OMSResponseStatus.STATUS_10002.getStatusCode());
- assertThat(runtimeException.getMessage()).contains(String.format("The implementation version [%s] is illegal.", "1.1.0"));
- }
-
-
-}
\ No newline at end of file
diff --git a/openmessaging-api/src/test/java/io/openmessaging/internal/MessagingAccessPointAdapterTest.java b/openmessaging-api/src/test/java/io/openmessaging/internal/MessagingAccessPointAdapterTest.java
deleted file mode 100644
index b348996e..00000000
--- a/openmessaging-api/src/test/java/io/openmessaging/internal/MessagingAccessPointAdapterTest.java
+++ /dev/null
@@ -1,101 +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 io.openmessaging.internal;
-
-import io.openmessaging.KeyValue;
-import io.openmessaging.MessagingAccessPoint;
-import io.openmessaging.OMS;
-import io.openmessaging.OMSBuiltinKeys;
-import io.openmessaging.consumer.Consumer;
-import io.openmessaging.consumer.PullConsumer;
-import io.openmessaging.consumer.PushConsumer;
-import io.openmessaging.manager.ResourceManager;
-import io.openmessaging.message.MessageFactory;
-import io.openmessaging.producer.Producer;
-import io.openmessaging.producer.TransactionStateCheckListener;
-import org.junit.Test;
-
-import static org.assertj.core.api.Assertions.assertThat;
-
-public class MessagingAccessPointAdapterTest {
- @Test
- public void getMessagingAccessPoint() {
- String testURI = "oms:test-vendor://alice@rocketmq.apache.org/us-east:default_space";
-
- KeyValue keyValue = OMS.newKeyValue();
- keyValue.put(OMSBuiltinKeys.DRIVER_IMPL, "io.openmessaging.internal.TestVendor");
- MessagingAccessPoint messagingAccessPoint = OMS.getMessagingAccessPoint(testURI, keyValue);
- assertThat(messagingAccessPoint).isExactlyInstanceOf(TestVendor.class);
- }
-}
-
-class TestVendor implements MessagingAccessPoint {
-
- public TestVendor(KeyValue keyValue) {
- }
-
- @Override
- public Producer createProducer(TransactionStateCheckListener transactionStateCheckListener) {
- return null;
- }
-
- @Override
- public PushConsumer createPushConsumer() {
- return null;
- }
-
- @Override
- public PullConsumer createPullConsumer() {
- return null;
- }
-
- @Override
- public PushConsumer createPushConsumer(KeyValue attributes) {
- return null;
- }
-
- @Override
- public PullConsumer createPullConsumer(KeyValue attributes) {
- return null;
- }
-
- @Override
- public MessageFactory messageFactory() {
- return null;
- }
-
- @Override
- public String version() {
- return OMS.specVersion;
- }
-
- @Override
- public KeyValue attributes() {
- return null;
- }
-
- @Override
- public Producer createProducer() {
- return null;
- }
-
- @Override
- public ResourceManager resourceManager() {
- return null;
- }
-}
\ No newline at end of file
diff --git a/overview-frame.html b/overview-frame.html
new file mode 100644
index 00000000..070c8d98
--- /dev/null
+++ b/overview-frame.html
@@ -0,0 +1,30 @@
+
+
+
+ Copyright © 2017–2020 OpenMessaging. All rights reserved. Copyright © 2017–2020 OpenMessaging. All rights reserved. Copyright © 2017–2020 OpenMessaging. All rights reserved.true if and only if the specified key is in this {@code KeyValue}, false
- * otherwise.
- */
- boolean containsKey(String key);
-}
diff --git a/openmessaging-api/src/main/java/io/openmessaging/MessagingAccessPoint.java b/openmessaging-api/src/main/java/io/openmessaging/MessagingAccessPoint.java
deleted file mode 100644
index 80bee1dd..00000000
--- a/openmessaging-api/src/main/java/io/openmessaging/MessagingAccessPoint.java
+++ /dev/null
@@ -1,153 +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 io.openmessaging;
-
-import io.openmessaging.consumer.Consumer;
-import io.openmessaging.consumer.MessageListener;
-import io.openmessaging.consumer.PullConsumer;
-import io.openmessaging.consumer.PushConsumer;
-import io.openmessaging.exception.OMSRuntimeException;
-import io.openmessaging.exception.OMSSecurityException;
-import io.openmessaging.manager.ResourceManager;
-import io.openmessaging.message.MessageFactory;
-import io.openmessaging.producer.Producer;
-import io.openmessaging.producer.TransactionStateCheckListener;
-import java.util.Collection;
-
-/**
- * An instance of {@code MessagingAccessPoint} may be obtained from {@link OMS}, which is capable of creating {@code
- * Producer}, {@code Consumer}, {@code ResourceManager}, and other facility entities.
- *
- * MessagingAccessPoint messagingAccessPoint = OMS.getMessagingAccessPoint("oms:rocketmq://alice@rocketmq.apache.org/us-east:default_space");
- * messagingAccessPoint.startup();
- * Producer producer = messagingAccessPoint.createProducer();
- * producer.startup();
- * producer.send(producer.createBytesMessage("HELLO_QUEUE", "HELLO_BODY".getBytes(Charset.forName("UTF-8"))));
- *
- *
- * @version OMS 1.0.0
- * @since OMS 1.0.0
- */
-public interface MessagingAccessPoint {
-
- /**
- * Returns the target OMS specification version of the specified vendor implementation.
- *
- * @return the OMS version of implementation
- * @see OMS#specVersion
- */
- String version();
-
- /**
- * Returns the attributes of this {@code MessagingAccessPoint} instance.
- *
- *
- *
- * @return the attributes
- */
- KeyValue attributes();
-
- /**
- * Creates a new {@code Producer} for the specified {@code MessagingAccessPoint}.
- *
- * @return the created {@code Producer}
- * @throws OMSRuntimeException if the {@code MessagingAccessPoint} fails to handle this request due to some internal
- * error
- * @throws OMSSecurityException if have no authority to create a producer.
- */
- Producer createProducer();
-
- /**
- * Creates a new transactional {@code Producer} for the specified {@code MessagingAccessPoint}, the producer is able
- * to respond to requests from the server to check the status of the transaction.
- *
- * @param transactionStateCheckListener transactional check listener {@link TransactionStateCheckListener}
- * @return the created {@code Producer}
- * @throws OMSRuntimeException if the {@code MessagingAccessPoint} fails to handle this request due to some internal
- * error
- * @throws OMSSecurityException if have no authority to create a producer.
- */
- Producer createProducer(TransactionStateCheckListener transactionStateCheckListener);
-
- /**
- * Creates a new {@code PushConsumer} for the specified {@code MessagingAccessPoint}.
- * The returned {@code PushConsumer} isn't attached to any queue,
- * uses {@link PushConsumer#bindQueue(Collection, MessageListener)} to attach queues.
- *
- * @return the created {@code PushConsumer}
- * @throws OMSRuntimeException if the {@code MessagingAccessPoint} fails to handle this request
- * due to some internal error
- */
- PushConsumer createPushConsumer();
-
- /**
- * Creates a new {@code PullConsumer} for the specified {@code MessagingAccessPoint}.
- *
- * @return the created {@code PullConsumer}
- * @throws OMSRuntimeException if the {@code MessagingAccessPoint} fails to handle this request
- * due to some internal error
- */
- PullConsumer createPullConsumer();
-
- /**
- * Creates a new {@code PushConsumer} for the specified {@code MessagingAccessPoint} with some preset attributes.
- *
- * @param attributes the preset attributes
- * @return the created {@code PushConsumer}
- * @throws OMSRuntimeException if the {@code MessagingAccessPoint} fails to handle this request
- * due to some internal error
- */
- PushConsumer createPushConsumer(KeyValue attributes);
-
- /**
- * Creates a new {@code PullConsumer} for the specified {@code MessagingAccessPoint}.
- *
- * @return the created {@code PullConsumer}
- * @throws OMSRuntimeException if the {@code MessagingAccessPoint} fails to handle this request
- * due to some internal error
- */
- PullConsumer createPullConsumer(KeyValue attributes);
-
- /**
- * Gets a lightweight {@code ResourceManager} instance from the specified {@code MessagingAccessPoint}.
- *
- * @return the resource manger
- * @throws OMSRuntimeException if the {@code MessagingAccessPoint} fails to handle this request due to some internal
- * error
- * @throws OMSSecurityException if have no authority to obtain a resource manager.
- */
- ResourceManager resourceManager();
-
- /**
- * Gets a {@link MessageFactory} instance from the specified {@code MessagingAccessPoint}.
- *
- * @return the resource manger
- * @throws OMSRuntimeException if the {@code MessagingAccessPoint} fails to handle this request due to some internal
- * error
- */
- MessageFactory messageFactory();
-}
diff --git a/openmessaging-api/src/main/java/io/openmessaging/OMS.java b/openmessaging-api/src/main/java/io/openmessaging/OMS.java
deleted file mode 100644
index 4f3d9342..00000000
--- a/openmessaging-api/src/main/java/io/openmessaging/OMS.java
+++ /dev/null
@@ -1,108 +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 io.openmessaging;
-
-import io.openmessaging.exception.OMSRuntimeException;
-import io.openmessaging.internal.DefaultKeyValue;
-import io.openmessaging.internal.MessagingAccessPointAdapter;
-import io.openmessaging.manager.ResourceManager;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Properties;
-
-/**
- * The oms class provides some static methods to create a {@code MessagingAccessPoint} from the specified OMS driver url
- * and some useful util methods.
- * timeout milliseconds.
- * @return the next message received from the bind queues, or null if the consumer is concurrently shut down.
- * @throws OMSSecurityException when have no authority to receive messages from this queue.
- * @throws OMSTimeOutException when the given timeout elapses before the send operation completes.
- * @throws OMSRuntimeException when the {@code Producer} fails to send the message due to some internal error.
- */
- Message receive(long timeout);
-
- /**
- * Receives the next message from the which bind queue,partition and receiptId of this consumer in pull model.
- * timeout milliseconds.
- * @return the next message received from the bind queues, or null if the consumer is concurrently shut down.
- * @throws OMSSecurityException when have no authority to receive messages from this queue.
- * @throws OMSTimeOutException when the given timeout elapses before the send operation completes.
- * @throws OMSRuntimeException when the {@code Producer} fails to send the message due to some internal error.
- */
- @Optional
- Message receive(String queueName, QueueMetaData queueMetaData, MessageReceipt messageReceipt, long timeout);
-
- /**
- * Receive message in asynchronous way. This call doesn't block user's thread, and user's message resolve logic
- * should implement in the {@link MessageListener}.
- * timeout milliseconds.
- * @return the next batch messages received from the bind queues, or null if the consumer is concurrently shut down.
- * @throws OMSSecurityException when have no authority to receive messages from this queue.
- * @throws OMSTimeOutException when the given timeout elapses before the send operation completes.
- * @throws OMSRuntimeException when the {@code Producer} fails to send the message due to some internal error.
- */
- Listtimeout milliseconds.
- * @return the next batch messages received from the bind queues, or null if the consumer is concurrently shut down.
- * @throws OMSSecurityException when have no authority to receive messages from this queue.
- * @throws OMSTimeOutException when the given timeout elapses before the send operation completes.
- * @throws OMSRuntimeException when the {@code Producer} fails to send the message due to some internal error.
- */
- @Optional
- List
- *
- *
- * @version OMS 1.0.0
- * @since OMS 1.0.0
- */
-public class OMSRuntimeException extends RuntimeException {
-
- /**
- * Vendor-specific error code
- * @see Error
- **/
- private final int errorCode;
-
- /**
- * Constructs a {@code OMSRuntimeException} with the specified detail message
- * and error code.
- *
- * @param errorCode a specified error code
- * @param message a description of the exception
- **/
- public OMSRuntimeException(int errorCode, String message) {
- super(message);
- this.errorCode = errorCode;
- }
-
- /**
- * Constructs a {@code OMSRuntimeException} with the specified error code and cause.
- *
- * @param errorCode a specified error code
- * @param cause the underlying cause of this exception
- */
- public OMSRuntimeException(int errorCode, Throwable cause) {
- super(cause);
- this.errorCode = errorCode;
- }
-
- /**
- * Constructs a {@code OMSRuntimeException} with the specified detail message,
- * error code and cause.
- *
- * @param errorCode a specified error code
- * @param message a description of the exception
- * @param cause the underlying cause of this exception
- */
- public OMSRuntimeException(int errorCode, String message, Throwable cause) {
- super(message, cause);
- this.errorCode = errorCode;
- }
-
- /**
- * Returns the error code of this {@code OMSRuntimeException} object.
- *
- * @return the error code
- */
- public int getErrorCode() {
- return errorCode;
- }
-}
diff --git a/openmessaging-api/src/main/java/io/openmessaging/exception/OMSSecurityException.java b/openmessaging-api/src/main/java/io/openmessaging/exception/OMSSecurityException.java
deleted file mode 100644
index 2480399e..00000000
--- a/openmessaging-api/src/main/java/io/openmessaging/exception/OMSSecurityException.java
+++ /dev/null
@@ -1,47 +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 io.openmessaging.exception;
-
-/**
- * The {@code OMSSecurityException} must be thrown when the client have no enough authority to operate an resource.
- *
- * @version OMS 1.0.0
- * @since OMS 1.0.0
- */
-public class OMSSecurityException extends OMSRuntimeException {
- /**
- * @see OMSRuntimeException#OMSRuntimeException(int, String)
- */
- public OMSSecurityException(int errorCode, String message) {
- super(errorCode, message);
- }
-
- /**
- * @see OMSRuntimeException#OMSRuntimeException(int, Throwable)
- */
- public OMSSecurityException(int errorCode, Throwable cause) {
- super(errorCode, cause);
- }
-
- /**
- * @see OMSRuntimeException#OMSRuntimeException(int, String, Throwable)
- */
- public OMSSecurityException(int errorCode, String message, Throwable cause) {
- super(errorCode, message, cause);
- }
-}
diff --git a/openmessaging-api/src/main/java/io/openmessaging/exception/OMSTimeOutException.java b/openmessaging-api/src/main/java/io/openmessaging/exception/OMSTimeOutException.java
deleted file mode 100644
index 05555897..00000000
--- a/openmessaging-api/src/main/java/io/openmessaging/exception/OMSTimeOutException.java
+++ /dev/null
@@ -1,49 +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 io.openmessaging.exception;
-
-/**
- * The {@code OMSTimeOutException} must be thrown when a blocking operation times out.
- *
- *
- * The body contains the application data being transmitted, which is generally ignored by the messaging system and
- * simply transmitted to its destination.
- *
- *
- */
- Header setDurability(short durability);
-
- /**
- * The {@code DELIVERY_COUNT} header field contains a number, which represents the count of the message delivery.
- */
- Header setDeliveryCount(int deliveryCount);
-
- /**
- * The field {@code COMPRESSION} in headers represents the message body compress algorithm. vendors are free to
- * choose the compression algorithm, but must ensure that the decompressed message is delivered to the user.
- */
- Header setCompression(short compression);
-
- /**
- * See {@link Header#setDestination(String)}
- *
- * @return destination
- */
- String getDestination();
-
- /**
- * See {@link Header#setMessageId(String)}
- *
- * @return messageId
- */
- String getMessageId();
-
- /**
- * See {@link Header#setBornTimestamp(long)}
- *
- * @return bornTimestamp
- */
- long getBornTimestamp();
-
- /**
- * See {@link Header#setBornHost(String)}
- *
- * @return bornHost
- */
- String getBornHost();
-
- /**
- * See {@link Header#setPriority(short)}
- *
- * @return priority
- */
- short getPriority();
-
- /**
- * See {@link Header#setDurability(short)}
- *
- * @return durability
- */
- short getDurability();
-
- /**
- * See {@link Header#setDeliveryCount(int)}
- *
- * @return deliveryCount
- */
- int getDeliveryCount();
-
- /**
- * See {@link Header#setCompression(short)}
- *
- * @return compression
- */
- short getCompression();
-}
diff --git a/openmessaging-api/src/main/java/io/openmessaging/message/Message.java b/openmessaging-api/src/main/java/io/openmessaging/message/Message.java
deleted file mode 100644
index a43d23ed..00000000
--- a/openmessaging-api/src/main/java/io/openmessaging/message/Message.java
+++ /dev/null
@@ -1,112 +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 io.openmessaging.message;
-
-import io.openmessaging.KeyValue;
-import io.openmessaging.annotation.Optional;
-import io.openmessaging.consumer.BatchMessageListener;
-import io.openmessaging.consumer.Consumer;
-import io.openmessaging.consumer.MessageListener;
-import io.openmessaging.consumer.MessageReceipt;
-import io.openmessaging.exception.OMSMessageFormatException;
-import io.openmessaging.extension.ExtensionHeader;
-
-/**
- * The {@code Message} interface is the root interface of all OMS messages, and the most commonly used OMS message is
- * {@link Message}.
- *
- *
- * The body contains the application data being transmitted, which is generally ignored by the messaging system and
- * simply transmitted to its destination.
- * Packages
+
+openmessaging 1.0.0-beta-SNAPSHOT API
+
+
+
+
+
+Package
+Description
+
+
+io.openmessaging
+
+
+
+io.openmessaging.annotation
+
+
+
+io.openmessaging.consumer
+
+
+
+io.openmessaging.exception
+
+
+
+io.openmessaging.extension
+
+
+
+io.openmessaging.interceptor
+
+
+
+io.openmessaging.manager
+
+
+
+io.openmessaging.message
+
+
+
+
+io.openmessaging.producer
+
+Hierarchy For All Packages
+Package Hierarchies:
+
+Class Hierarchy
+
+
+
+
+
+
+
+
+
+
+
+
+Interface Hierarchy
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Annotation Type Hierarchy
+
+
+Enum Hierarchy
+
+
+
+
+
+
+Serialized Form
+
+
+Package io.openmessaging.exception
+
+
+Class io.openmessaging.exception.OMSDestinationException extends OMSRuntimeException implements Serializable
+Class io.openmessaging.exception.OMSMessageFormatException extends OMSRuntimeException implements Serializable
+Class io.openmessaging.exception.OMSRuntimeException extends RuntimeException implements Serializable
+
+
+Serialized Fields
+
+
+errorCode
+int errorCode
+
+
+ErrorClass io.openmessaging.exception.OMSSecurityException extends OMSRuntimeException implements Serializable
+Class io.openmessaging.exception.OMSTimeOutException extends OMSRuntimeException implements Serializable
+Class io.openmessaging.exception.OMSTransactionException extends OMSRuntimeException implements Serializable
+Class io.openmessaging.exception.OMSUnsupportException extends OMSRuntimeException implements Serializable
+