Class IncomingStream
java.lang.Object
services.moleculer.stream.IncomingStream
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AtomicBooleanprotected final StringCurrrent nodeID.protected longprotected final PacketStreamInternal stream with listeners.protected longTimestamp of the next timeout (0 = no timeout).protected final longStream inactivity/read timeout in MILLISECONDS (0 = no timeout). -
Constructor Summary
ConstructorsConstructorDescriptionIncomingStream(String nodeID, ScheduledExecutorService scheduler, long timeoutMillis) -
Method Summary
Modifier and TypeMethodDescriptionvoidlongbooleaninited()protected booleanprocessMessage(io.datatree.Tree message) booleanreceive(io.datatree.Tree message) voidreset()Used for testing.
-
Field Details
-
nodeID
Currrent nodeID. -
stream
Internal stream with listeners. -
timeoutMillis
protected final long timeoutMillisStream inactivity/read timeout in MILLISECONDS (0 = no timeout). -
timeoutAt
protected volatile long timeoutAtTimestamp of the next timeout (0 = no timeout). -
prevSeq
protected volatile long prevSeq -
pool
-
inited
-
-
Constructor Details
-
IncomingStream
-
-
Method Details
-
reset
public void reset()Used for testing. Resets internal variables. -
error
-
inited
public boolean inited() -
receive
public boolean receive(io.datatree.Tree message) -
processMessage
protected boolean processMessage(io.datatree.Tree message) -
getTimeoutAt
public long getTimeoutAt() -
getPacketStream
-