public class ChannelProvider extends ChannelBase
afterAction, beforeAction, channel, channelActionMap, defaultAction, endpointIdentity, onError| Modifier and Type | Method and Description |
|---|---|
boolean |
addProviderListener(ChannelProviderListener listener)
Add a listener for channel provider events
|
void |
destroy(AckListener ackListener)
Destroy the channel
|
protected void |
fireClientConnectEvent(ChannelClientConnectEvent event) |
protected void |
fireClientDisconnectEvent(ChannelClientConnectEvent event) |
void |
processConnection(org.json.JSONObject clientIdentity,
org.json.JSONObject connectionPayload) |
void |
publish(String action,
org.json.JSONObject actionPayload,
AckListener ackListener)
Publish an action and payload to every connected client.
|
boolean |
register(String action,
ChannelAction listener)
Register an action to be called by ChannelClient
|
boolean |
removeProviderListener(ChannelProviderListener listener)
Add a ChannelProviderListener
|
dispatch, dispatchAsync, getChannelId, getChannelName, getEndpointId, getEndpointIdentity, getName, getUuid, hasRegisteredAction, remove, setAfterAction, setBeforeAction, setDefaultAction, setOnErrorpublic void destroy(AckListener ackListener)
ackListener - AckListener for the requestpublic void processConnection(org.json.JSONObject clientIdentity,
org.json.JSONObject connectionPayload)
throws Exception
Exceptionpublic void publish(String action, org.json.JSONObject actionPayload, AckListener ackListener)
action - Name of the action to be invoked by the channel clientactionPayload - Payload to be sent along with the action.ackListener - AckListener for the requestpublic boolean register(String action, ChannelAction listener)
register in class ChannelBaseaction - Name of the action to be invoked by the channel clientlistener - Function representing the action to be taken on a client dispatch.public boolean addProviderListener(ChannelProviderListener listener)
listener - listener to addpublic boolean removeProviderListener(ChannelProviderListener listener)
listener - listener to removeprotected void fireClientConnectEvent(ChannelClientConnectEvent event) throws Exception
Exceptionprotected void fireClientDisconnectEvent(ChannelClientConnectEvent event)
Copyright © 2022. All rights reserved.