@@ -211,6 +211,7 @@ private void setState(ChannelState newState, ErrorInfo reason, boolean resumed,
211211 * Spec: RTL4d
212212 * @throws AblyException
213213 */
214+ @ NonBlocking
214215 public void attach () throws AblyException {
215216 attach (null );
216217 }
@@ -229,6 +230,7 @@ public void attach() throws AblyException {
229230 * This listener is invoked on a background thread.
230231 * @throws AblyException
231232 */
233+ @ NonBlocking
232234 public void attach (CompletionListener listener ) throws AblyException {
233235 this .attach (false , listener );
234236 }
@@ -334,6 +336,7 @@ private void attachImpl(final boolean forceReattach, final CompletionListener li
334336 * Spec: RTL5e
335337 * @throws AblyException
336338 */
339+ @ NonBlocking
337340 public void detach () throws AblyException {
338341 detach (null );
339342 }
@@ -357,6 +360,7 @@ public void markAsReleased() {
357360 * This listener is invoked on a background thread.
358361 * @throws AblyException
359362 */
363+ @ NonBlocking
360364 public void detach (CompletionListener listener ) throws AblyException {
361365 clearAttachTimers ();
362366 detachWithTimeout (listener );
@@ -776,6 +780,7 @@ public interface MessageListener {
776780 * <p>
777781 * Spec: RTL8a, RTE5
778782 */
783+ @ NonBlocking
779784 public synchronized void unsubscribe () {
780785 Log .v (TAG , "unsubscribe(); channel = " + this .name );
781786 listeners .clear ();
@@ -804,6 +809,7 @@ protected boolean attachOnSubscribeEnabled() {
804809 * This listener is invoked on a background thread.
805810 * @throws AblyException
806811 */
812+ @ NonBlocking
807813 public synchronized void subscribe (MessageListener listener ) throws AblyException {
808814 Log .v (TAG , "subscribe(); channel = " + this .name );
809815 listeners .add (listener );
@@ -821,6 +827,7 @@ public synchronized void subscribe(MessageListener listener) throws AblyExceptio
821827 * <p>
822828 * This listener is invoked on a background thread.
823829 */
830+ @ NonBlocking
824831 public synchronized void unsubscribe (MessageListener listener ) {
825832 Log .v (TAG , "unsubscribe(); channel = " + this .name );
826833 listeners .remove (listener );
@@ -841,6 +848,7 @@ public synchronized void unsubscribe(MessageListener listener) {
841848 * This listener is invoked on a background thread.
842849 * @throws AblyException
843850 */
851+ @ NonBlocking
844852 public synchronized void subscribe (String name , MessageListener listener ) throws AblyException {
845853 Log .v (TAG , "subscribe(); channel = " + this .name + "; event = " + name );
846854 subscribeImpl (name , listener );
@@ -859,6 +867,7 @@ public synchronized void subscribe(String name, MessageListener listener) throws
859867 * <p>
860868 * This listener is invoked on a background thread.
861869 */
870+ @ NonBlocking
862871 public synchronized void unsubscribe (String name , MessageListener listener ) {
863872 Log .v (TAG , "unsubscribe(); channel = " + this .name + "; event = " + name );
864873 unsubscribeImpl (name , listener );
@@ -876,6 +885,7 @@ public synchronized void unsubscribe(String name, MessageListener listener) {
876885 * This listener is invoked on a background thread.
877886 * @throws AblyException
878887 */
888+ @ NonBlocking
879889 public synchronized void subscribe (String [] names , MessageListener listener ) throws AblyException {
880890 Log .v (TAG , "subscribe(); channel = " + this .name + "; (multiple events)" );
881891 for (String name : names )
@@ -894,6 +904,7 @@ public synchronized void subscribe(String[] names, MessageListener listener) thr
894904 * <p>
895905 * This listener is invoked on a background thread.
896906 */
907+ @ NonBlocking
897908 public synchronized void unsubscribe (String [] names , MessageListener listener ) {
898909 Log .v (TAG , "unsubscribe(); channel = " + this .name + "; (multiple events)" );
899910 for (String name : names )
@@ -1546,6 +1557,7 @@ public void getMessageVersionsAsync(String serial, Param[] params, Callback<Asyn
15461557 * @return A {@link PaginatedResult} object containing an array of {@link Message} objects.
15471558 * @throws AblyException
15481559 */
1560+ @ Blocking
15491561 public PaginatedResult <Message > history (Param [] params ) throws AblyException {
15501562 return historyImpl (ably .http , params ).sync ();
15511563 }
@@ -1579,6 +1591,7 @@ PaginatedResult<Message> history(Http http, Param[] params) throws AblyException
15791591 * @param callback Callback with {@link AsyncPaginatedResult} object containing an array of {@link Message} objects.
15801592 * @throws AblyException
15811593 */
1594+ @ NonBlocking
15821595 public void historyAsync (Param [] params , Callback <AsyncPaginatedResult <Message >> callback ) {
15831596 historyAsync (ably .http , params , callback );
15841597 }
@@ -1609,6 +1622,7 @@ private BasePaginatedQuery.ResultRequest<Message> historyImpl(Http http, Param[]
16091622 * @param options A {@link ChannelOptions} object.
16101623 * @throws AblyException
16111624 */
1625+ @ NonBlocking
16121626 public void setOptions (ChannelOptions options ) throws AblyException {
16131627 this .setOptions (options , null );
16141628 }
@@ -1621,6 +1635,7 @@ public void setOptions(ChannelOptions options) throws AblyException {
16211635 * @param listener An optional listener may be provided to notify of the success or failure of the operation.
16221636 * @throws AblyException
16231637 */
1638+ @ NonBlocking
16241639 public void setOptions (ChannelOptions options , CompletionListener listener ) throws AblyException {
16251640 this .options = options ;
16261641 this .messageEditsMixin = new MessageEditsMixin (basePath , ably .options , options , ably .auth );
0 commit comments