Class ShellMessageBuilder<T>

java.lang.Object
org.springframework.shell.component.message.ShellMessageBuilder<T>
Type Parameters:
T - the payload type.

public final class ShellMessageBuilder<T> extends Object
Shell spesific message builder.
  • Method Details

    • withPayload

      public static <T> ShellMessageBuilder<T> withPayload(T payload)
      Create a builder for a new Message instance with the provided payload.
      Type Parameters:
      T - The type of the payload.
      Parameters:
      payload - the payload for the new message
      Returns:
      A ShellMessageBuilder.
    • ofRedraw

      public static org.springframework.messaging.Message<String> ofRedraw()
      Create a redraw message.
      Returns:
      a redraw message
    • ofInterrupt

      public static org.springframework.messaging.Message<String> ofInterrupt()
      Create a interrupt message.
      Returns:
      a interrupt message
    • ofSignal

      public static org.springframework.messaging.Message<String> ofSignal(String signal)
      Create a signal message.
      Returns:
      a signal message
    • ofKeyEvent

      public static org.springframework.messaging.Message<KeyEvent> ofKeyEvent(KeyEvent event)
      Create a message of a KeyEvent.
      Parameters:
      event - the event type
      Returns:
      a message with KeyEvent as a payload
    • ofMouseEvent

      public static org.springframework.messaging.Message<MouseEvent> ofMouseEvent(MouseEvent event)
      Create a message of a MouseEvent.
      Parameters:
      event - the event type
      Returns:
      a message with MouseEvent as a payload
    • ofView

      public static org.springframework.messaging.Message<?> ofView(View view, Object args)
    • ofViewFocus

      public static org.springframework.messaging.Message<String> ofViewFocus(String action, View view)
    • setPriority

      public ShellMessageBuilder<T> setPriority(Integer priority)
    • setView

      public ShellMessageBuilder<T> setView(View view)
    • setEventType

      public ShellMessageBuilder<T> setEventType(EventLoop.Type type)
    • setHeader

      public ShellMessageBuilder<T> setHeader(String headerName, @Nullable Object headerValue)
    • build

      public org.springframework.messaging.Message<T> build()