All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.thorbenkuck.network.stream.DelegatingEventStream Maven / Gradle / Ivy

The newest version!
package com.github.thorbenkuck.network.stream;

import java.util.List;
import java.util.function.Supplier;

public class DelegatingEventStream implements ManagedEventStream {

    private final ManagedEventStream delegate;

    public DelegatingEventStream(ManagedEventStream delegate) {
        this.delegate = delegate;
    }

    @Override
    public void clearSubscribers() {
        delegate.clearSubscribers();
    }

    @Override
    public void close() {
        delegate.close();
    }

    @Override
    public void pause() {
        delegate.pause();
    }

    @Override
    public void pushError(Throwable throwable) {
        delegate.pushError(throwable);
    }

    @Override
    public void unPause() {
        delegate.unPause();
    }

    @Override
    public boolean isPaused() {
        return delegate.isPaused();
    }

    @Override
    public boolean isDisabled() {
        return delegate.isDisabled();
    }

    @Override
    public void setDisabled(boolean disabled) {
        delegate.setDisabled(disabled);
    }

    @Override
    public void push(T o) {
        delegate.push(o);
    }

    @Override
    public Subscription subscribe(Subscriber subscriber) {
        return delegate.subscribe(subscriber);
    }

    @Override
    public  EventStream pipe(Transformation transformation, Supplier> eventStreamFunction) {
        return delegate.pipe(transformation, eventStreamFunction);
    }

    @Override
    public List> getSubscriptions() {
        return delegate.getSubscriptions();
    }
}