Top Description Inners Fields Constructors Methods
io.undertow.websockets.core

public Class BufferedBinaryMessage

extends Object
Class Inheritance
Imports
io.undertow.util.ImmediatePooled, org.xnio.ChannelListener, .Pooled, io.undertow.connector.PooledByteBuffer, java.io.IOException, java.nio.ByteBuffer, java.util.ArrayList, .Collections, .List

A buffered binary message.
Author
Stuart Douglas

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
BufferedBinaryMessage.PooledByteBufferArray

References Deprecated Pooled is deprecated or references (maybe indirectly) at least one deprecated element.

Field Summary

Modifier and TypeField and Description
private final boolean
private boolean
private PooledByteBuffer
private long
private List<PooledByteBuffer>
private final long

Constructor Summary

AccessConstructor and Description
public
BufferedBinaryMessage(long maxMessageSize, boolean bufferFullMessage)

public
BufferedBinaryMessage(boolean bufferFullMessage)

Method Summary

Modifier and TypeMethod and Description
private void
private void
public Pooled<ByteBuffer[]>
getData()
References Deprecated Pooled is deprecated or references (maybe indirectly) at least one deprecated element.

public boolean
public void
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bufferFullMessageback to summary
private final boolean bufferFullMessage
completeback to summary
private boolean complete
currentback to summary
private PooledByteBuffer current
currentSizeback to summary
private long currentSize
databack to summary
private List<PooledByteBuffer> data
maxMessageSizeback to summary
private final long maxMessageSize

Constructor Detail

BufferedBinaryMessageback to summary
public BufferedBinaryMessage(long maxMessageSize, boolean bufferFullMessage)
BufferedBinaryMessageback to summary
public BufferedBinaryMessage(boolean bufferFullMessage)

Method Detail

checkMaxSizeback to summary
private void checkMaxSize(StreamSourceFrameChannel channel, int res) throws IOException
dealWithFullBufferback to summary
private void dealWithFullBuffer(StreamSourceFrameChannel channel)
getDataback to summary
public Pooled<ByteBuffer[]> getData()

References Deprecated

Pooled is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

isCompleteback to summary
public boolean isComplete()
readback to summary
public void read(final StreamSourceFrameChannel channel, final WebSocketCallback<BufferedBinaryMessage> callback)
readBlockingback to summary
public void readBlocking(StreamSourceFrameChannel channel) throws IOException
io.undertow.websockets.core back to summary

private final Class BufferedBinaryMessage.PooledByteBufferArray

extends Object
implements Pooled<ByteBuffer[]>
Class Inheritance
  • java.lang.Object
  • io.undertow.websockets.core.BufferedBinaryMessage.PooledByteBufferArray
All Implemented Interfaces
org.xnio.Pooled, java.lang.AutoCloseable

References Deprecated

Pooled is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Field Summary

Modifier and TypeField and Description
private final ByteBuffer[]
private final List<PooledByteBuffer>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements org.xnio.Pooled.close.

Delegates to free().

public void
discard()

Implements org.xnio.Pooled.discard.

Discard this resource.

public void
free()

Implements org.xnio.Pooled.free.

Free this resource for immediate re-use.

public ByteBuffer[]
getResource()

Implements org.xnio.Pooled.getResource.

Get the pooled resource.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

databack to summary
private final ByteBuffer[] data
pooledback to summary
private final List<PooledByteBuffer> pooled

Constructor Detail

PooledByteBufferArrayback to summary
private PooledByteBufferArray(List<PooledByteBuffer> pooled, ByteBuffer[] data)

Method Detail

closeback to summary
public void close()

Implements org.xnio.Pooled.close.

Doc from org.xnio.Pooled.close.

Delegates to free().

Annotations
@Override
discardback to summary
public void discard()

Implements org.xnio.Pooled.discard.

Doc from org.xnio.Pooled.discard.

Discard this resource. Any backing resources corresponding to this pooled resource will be rendered unavailable until the pooled resource has been garbage-collected.

Annotations
@Override
freeback to summary
public void free()

Implements org.xnio.Pooled.free.

Doc from org.xnio.Pooled.free.

Free this resource for immediate re-use. The resource must not be accessed again after calling this method; if it is possible that an instance is still in use, you must call discard() instead.

Annotations
@Override
getResourceback to summary
public ByteBuffer[] getResource() throws IllegalStateException

Implements org.xnio.Pooled.getResource.

Doc from org.xnio.Pooled.getResource.

Get the pooled resource.

Returns:ByteBuffer[]

the pooled resource

Annotations
@Override
Exceptions
IllegalStateException:
if the resource has been freed or discarded already