public class TwitchDelaySender extends QueueProcessingThreadSender
QueueProcessingThreadSender using a single set delay.Thread.State, Thread.UncaughtExceptionHandler| Modifier and Type | Field and Description |
|---|---|
static int |
MOD_OP_PER_THIRTY_SECONDS
Number of commands per 30 seconds if only sending to channels in which
the client is moderator or operator.
|
static int |
NON_MOD_OP_PER_THIRTY_SECONDS
Number of commands per 30 seconds if ever sending out of channels in
which the client is not moderator or operator.
|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
TwitchDelaySender(@NonNull Client client,
@NonNull String name,
int perThirtySeconds)
Constructs the sending queue.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkReady(@NonNull String message)
Checks if the message can be sent yet, or at all.
|
static Function<Client.WithManagement,TwitchDelaySender> |
getSupplier()
Gets a supplier.
|
static Function<Client.WithManagement,TwitchDelaySender> |
getSupplier(boolean modOrOpOnly)
Gets a supplier.
|
beginSending, cleanup, getClient, getConsumer, pause, processElement, shutdowncontains, getQueue, queue, runactiveCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcontains, queuepublic static final int MOD_OP_PER_THIRTY_SECONDS
public static final int NON_MOD_OP_PER_THIRTY_SECONDS
public static Function<Client.WithManagement,TwitchDelaySender> getSupplier()
public static Function<Client.WithManagement,TwitchDelaySender> getSupplier(boolean modOrOpOnly)
modOrOpOnly - true if will only ever send to channels in which
the client is moderator or operatorprotected boolean checkReady(@NonNull String message)
QueueProcessingThreadSendercheckReady in class QueueProcessingThreadSendermessage - the message to be sentCopyright © 2013–2021 Kitteh. All rights reserved.