com.github.thorbenkuck.network.stream.SimpleSink Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of easy-net Show documentation
Show all versions of easy-net Show documentation
An EventStream driven, simple to use Client/Server framework
The newest version!
package com.github.thorbenkuck.network.stream;
import java.util.function.Consumer;
class SimpleSink implements Sink {
private final Consumer consumer;
SimpleSink(Consumer consumer) {
this.consumer = consumer;
}
@Override
public void push(T t) {
consumer.accept(t);
}
}