T - the message typepublic final class ChannelPublisher<T> extends Object implements Terminable
EMPTY| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this resource.
|
static <T> ChannelPublisher<T> |
create(Channel<T> channel,
long duration,
TimeUnit unit,
Supplier<? extends T> supplier)
Creates a new channel publisher.
|
static <T> ChannelPublisher<T> |
create(Channel<T> channel,
long duration,
TimeUnit unit,
ThreadContext threadContext,
Supplier<? extends T> supplier)
Creates a new channel publisher.
|
Channel<T> |
getChannel()
Gets the channel
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbindWith, closeAndReportException, closeSilently, isClosed@Nonnull public static <T> ChannelPublisher<T> create(@Nonnull Channel<T> channel, long duration, @Nonnull TimeUnit unit, @Nonnull ThreadContext threadContext, @Nonnull Supplier<? extends T> supplier)
T - the type of the messagechannel - the channelduration - the duration to wait between publishingunit - the unit of durationthreadContext - the context to call the supplier insupplier - the message supplier@Nonnull public static <T> ChannelPublisher<T> create(@Nonnull Channel<T> channel, long duration, @Nonnull TimeUnit unit, @Nonnull Supplier<? extends T> supplier)
T - the type of the messagechannel - the channelduration - the duration to wait between publishingunit - the unit of durationsupplier - the message supplierpublic void close()
Terminableclose in interface AutoCloseableclose in interface TerminableCopyright © 2022. All rights reserved.