Interface FlowContext

All Superinterfaces:
BroadcastMulticastCommunicationDecorator, BroadcastUserCommunicationDecorator, BroadcastUserListCommunicationDecorator, CommonDecorator, ExternalCommunicationDecorator, FlowAttachmentCommunication, FlowBindingLogicServerCommunication, FlowBroadcastCommunication, FlowCommon, FlowCommunicationEventBus, FlowExternalCommunication, FlowExternalWriteCommunication, FlowLogicCallCollectCommunication, FlowLogicCallCommunication, FlowLogicSendCommunication, FLowUserIdSettingCommunication, LogicCallCollectCommunicationDecorator, LogicCallCommunicationDecorator, LogicCommunicationDecorator, LogicSendCommunicationDecorator
All Known Implementing Classes:
DefaultFlowContext

  • Method Details

    • hasError

      default boolean hasError()
      Check if the flow context has an error.
      Returns:
      true if the error code is non-zero
    • getCmdMerge

      default int getCmdMerge()
      Get the merged command ID (cmd << 16 | subCmd).
      Returns:
      the merged command identifier
    • getNanoTime

      long getNanoTime()
      Get the nano time when this flow context was created.
      Returns:
      creation timestamp in nanoseconds
    • getUserId

      long getUserId()
      Get the user ID associated with this request.
      Specified by:
      getUserId in interface FlowCommon
      Returns:
      the user ID
    • setUserId

      void setUserId(long userId)
      Set the user ID associated with this request.
      Specified by:
      setUserId in interface FlowCommon
      Parameters:
      userId - the user ID
    • getBarSkeleton

      BarSkeleton getBarSkeleton()
      Get the BarSkeleton that is processing this flow.
      Specified by:
      getBarSkeleton in interface FlowCommon
      Returns:
      the bar skeleton instance
    • setBarSkeleton

      void setBarSkeleton(BarSkeleton barSkeleton)
      Set the BarSkeleton for this flow.
      Parameters:
      barSkeleton - the bar skeleton instance
    • getActionCommand

      ActionCommand getActionCommand()
      Get the action command metadata for the current request.
      Returns:
      the action command
    • setActionCommand

      void setActionCommand(ActionCommand actionCommand)
      Set the action command metadata.
      Parameters:
      actionCommand - the action command
    • getActionController

      Object getActionController()
      Get the action controller instance handling this request.
      Returns:
      the controller instance
    • setActionController

      void setActionController(Object actionController)
      Set the action controller instance.
      Parameters:
      actionController - the controller instance
    • getRequest

      Request getRequest()
      Get the request message.
      Specified by:
      getRequest in interface FlowCommon
      Returns:
      the request
    • setRequest

      void setRequest(Request request)
      Set the request message.
      Parameters:
      request - the request
    • getMethodResult

      Object getMethodResult()
      Get the result returned by the action method.
      Returns:
      the method result
    • setMethodResult

      void setMethodResult(Object methodResult)
      Set the action method result.
      Specified by:
      setMethodResult in interface FlowCommon
      Parameters:
      methodResult - the method result
    • getOriginalMethodResult

      Object getOriginalMethodResult()
      Get the original unprocessed result from the action method.
      Returns:
      the original method result
    • setOriginalMethodResult

      void setOriginalMethodResult(Object originalMethodResult)
      Set the original action method result.
      Parameters:
      originalMethodResult - the original method result
    • getCommunicationType

      CommunicationType getCommunicationType()
      Get the communication type for this flow.
      Specified by:
      getCommunicationType in interface FlowCommon
      Returns:
      the communication type
    • setCommunicationType

      void setCommunicationType(CommunicationType communicationType)
      Set the communication type.
      Parameters:
      communicationType - the communication type
    • getErrorCode

      int getErrorCode()
      Get the error code, 0 means no error.
      Returns:
      the error code
    • setErrorCode

      void setErrorCode(int errorCode)
      Set the error code.
      Parameters:
      errorCode - the error code
    • getErrorMessage

      String getErrorMessage()
      Get the error message.
      Returns:
      the error message, or null if none
    • setErrorMessage

      void setErrorMessage(String errorMessage)
      Set the error message.
      Parameters:
      errorMessage - the error message
    • getCommunicationAggregation

      CommunicationAggregation getCommunicationAggregation()
      Get the communication aggregation for cross-service calls.
      Specified by:
      getCommunicationAggregation in interface CommonDecorator
      Returns:
      the communication aggregation
    • setCommunicationAggregation

      void setCommunicationAggregation(CommunicationAggregation communicationAggregation)
      Set the communication aggregation.
      Parameters:
      communicationAggregation - the communication aggregation
    • getDataParam

      Object getDataParam()
      Get the deserialized request data parameter.
      Returns:
      the data parameter
    • setDataParam

      void setDataParam(Object dataParam)
      Set the request data parameter.
      Parameters:
      dataParam - the data parameter
    • getCmdInfo

      CmdInfo getCmdInfo()
      Get the command info (cmd, subCmd) for this request.
      Specified by:
      getCmdInfo in interface FlowCommon
      Returns:
      the command info
    • setCmdInfo

      void setCmdInfo(CmdInfo cmdInfo)
      Set the command info.
      Parameters:
      cmdInfo - the command info
    • getCurrentThreadExecutor

      ThreadExecutor getCurrentThreadExecutor()
      Get the thread executor assigned to this flow.
      Specified by:
      getCurrentThreadExecutor in interface FlowCommon
      Returns:
      the thread executor
    • setCurrentThreadExecutor

      void setCurrentThreadExecutor(ThreadExecutor currentThreadExecutor)
      Set the thread executor for this flow.
      Parameters:
      currentThreadExecutor - the thread executor