Class ChannelClient

    • 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
      • register

        public boolean register​(String action,
                                ChannelAction listener)
        Register an action to be called by ChannelProvider
        Overrides:
        register in class ChannelBase
        Parameters:
        action - Name of the action to be invoked by the channel provider
        listener - 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)