Class DriverCommandSource

java.lang.Object
eu.cloudnetservice.node.impl.command.source.DriverCommandSource
All Implemented Interfaces:
eu.cloudnetservice.driver.base.Named, eu.cloudnetservice.node.command.source.CommandSource

public class DriverCommandSource extends Object implements eu.cloudnetservice.node.command.source.CommandSource
The driver command source represents a message receiving object for the driver api. All messages regarding command execution and command parsing are sent to the command source, which captures all of them to send them over the network, see ClusterNodeProvider.sendCommandLine(String)
Since:
4.0
See Also:
  • CommandSource
  • Field Details

  • Constructor Details

    • DriverCommandSource

      public DriverCommandSource()
  • Method Details

    • name

      @NonNull public @NonNull String name()
      Specified by:
      name in interface eu.cloudnetservice.driver.base.Named
    • sendMessage

      public void sendMessage(@NonNull @NonNull String message)
      Specified by:
      sendMessage in interface eu.cloudnetservice.node.command.source.CommandSource
    • sendMessage

      public void sendMessage(@NonNull @NonNull String... messages)
      Specified by:
      sendMessage in interface eu.cloudnetservice.node.command.source.CommandSource
    • sendMessage

      public void sendMessage(@NonNull @NonNull Collection<String> messages)
      Specified by:
      sendMessage in interface eu.cloudnetservice.node.command.source.CommandSource
    • checkPermission

      public boolean checkPermission(@NonNull @NonNull String permission)
      Specified by:
      checkPermission in interface eu.cloudnetservice.node.command.source.CommandSource
      Parameters:
      permission - the permission to check for
      Returns:
      always true as the driver is allowed to execute every command
      Throws:
      NullPointerException - if permission is null.
    • messages

      @NonNull public @NonNull Collection<String> messages()
      Returns:
      all captured messages for the driver
    • toString

      @NonNull public @NonNull String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(@Nullable @Nullable Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object