Java Code Examples for reactor.core.publisher.Flux#never()

The following examples show how to use reactor.core.publisher.Flux#never() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
private Flux<Object> pastEndTime(TopicContext topicContext) {
    if (topicContext.getFilter().getEndTime() == null) {
        return Flux.never();

    return Flux.empty().repeatWhen(Repeat.create(r -> !topicContext.isComplete(), Long.MAX_VALUE)
Example 2
public void subscribedTwiceDetectsSpecialSubscription() {
	Flux<String> flux = Flux.never();

	DefaultVerifySubscriber<String> s =
			new DefaultStepVerifierBuilder<String>(StepVerifierOptions.create().initialRequest(Long.MAX_VALUE), null)

	Operators.reportThrowInSubscribe(s, new RuntimeException("expected"));

Example 3
Source Project: reactor-core   File:    License: Apache License 2.0 5 votes vote down vote up
public void verifyNeverWithExpectTimeout() {
	Flux<String> flux = Flux.never();

Example 4
public Flux<Executable> executionPlans() {
    return Flux.never();
Example 5
public Flux<TaskRelocationEvent> events(TaskRelocationQuery query) {
    return Flux.never();
Example 6
public Flux<PodEvent> events() {
    return Flux.never();
Example 7
Source Project: reactor-netty   File:    License: Apache License 2.0 4 votes vote down vote up
public void exposesNettyPipelineConfiguration() throws InterruptedException {
	final int port = SocketUtils.findAvailableTcpPort();
	final CountDownLatch latch = new CountDownLatch(2);

	final TcpClient client = TcpClient.create().port(port);

	BiFunction<? super NettyInbound, ? super NettyOutbound, ? extends Publisher<Void>>
			serverHandler = (in, out) -> {
		  .subscribe(data -> {"data " + data + " on " + in);
		return Flux.never();

	TcpServer server = TcpServer.create()
	                            .doOnConnection(c -> c.addHandlerLast("codec",
	                                                                  new LineBasedFrameDecoder(8 * 1024)))

	DisposableServer connected = server.handle(serverHandler)


	Connection clientContext =
			client.handle((in, out) -> out.sendString(Flux.just("Hello World!\n", "Hello 11!\n")))


	assertTrue("Latch was counted down", latch.await(10, TimeUnit.SECONDS));