Class DebugInOut

java.lang.Object
com.iohao.net.framework.core.flow.internal.DebugInOut
All Implemented Interfaces:
ActionMethodInOut

public final class DebugInOut extends Object implements ActionMethodInOut
Debug plugin that logs detailed request/response information for each action method invocation.

Prints a structured diagnostic message including the action command, parameters, return value, execution time, user ID, and error details (if any). An optional time threshold can be set to only log invocations that exceed a given duration in milliseconds.

PluginInOut - DebugInOut.

Author:
渔民小镇
date:
2021-12-12
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create a DebugInOut with no time threshold (logs every invocation).
    DebugInOut(long time)
    Create a DebugInOut that only logs invocations exceeding the given time threshold.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    fuckIn(FlowContext flowContext)
    Record the start time before action method execution.
    void
    fuckOut(FlowContext flowContext)
    Log the debug information after action method execution.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DebugInOut

      public DebugInOut()
      Create a DebugInOut with no time threshold (logs every invocation).
    • DebugInOut

      public DebugInOut(long time)
      Create a DebugInOut that only logs invocations exceeding the given time threshold.
      Parameters:
      time - minimum elapsed time in milliseconds to trigger logging
  • Method Details

    • fuckIn

      public void fuckIn(FlowContext flowContext)
      Record the start time before action method execution.
      Specified by:
      fuckIn in interface ActionMethodInOut
      Parameters:
      flowContext - the current request flow context
    • fuckOut

      public void fuckOut(FlowContext flowContext)
      Log the debug information after action method execution.

      Skips logging if the elapsed time is below the configured threshold. Delegates to either printError or printNormal based on whether the flow context contains an error.

      Specified by:
      fuckOut in interface ActionMethodInOut
      Parameters:
      flowContext - the current request flow context