Type
- type of object listened topublic class Listener<Type> extends Object
Constructor and Description |
---|
Listener(@NonNull Client client,
@Nullable Consumer<Type> consumer) |
Modifier and Type | Method and Description |
---|---|
void |
queue(Type item)
Queues an item.
|
void |
removeConsumer()
Removes the consumer from the listener.
|
void |
setConsumer(@NonNull Consumer<Type> consumer)
Sets the consumer for the listener, starting a queue processing thread
if none existed.
|
void |
shutdown()
Shuts down the listener.
|
@NonNull String |
toString() |
public void queue(Type item)
item
- item to queuepublic void removeConsumer()
public void setConsumer(@NonNull Consumer<Type> consumer)
consumer
- new consumerpublic void shutdown()
Copyright © 2013–2019 Kitteh. All rights reserved.