Class SaslMessage

java.lang.Object
com.lucimber.dbus.connection.sasl.SaslMessage

public final class SaslMessage extends Object
A SASL message exchanged between a D-Bus instance (server) and a client application.
  • Constructor Details

    • SaslMessage

      public SaslMessage(SaslCommandName commandName, String commandArgs)
      Constructs a new SaslMessage.
      Parameters:
      commandName - the name of the command (not null)
      commandArgs - the optional args of the command (nullable)
      Throws:
      NullPointerException - if commandName is null
      IllegalArgumentException - if commandArgs is blank or not allowed
  • Method Details

    • getCommandName

      public SaslCommandName getCommandName()
      Returns the name of the SASL command.
      Returns:
      the command name
    • getCommandArgs

      public Optional<String> getCommandArgs()
      Returns the argument(s) of the SASL command, if present.
      Returns:
      an Optional containing the command args
    • toString

      public String toString()
      Overrides:
      toString in class Object