Class ChannelProvider

    • Method Detail

      • destroy

        public void destroy​(AckListener ackListener)
        Destroy the channel
        Parameters:
        ackListener - AckListener for the request
      • processConnection

        public void processConnection​(org.json.JSONObject clientIdentity,
                                      org.json.JSONObject connectionPayload)
                               throws Exception
        Throws:
        Exception
      • publish

        public void publish​(String action,
                            org.json.JSONObject actionPayload,
                            AckListener ackListener)
        Publish an action and payload to every connected client.
        Parameters:
        action - Name of the action to be invoked by the channel client
        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 ChannelClient
        Overrides:
        register in class ChannelBase
        Parameters:
        action - Name of the action to be invoked by the channel client
        listener - Function representing the action to be taken on a client dispatch.
        Returns:
        if the action was registered successfully
      • addProviderListener

        public boolean addProviderListener​(ChannelProviderListener listener)
        Add a listener for channel provider events
        Parameters:
        listener - listener to add
        Returns:
      • removeProviderListener

        public boolean removeProviderListener​(ChannelProviderListener listener)
        Add a ChannelProviderListener
        Parameters:
        listener - listener to remove
        Returns: