Example usage for io.netty.util.concurrent ScheduledFuture isSuccess

List of usage examples for io.netty.util.concurrent ScheduledFuture isSuccess

Introduction

In this page you can find the example usage for io.netty.util.concurrent ScheduledFuture isSuccess.

Prototype

boolean isSuccess();

Source Link

Document

Returns true if and only if the I/O operation was completed successfully.

Usage

From source file:org.jboss.aerogear.simplepush.server.netty.StubEmbeddedEventLoop.java

License:Apache License

@Override
public ScheduledFuture<?> scheduleAtFixedRate(Runnable ignored, long initialDelay, long period, TimeUnit unit) {
    final ScheduledFuture<?> future = mock(ScheduledFuture.class);
    when(future.isSuccess()).thenReturn(Boolean.TRUE);
    when(future.isDone()).thenReturn(Boolean.TRUE);
    when(future.isCancelled()).thenReturn(Boolean.FALSE);
    return future;
}