Examples of Action0


Examples of rx.functions.Action0

                    });
                } else {
                    return Observable.error(new AssertionError("Unexpected response code: " + response.getStatus().code()));
                }
            }
        }).finallyDo(new Action0() {
            @Override
            public void call() {
                completionLatch.countDown();
            }
        }).toBlocking().forEach(new Action1<String>() {
View Full Code Here

Examples of rx.functions.Action0

                    @Override
                    public Observable<ByteBuf> call(HttpClientResponse<ByteBuf> response) {
                        toReturnRef.set(response);
                        return response.getContent();
                    }
                }).finallyDo(new Action0() {
                    @Override
                    public void call() {
                        completionLatch.countDown();

                    }
View Full Code Here

Examples of rx.functions.Action0

                              });
        ObservableConnection<HttpClientResponse<ByteBuf>, HttpClientRequest<ByteBuf>> conn = connectionObservable.toBlocking().last();
        Assert.assertFalse("Connection already closed.", conn.isCloseIssued());

        final CountDownLatch responseCompleteLatch = new CountDownLatch(1);
        content.finallyDo(new Action0() {
            @Override
            public void call() {
                responseCompleteLatch.countDown();
            }
        }).subscribe();
View Full Code Here

Examples of rx.functions.Action0

        ObservableConnection<String, String> conn = pool.acquire().toBlocking().last();
        Assert.assertEquals("Unexpected pool idle count.", 0, stats.getIdleCount());
        Assert.assertEquals("Unexpected pool in-use count.", 1, stats.getInUseCount());
        Assert.assertEquals("Unexpected pool total connections count.", 1, stats.getTotalConnectionCount());
        final CountDownLatch writeFinishLatch = new CountDownLatch(1);
        conn.writeAndFlush("Hi").finallyDo(new Action0() {
            @Override
            public void call() {
                writeFinishLatch.countDown();
            }
        });
View Full Code Here

Examples of rx.functions.Action0

              logger.debug("Connection: "+connection.toString()+" unsubscribed");
            }
            return Observable.empty();
          }
        })
        .doOnCompleted(new Action0(){
          @Override
          public void call() {
            // connection closed, remote slot
            releaseSlot(slottingStrategyReference.getValue(), connection);
            logger.debug("Connection: "+connection.toString()+" closed");
View Full Code Here

Examples of rx.functions.Action0

                          responseHolder.add(response);
                          return response.getContent();
                      }
                  })
                  .ignoreElements()
                  .finallyDo(new Action0() {
                      @Override
                      public void call() {
                          finishLatch.countDown();
                      }
                  })
View Full Code Here

Examples of rx.functions.Action0

                            Notification<Void> notification) {
                        return !notification
                                .isOnError();
                    }
                })
                .finallyDo(new Action0() {
                    @Override
                    public void call() {
                        System.out.println(" --> Closing connection and stream");
                    }
                })
View Full Code Here

Examples of rx.functions.Action0

                                                + "\nCommands => subscribe:, unsubscribe:\n");
                                    }
                                    return Observable.empty();
                                }
                            }
                        }).finallyDo(new Action0() {
                            @Override
                            public void call() {
                                System.out.println("--- Connection Closed ---");
                            }
                        });
View Full Code Here

Examples of rx.functions.Action0

                });

                // wait for the helloMessage then start the output and receive echo input
                return Observable.concat(helloMessage, Observable.merge(intervalOutput, echo));
            }
        }).take(10).doOnCompleted(new Action0() {
            @Override
            public void call() {
                System.out.println("COMPLETED!");
            }
        }).toBlocking().toIterable();
View Full Code Here

Examples of rx.functions.Action0

                });

                // wait for the helloMessage then start the output and receive echo input
                return Observable.concat(helloMessage, Observable.merge(intervalOutput, echo));
            }
        }).take(10).doOnCompleted(new Action0() {
            @Override
            public void call() {
                System.out.println("COMPLETED!");
            }
        }).toBlocking().toIterable();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.