public class ChannelClient extends ChannelBase
afterAction, beforeAction, channel, channelActionMap, defaultAction, endpointIdentity, onError
Modifier and Type | Method and Description |
---|---|
boolean |
addChannelListener(ChannelListener listener) |
void |
disconnect(AckListener ackListener)
Disconnect from the channel.
|
void |
dispatch(String action,
org.json.JSONObject actionPayload,
AckListener ackListener)
Dispatch the given action to the channel provider.
|
CompletableFuture<Ack> |
dispatchAsync(String action,
Object actionPayload) |
boolean |
register(String action,
ChannelAction listener)
Register an action to be called by ChannelProvider
|
boolean |
removeChannelListener(ChannelListener listener) |
dispatch, dispatchAsync, getChannelId, getChannelName, getEndpointId, getEndpointIdentity, getName, getUuid, hasRegisteredAction, remove, setAfterAction, setBeforeAction, setDefaultAction, setOnError
public void dispatch(String action, org.json.JSONObject actionPayload, AckListener ackListener)
action
- Name of the action to be invoked by the channel provider.actionPayload
- Payload to be sent along with the action.ackListener
- AckListener for the requestpublic CompletableFuture<Ack> dispatchAsync(String action, Object actionPayload)
public boolean register(String action, ChannelAction listener)
register
in class ChannelBase
action
- Name of the action to be invoked by the channel providerlistener
- Function representing the action to be taken on a client dispatch.public void disconnect(AckListener ackListener)
ackListener
- AckListener for the requestpublic boolean addChannelListener(ChannelListener listener)
public boolean removeChannelListener(ChannelListener listener)
Copyright © 2022. All rights reserved.