Interface UDPCommandListener

    • Method Detail

      • commandExecuted

        void commandExecuted​(String[] commandArguments)

        Invoked when the command the listener is registered for is executed. The arguments that were specified for the command are available from the commandArguments String array.

        If the listener has been registered multiple times for the same command, then it will be informed of a single execution of that command multiple times.

        If the listener has been registered to listen to multiple commands, then it can identify which command was executed from the first (element 0) command argument - this is always the name of the command itself.

        The listener should never try to remove itself (or any other UDPCommandlistener), or add a UDPCommandlistener within this method. If the listener needs to do this, then it should be done on a separate thread.

        Parameters:
        commandArguments - An array of the arguments with which the the command was executed. The 0th element is the command itself.