Package io.activej.csp.net
Class Messaging<I,O>
java.lang.Object
io.activej.reactor.AbstractReactive
io.activej.reactor.ImplicitlyReactive
io.activej.async.process.AbstractAsyncCloseable
io.activej.csp.net.Messaging<I,O>
- All Implemented Interfaces:
io.activej.async.process.AsyncCloseable,IMessaging<I,,O> io.activej.reactor.Reactive
public final class Messaging<I,O>
extends io.activej.async.process.AbstractAsyncCloseable
implements IMessaging<I,O>
Represents a simple binary protocol over for communication a TCP connection.
-
Field Summary
Fields inherited from class io.activej.reactor.AbstractReactive
reactorFields inherited from interface io.activej.async.process.AsyncCloseable
STATIC -
Method Summary
Modifier and TypeMethodDescriptionstatic <I,O> Messaging<I, O> create(ITcpSocket socket, ByteBufsCodec<I, O> serializer) protected voidio.activej.promise.Promise<I>receive()ChannelSupplier<io.activej.bytebuf.ByteBuf>io.activej.promise.Promise<Void>ChannelConsumer<io.activej.bytebuf.ByteBuf>io.activej.promise.Promise<Void>toString()Methods inherited from class io.activej.async.process.AbstractAsyncCloseable
closeEx, doSanitize, getCloseable, getException, isClosed, onCleanup, sanitize, setCloseableMethods inherited from class io.activej.reactor.AbstractReactive
getReactorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.activej.async.process.AsyncCloseable
close, closeEx
-
Method Details
-
create
-
receive
- Specified by:
receivein interfaceIMessaging<I,O>
-
send
- Specified by:
sendin interfaceIMessaging<I,O>
-
sendEndOfStream
- Specified by:
sendEndOfStreamin interfaceIMessaging<I,O>
-
sendBinaryStream
- Specified by:
sendBinaryStreamin interfaceIMessaging<I,O>
-
receiveBinaryStream
- Specified by:
receiveBinaryStreamin interfaceIMessaging<I,O>
-
onClosed
- Overrides:
onClosedin classio.activej.async.process.AbstractAsyncCloseable
-
toString
-