Class ClientChannel
- java.lang.Object
-
- io.gravitee.cockpit.connectors.ws.channel.ClientChannel
-
public class ClientChannel extends Object
- Author:
- Jeoffrey HAEYAERT (jeoffrey.haeyaert at graviteesource.com), GraviteeSource Team
-
-
Constructor Summary
Constructors Constructor Description ClientChannel(io.vertx.core.http.WebSocket webSocket, io.gravitee.node.api.Node node, io.gravitee.cockpit.api.command.CommandProducer<io.gravitee.cockpit.api.command.hello.HelloCommand,io.gravitee.cockpit.api.command.hello.HelloReply> helloCommandProducer, Map<io.gravitee.cockpit.api.command.Command.Type,io.gravitee.cockpit.api.command.CommandHandler<io.gravitee.cockpit.api.command.Command<?>,io.gravitee.cockpit.api.command.Reply>> commandHandlers, io.gravitee.plugin.core.api.PluginManifest pluginManifest, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanup()io.reactivex.rxjava3.core.Completableclose()io.reactivex.rxjava3.core.Single<io.gravitee.cockpit.api.command.hello.HelloReply>init()voidonClose(ClientChannelEventHandler closeHandler)voidonPrimary(ClientChannelEventHandler onPrimaryHandler)voidonReplica(ClientChannelEventHandler onReplicaHandler)io.reactivex.rxjava3.core.Single<io.gravitee.cockpit.api.command.Reply>send(io.gravitee.cockpit.api.command.Command<? extends io.gravitee.cockpit.api.command.Payload> command)
-
-
-
Constructor Detail
-
ClientChannel
public ClientChannel(io.vertx.core.http.WebSocket webSocket, io.gravitee.node.api.Node node, io.gravitee.cockpit.api.command.CommandProducer<io.gravitee.cockpit.api.command.hello.HelloCommand,io.gravitee.cockpit.api.command.hello.HelloReply> helloCommandProducer, Map<io.gravitee.cockpit.api.command.Command.Type,io.gravitee.cockpit.api.command.CommandHandler<io.gravitee.cockpit.api.command.Command<?>,io.gravitee.cockpit.api.command.Reply>> commandHandlers, io.gravitee.plugin.core.api.PluginManifest pluginManifest, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Detail
-
init
public io.reactivex.rxjava3.core.Single<io.gravitee.cockpit.api.command.hello.HelloReply> init()
-
close
public io.reactivex.rxjava3.core.Completable close()
-
cleanup
public void cleanup()
-
send
public io.reactivex.rxjava3.core.Single<io.gravitee.cockpit.api.command.Reply> send(io.gravitee.cockpit.api.command.Command<? extends io.gravitee.cockpit.api.command.Payload> command)
-
onClose
public void onClose(ClientChannelEventHandler closeHandler)
-
onPrimary
public void onPrimary(ClientChannelEventHandler onPrimaryHandler)
-
onReplica
public void onReplica(ClientChannelEventHandler onReplicaHandler)
-
-