| Modifier and Type | Method and Description |
|---|---|
Endpoint |
MessagingService.endpoint()
Returns the local messaging service endpoint.
|
static Endpoint |
Endpoint.from(String host,
int port)
Returns an endpoint for the given host/port.
|
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<byte[]> |
MessagingService.sendAndReceive(Endpoint ep,
String type,
byte[] payload)
Sends a message asynchronously and expects a response.
|
CompletableFuture<byte[]> |
MessagingService.sendAndReceive(Endpoint ep,
String type,
byte[] payload,
Executor executor)
Sends a message synchronously and expects a response.
|
CompletableFuture<Void> |
MessagingService.sendAsync(Endpoint ep,
String type,
byte[] payload)
Sends a message asynchronously to the specified communication end point.
|
| Modifier and Type | Method and Description |
|---|---|
void |
MessagingService.registerHandler(String type,
BiConsumer<Endpoint,byte[]> handler,
Executor executor)
Registers a new message handler for message type.
|
void |
MessagingService.registerHandler(String type,
BiFunction<Endpoint,byte[],byte[]> handler,
Executor executor)
Registers a new message handler for message type.
|
void |
MessagingService.registerHandler(String type,
BiFunction<Endpoint,byte[],CompletableFuture<byte[]>> handler)
Registers a new message handler for message type.
|
Copyright © 2013–2018. All rights reserved.