Interface FlowAttachmentCommunication

All Superinterfaces:
CommonDecorator, ExternalCommunicationDecorator, FlowCommon, FlowExternalCommunication
All Known Subinterfaces:
FlowContext
All Known Implementing Classes:
DefaultFlowContext

public interface FlowAttachmentCommunication extends FlowExternalCommunication
Since:
25.1
Author:
渔民小镇
date:
2025-10-09
  • Method Details

    • updateAttachment

      default void updateAttachment(byte[] attachment)
    • updateAttachmentAsync

      default void updateAttachmentAsync(byte[] attachment)
    • updateAttachment

      default void updateAttachment()
    • updateAttachmentAsync

      default void updateAttachmentAsync()
    • getAttachment

      default <T> T getAttachment(Class<T> clazz)
    • getAttachment

      default <T> T getAttachment()
      getAttachment

      examples

          public class MyFlowContext extends FlowContext {
              MyAttachment attachment;
      
              @Override
              public MyAttachment getAttachment() {
                  if (Objects.isNull(attachment)) {
                      this.attachment = this.getAttachment(MyAttachment.class);
                  }
      
                  return this.attachment;
              }
          }
      
          public class MyAttachment {
              long userId;
              ...
          }
      
      
      Type Parameters:
      T - t
      Returns:
      attachment