MessageSender.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final int | HEADER_LEN
Header length of X Protocol packet. |
| private long | |
| private int | |
| private OutputStream | |
| private long | |
| pack-priv final Lock | syncOperationLock
Lock to protect async writes from sync ones. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public long | getLastPacketSentTime()
Overrides default com. Returns the send time of a very recent packet. |
| public long | getPreviousPacketSentTime()
Overrides default com. Returns the send time of a previous packet. |
| public void | send(XMessage
Message instanceOverrides default com. Synchronously send the message to server. |
| public CompletableFuture | send(XMessage
message extending message, CompletableFuture<?> Messagea Future returning operation result future, Runnable a callback to receive notification of when the message is completely written callback)Overrides default com. Asynchronously write a message with a notification being delivered to |
| public void | setMaxAllowedPacket(int
max allowed packet size maxAllowedPacket)Overrides default com. Set max allowed packet size. |
| HEADER_LEN | back to summary |
|---|---|
| pack-priv static final int HEADER_LEN Header length of X Protocol packet. | |
| lastPacketSentTime | back to summary |
|---|---|
| private long lastPacketSentTime | |
| maxAllowedPacket | back to summary |
|---|---|
| private int maxAllowedPacket | |
| outputStream | back to summary |
|---|---|
| private OutputStream outputStream | |
| previousPacketSentTime | back to summary |
|---|---|
| private long previousPacketSentTime | |
| syncOperationLock | back to summary |
|---|---|
| pack-priv final Lock syncOperationLock Lock to protect async writes from sync ones. | |
| SyncMessageSender | back to summary |
|---|---|
| public SyncMessageSender(OutputStream os) | |
| getLastPacketSentTime | back to summary |
|---|---|
| public long getLastPacketSentTime() Overrides default com. Doc from com. Returns the send time of a very recent packet. Should be used in exception generation when the send operation failed.
| |
| getPreviousPacketSentTime | back to summary |
|---|---|
| public long getPreviousPacketSentTime() Overrides default com. Doc from com. Returns the send time of a previous packet. Should be used in exception generation when the send operation was successful but the following read operation failed.
| |
| send | back to summary |
|---|---|
| public void send(XMessage message) Overrides default com. Doc from com. Synchronously send the message to server. | |
| send | back to summary |
|---|---|
| public CompletableFuture Overrides default com. Doc from com. Asynchronously write a message with a notification being delivered to
| |
| setMaxAllowedPacket | back to summary |
|---|---|
| public void setMaxAllowedPacket(int maxAllowedPacket) Overrides default com. Doc from com. Set max allowed packet size.
| |