Class MessageWriter
java.lang.Object
java.io.Writer
org.eclipse.jetty.websocket.common.message.MessageWriter
- All Implemented Interfaces:
Closeable, Flushable, Appendable, AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BlockingWriteCallbackprivate ByteBufferprivate final org.eclipse.jetty.io.ByteBufferPoolprivate WriteCallbackprivate booleanprivate TextFrameprivate longprivate static final org.eclipse.jetty.util.log.Loggerprivate final OutgoingFramesprivate Utf8CharBuffer -
Constructor Summary
ConstructorsConstructorDescriptionMessageWriter(OutgoingFrames outgoing, int bufferSize, org.eclipse.jetty.io.ByteBufferPool bufferPool) MessageWriter(WebSocketSession session) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidflush()private voidflush(boolean fin) private voidnotifyFailure(Throwable failure) private voidprivate voidsend(char[] chars, int offset, int length) voidsetCallback(WriteCallback callback) voidwrite(char[] chars, int off, int len) voidwrite(int c)
-
Field Details
-
LOG
private static final org.eclipse.jetty.util.log.Logger LOG -
outgoing
-
bufferPool
private final org.eclipse.jetty.io.ByteBufferPool bufferPool -
blocker
-
frameCount
private long frameCount -
frame
-
buffer
-
utf
-
callback
-
closed
private boolean closed
-
-
Constructor Details
-
MessageWriter
-
MessageWriter
public MessageWriter(OutgoingFrames outgoing, int bufferSize, org.eclipse.jetty.io.ByteBufferPool bufferPool)
-
-
Method Details
-
write
- Specified by:
writein classWriter- Throws:
IOException
-
write
- Overrides:
writein classWriter- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Specified by:
flushin classWriter- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classWriter- Throws:
IOException
-
flush
- Throws:
IOException
-
send
- Throws:
IOException
-
setCallback
-
notifySuccess
private void notifySuccess() -
notifyFailure
-