Class MessageNode
java.lang.Object
io.aether.cloud.client.MessageNode
- All Implemented Interfaces:
io.aether.utils.ToString
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal io.aether.utils.slots.EventConsumerWithQueue<byte[]> -
Constructor Summary
ConstructorsConstructorDescriptionMessageNode(AetherCloudClient client, UUID consumer, MessageEventListener strategy) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddConsumerConnectionOut(ConnectionWork connectionWork) voidaddConsumerServerOut(int id) voidaddConsumerServerOut(io.aether.api.common.ServerDescriptor serverDescriptor) booleanio.aether.utils.futures.AFuturesend(byte[] msg) voidsendMessageFromServerToClient(byte[] data) voidsetStrategy(MessageEventListener strategy) <LT> io.aether.net.fastMeta.MetaContexttoApi(io.aether.net.fastMeta.FastMetaApi<LT, ? extends LT> metaLt, LT localApi) <LT> voidtoApi(io.aether.net.fastMeta.MetaContext ctx, io.aether.net.fastMeta.FastMetaApi<LT, ? extends LT> metaLt) <LT> io.aether.net.fastMeta.MetaContexttoApiR(io.aether.net.fastMeta.FastMetaApi<LT, ? extends LT> metaLt, io.aether.utils.interfaces.AFunction<io.aether.net.fastMeta.MetaContext, LT> localApiFactory) io.aether.utils.AStringtoAString(io.aether.utils.AString sb) voidtoConsumer(io.aether.utils.interfaces.AConsumer<byte[]> o) toString()booleanAttempt to flush every queued message via the peer link in one pass.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.aether.utils.ToString
toString2
-
Field Details
-
bufferIn
public final io.aether.utils.slots.EventConsumerWithQueue<byte[]> bufferIn
-
-
Constructor Details
-
MessageNode
-
-
Method Details
-
toAString
public io.aether.utils.AString toAString(io.aether.utils.AString sb) - Specified by:
toAStringin interfaceio.aether.utils.ToString
-
toString
-
getStrategy
-
setStrategy
-
send
public io.aether.utils.futures.AFuture send(byte[] msg) -
isPeerProbeGraceActive
public boolean isPeerProbeGraceActive()- Returns:
- true while a LAN probe initiated by
send(byte[])is still within its grace window — the caller should keep the message queued and retrytryFlushAllViaPeer()on each tick.
-
tryFlushAllViaPeer
public boolean tryFlushAllViaPeer()Attempt to flush every queued message via the peer link in one pass.Called from
ConnectionWork.flushBackgroundRequests()while a peer-probe grace window is open. If the peer link has become established since the last tick, this delivers all pending messages directly throughConnectionPeer.sendMessage(UUID, byte[])and completes their futures. If the link is still not available, the messages stay queued and this method returnsfalseso the caller keeps waiting.- Returns:
trueif every queued message was handed off through the peer link;falseif the peer link is not ready
-
getConsumerUUID
-
addConsumerServerOut
public void addConsumerServerOut(int id) -
addConsumerServerOut
public void addConsumerServerOut(io.aether.api.common.ServerDescriptor serverDescriptor) -
addConsumerConnectionOut
-
sendMessageFromServerToClient
public void sendMessageFromServerToClient(byte[] data) -
toConsumer
public void toConsumer(io.aether.utils.interfaces.AConsumer<byte[]> o) -
toApiR
public <LT> io.aether.net.fastMeta.MetaContext toApiR(io.aether.net.fastMeta.FastMetaApi<LT, ? extends LT> metaLt, io.aether.utils.interfaces.AFunction<io.aether.net.fastMeta.MetaContext, LT> localApiFactory) -
toApi
public <LT> void toApi(io.aether.net.fastMeta.MetaContext ctx, io.aether.net.fastMeta.FastMetaApi<LT, ? extends LT> metaLt) -
toApi
public <LT> io.aether.net.fastMeta.MetaContext toApi(io.aether.net.fastMeta.FastMetaApi<LT, ? extends LT> metaLt, LT localApi)
-