Class NettyEntityWriter.DirectEntityWriter
- java.lang.Object
-
- org.glassfish.jersey.netty.connector.internal.NettyEntityWriter.DirectEntityWriter
-
- All Implemented Interfaces:
NettyEntityWriter
- Enclosing interface:
- NettyEntityWriter
public static class NettyEntityWriter.DirectEntityWriter extends Object implements NettyEntityWriter
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.glassfish.jersey.netty.connector.internal.NettyEntityWriter
NettyEntityWriter.DelayedEntityWriter, NettyEntityWriter.DirectEntityWriter, NettyEntityWriter.Type
-
-
Constructor Summary
Constructors Constructor Description DirectEntityWriter(io.netty.channel.Channel channel, NettyEntityWriter.Type type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidflush()Flushes the writen objects.io.netty.handler.stream.ChunkedInputgetChunkedInput()Get the netty Chunked Input to be written.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.
-
-
-
Constructor Detail
-
DirectEntityWriter
public DirectEntityWriter(io.netty.channel.Channel channel, NettyEntityWriter.Type type)
-
-
Method Detail
-
write
public void write(Object object)
Description copied from interface:NettyEntityWriterWrites the Object to the channel- Specified by:
writein interfaceNettyEntityWriter- Parameters:
object- object to be written
-
writeAndFlush
public void writeAndFlush(Object object)
Description copied from interface:NettyEntityWriterWrites the Object to the channel and flush.- Specified by:
writeAndFlushin interfaceNettyEntityWriter- Parameters:
object- object to be written
-
flush
public void flush()
Description copied from interface:NettyEntityWriterFlushes the writen objects. Can throw IOException.- Specified by:
flushin interfaceNettyEntityWriter
-
getChunkedInput
public io.netty.handler.stream.ChunkedInput getChunkedInput()
Description copied from interface:NettyEntityWriterGet the netty Chunked Input to be written.- Specified by:
getChunkedInputin interfaceNettyEntityWriter- Returns:
- The Chunked input instance
-
getOutputStream
public OutputStream getOutputStream()
Description copied from interface:NettyEntityWriterGet theOutputStreamused to write an entity- Specified by:
getOutputStreamin interfaceNettyEntityWriter- Returns:
- the OutputStream to write an entity
-
getLength
public long getLength()
Description copied from interface:NettyEntityWriterGet the length of the entity written to theOutputStream- Specified by:
getLengthin interfaceNettyEntityWriter- Returns:
-
getType
public NettyEntityWriter.Type getType()
Description copied from interface:NettyEntityWriterReturn Type of- Specified by:
getTypein interfaceNettyEntityWriter- Returns:
-
-