io.reactivex.netty.channel.ChannelWriter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rx-netty Show documentation
Show all versions of rx-netty Show documentation
rx-netty developed by Netflix
/*
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.reactivex.netty.channel;
import io.netty.buffer.ByteBufAllocator;
import io.netty.channel.FileRegion;
import rx.Observable;
/**
* An interface to capture how one can write on a channel.
*
* @author Nitesh Kant
*/
public interface ChannelWriter {
Observable writeAndFlush(O msg);
void write(O msg);
void write(R msg, ContentTransformer transformer);
void writeBytes(byte[] msg);
void writeString(String msg);
void writeFileRegion(FileRegion region);
Observable flush();
void cancelPendingWrites(boolean mayInterruptIfRunning);
ByteBufAllocator getAllocator();
Observable writeAndFlush(R msg, ContentTransformer transformer);
Observable writeBytesAndFlush(byte[] msg);
Observable writeStringAndFlush(String msg);
Observable close();
Observable close(boolean flush);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy