Package com.openfin.desktop.channel
Class ChannelClient
- java.lang.Object
-
- com.openfin.desktop.channel.ChannelBase
-
- com.openfin.desktop.channel.ChannelClient
-
public class ChannelClient extends ChannelBase
-
-
Field Summary
-
Fields inherited from class com.openfin.desktop.channel.ChannelBase
afterAction, beforeAction, channel, channelActionMap, defaultAction, endpointIdentity, onError
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddChannelListener(ChannelListener listener)voiddisconnect(AckListener ackListener)Disconnect from the channel.voiddispatch(String action, org.json.JSONObject actionPayload, AckListener ackListener)Dispatch the given action to the channel provider.CompletableFuture<Ack>dispatchAsync(String action, Object actionPayload)booleanregister(String action, ChannelAction listener)Register an action to be called by ChannelProviderbooleanremoveChannelListener(ChannelListener listener)-
Methods inherited from class com.openfin.desktop.channel.ChannelBase
dispatch, dispatchAsync, getChannelId, getChannelName, getEndpointId, getEndpointIdentity, getName, getUuid, hasRegisteredAction, remove, setAfterAction, setBeforeAction, setDefaultAction, setOnError
-
-
-
-
Method Detail
-
dispatch
public void dispatch(String action, org.json.JSONObject actionPayload, AckListener ackListener)
Dispatch the given action to the channel provider.- Parameters:
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 request
-
dispatchAsync
public CompletableFuture<Ack> dispatchAsync(String action, Object actionPayload)
-
register
public boolean register(String action, ChannelAction listener)
Register an action to be called by ChannelProvider- Overrides:
registerin classChannelBase- Parameters:
action- Name of the action to be invoked by the channel providerlistener- Function representing the action to be taken on a client dispatch.- Returns:
- if the action was registered successfully
-
disconnect
public void disconnect(AckListener ackListener)
Disconnect from the channel.- Parameters:
ackListener- AckListener for the request
-
addChannelListener
public boolean addChannelListener(ChannelListener listener)
-
removeChannelListener
public boolean removeChannelListener(ChannelListener listener)
-
-