com.jscape.inet.terminal.events

## Class CommandEvent

- java.lang.Object
- - com.jscape.inet.terminal.events.CommandEvent

- All Implemented Interfaces:
    TerminalEvent

      public class CommandEvent
      extends java.lang.Object
      implements TerminalEvent

  Represents `Terminal` command event. This event is generated when new control command comes. Holds information about incoming command.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CommandEvent(java.lang.String canonicalForm, java.lang.String value)` Creates `CommandEvent` object giving "canonical" form and value of incoming control command.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `accept(TerminalListener listener)` Calls correct callback method of `TerminalListener` object.
    `java.lang.String` | `getCanonicalForm()` Returns "canonical" form of incoming command.
    `java.lang.String` | `getValue()` Returns string representation of control command

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CommandEvent

          public CommandEvent(java.lang.String canonicalForm,
                              java.lang.String value)

      Creates `CommandEvent` object giving "canonical" form and value of incoming control command.
      Parameters:
        `canonicalForm` - "canonical" form.
        `value` - string representation of control command.

  - ### Method Detail

    - #### getCanonicalForm

          public java.lang.String getCanonicalForm()

      Returns "canonical" form of incoming command.
      Returns:
        "canonical" form of incoming command.

    - #### getValue

          public java.lang.String getValue()

      Returns string representation of control command
      Returns:
        string representation of control command

    - #### accept

          public void accept(TerminalListener listener)

      Calls correct callback method of `TerminalListener` object.
      Specified by:
        `accept` in interface `TerminalEvent`
      Parameters:
        `listener` - `TerminalListener` object.

Copyright © JSCAPE LLC. 1999-2021. All Rights Reserved