Class MessageOutputStream
java.lang.Object
java.io.OutputStream
org.eclipse.jetty.websocket.common.message.MessageOutputStream
- All Implemented Interfaces:
Closeable, Flushable, AutoCloseable
Support for writing a single WebSocket BINARY message via a
OutputStream-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BlockingWriteCallbackprivate ByteBufferprivate final org.eclipse.jetty.io.ByteBufferPoolprivate WriteCallbackprivate booleanprivate BinaryFrameprivate longprivate static final org.eclipse.jetty.util.log.Loggerprivate final OutgoingFrames -
Constructor Summary
ConstructorsConstructorDescriptionMessageOutputStream(OutgoingFrames outgoing, int bufferSize, org.eclipse.jetty.io.ByteBufferPool bufferPool) MessageOutputStream(WebSocketSession session) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidflush()private voidflush(boolean fin) private voidnotifyFailure(Throwable failure) private voidprivate voidsend(byte[] bytes, int offset, int length) voidsetCallback(WriteCallback callback) voidwrite(byte[] bytes, int off, int len) voidwrite(int b) Methods inherited from class OutputStream
write
-
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
-
callback
-
closed
private boolean closed
-
-
Constructor Details
-
MessageOutputStream
-
MessageOutputStream
public MessageOutputStream(OutgoingFrames outgoing, int bufferSize, org.eclipse.jetty.io.ByteBufferPool bufferPool)
-
-
Method Details
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
write
- Specified by:
writein classOutputStream- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
flush
- Throws:
IOException
-
send
- Throws:
IOException
-
setCallback
-
notifySuccess
private void notifySuccess() -
notifyFailure
-