MessageHandler.Whole .
For the first received message MessageHandler. is called in a new Thread to
allow blocking reading of passed java..
| Modifier and Type | Field and Description |
|---|---|
| private final List | |
| private volatile int | |
| private final Condition | |
| private volatile int | |
| private final ExecutorService | |
| private volatile BufferedInputStream | |
| private final ReentrantLock | |
| private static final Logger | |
| private volatile MessageHandler. | |
| private volatile boolean | |
| private volatile boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | appendMessagePart(ByteBuffer
the message. message, boolean should be last)true iff this is the last part of the message, false otherwise.Append next message part to the buffer. |
| private void | |
| public void | |
| public int | |
| pack-priv void | |
| public void | |
| public void | setMessageHandler(MessageHandler.
MessageHandler that will consume the constructed java..Set the |
| bufferedFragments | back to summary |
|---|---|
| private final List<ByteBuffer> bufferedFragments | |
| bufferSize | back to summary |
|---|---|
| private volatile int bufferSize | |
| condition | back to summary |
|---|---|
| private final Condition condition | |
| currentlyBuffered | back to summary |
|---|---|
| private volatile int currentlyBuffered | |
| executorService | back to summary |
|---|---|
| private final ExecutorService executorService | |
| inputStream | back to summary |
|---|---|
| private volatile BufferedInputStream inputStream | |
| lock | back to summary |
|---|---|
| private final ReentrantLock lock | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| messageHandler | back to summary |
|---|---|
| private volatile MessageHandler. | |
| receivedLast | back to summary |
|---|---|
| private volatile boolean receivedLast | |
| sessionClosed | back to summary |
|---|---|
| private volatile boolean sessionClosed | |
| InputStreamBuffer | back to summary |
|---|---|
| public InputStreamBuffer(ExecutorService executorService) Constructor. | |
| appendMessagePart | back to summary |
|---|---|
| public void appendMessagePart(ByteBuffer message, boolean last) Append next message part to the buffer.
| |
| checkClosedSession | back to summary |
|---|---|
| private void checkClosedSession() throws IOException | |
| finishReading | back to summary |
|---|---|
| public void finishReading() Finish reading of the buffer. | |
| getNextByte | back to summary |
|---|---|
| public int getNextByte() throws IOException Get next received bytes.
| |
| onSessionClosed | back to summary |
|---|---|
| pack-priv void onSessionClosed() | |
| resetBuffer | back to summary |
|---|---|
| public void resetBuffer(int bufferSize) Reset the buffer size.
| |
| setMessageHandler | back to summary |
|---|---|
| public void setMessageHandler(MessageHandler. Set the
| |