Interface NettyEntityWriter
-
- All Known Implementing Classes:
NettyEntityWriter.DelayedEntityWriter,NettyEntityWriter.DirectEntityWriter
public interface NettyEntityWriterThe Entity Writer is used to write entity in Netty. One implementation is delayed, so that the complete message length can be set to Content-Length header.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classNettyEntityWriter.DelayedEntityWriterstatic classNettyEntityWriter.DirectEntityWriterstatic classNettyEntityWriter.TypeType of the entity writer.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description voidflush()Flushes the writen objects.io.netty.handler.stream.ChunkedInputgetChunkedInput()Get the netty Chunked Input to be written.static NettyEntityWritergetInstance(ClientRequest clientRequest, io.netty.channel.Channel channel)longgetLength()Get the length of the entity written to theOutputStreamOutputStreamgetOutputStream()Get theOutputStreamused to write an entityNettyEntityWriter.TypegetType()Return Type ofvoidwrite(Object object)Writes the Object to the channelvoidwriteAndFlush(Object object)Writes the Object to the channel and flush.
-
-
-
Method Detail
-
write
void write(Object object)
Writes the Object to the channel- Parameters:
object- object to be written
-
writeAndFlush
void writeAndFlush(Object object)
Writes the Object to the channel and flush.- Parameters:
object- object to be written
-
flush
void flush() throws IOExceptionFlushes the writen objects. Can throw IOException.- Throws:
IOException
-
getChunkedInput
io.netty.handler.stream.ChunkedInput getChunkedInput()
Get the netty Chunked Input to be written.- Returns:
- The Chunked input instance
-
getOutputStream
OutputStream getOutputStream()
Get theOutputStreamused to write an entity- Returns:
- the OutputStream to write an entity
-
getLength
long getLength()
Get the length of the entity written to theOutputStream- Returns:
-
getType
NettyEntityWriter.Type getType()
Return Type of- Returns:
-
getInstance
static NettyEntityWriter getInstance(ClientRequest clientRequest, io.netty.channel.Channel channel)
-
-