org.webpieces.http2client.impl.Proxy2StreamRef Maven / Gradle / Ivy
package org.webpieces.http2client.impl;
import org.webpieces.util.futures.XFuture;
import com.webpieces.http2.api.dto.lowlevel.CancelReason;
import com.webpieces.http2.api.streaming.StreamRef;
import com.webpieces.http2.api.streaming.StreamWriter;
public class Proxy2StreamRef implements StreamRef {
private StreamRef ref;
private XFuture writer;
public Proxy2StreamRef(StreamRef ref, XFuture writer) {
this.ref = ref;
this.writer = writer;
}
@Override
public XFuture getWriter() {
return writer;
}
@Override
public XFuture cancel(CancelReason reason) {
if(ref != null)
return ref.cancel(reason);
return XFuture.completedFuture(null);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy