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
ConstructorsConstructorDescriptionDirectEntityWriter(io.netty.channel.Channel channel, NettyEntityWriter.Type type) -
Method Summary
Modifier and TypeMethodDescriptionvoidflush()Flushes the writen objects.io.netty.handler.stream.ChunkedInput<io.netty.buffer.ByteBuf>Get the netty Chunked Input to be written.longGet the length of the entity written to theOutputStreamGet theOutputStreamused to write an entitygetType()Return Type of theNettyEntityWriter.voidWrites the Object to the channelvoidwriteAndFlush(Object object) Writes the Object to the channel and flush.
-
Constructor Details
-
DirectEntityWriter
-
-
Method Details
-
write
Description copied from interface:NettyEntityWriterWrites the Object to the channel- Specified by:
writein interfaceNettyEntityWriter- Parameters:
object- object to be written
-
writeAndFlush
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<io.netty.buffer.ByteBuf> getChunkedInput()Description copied from interface:NettyEntityWriterGet the netty Chunked Input to be written.- Specified by:
getChunkedInputin interfaceNettyEntityWriter- Returns:
- The Chunked input instance
-
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:
- length of the entity.
-
getType
Description copied from interface:NettyEntityWriterReturn Type of theNettyEntityWriter.- Specified by:
getTypein interfaceNettyEntityWriter- Returns:
- type of the writer.
-