Record Class MobileApiCaptureStatus

java.lang.Object
java.lang.Record
com.shaft.mcp.MobileApiCaptureStatus
Record Components:
active - whether a capture session is currently running
sessionId - active (or last) session identifier
proxyPort - loopback port the MITM proxy is listening on (0 if not active)
caCertificatePem - the per-installation CA certificate, PEM-encoded, for the caller to surface as a device trust-installation artifact (public data only -- never the private key)
transactionCount - number of transactions captured so far
warnings - safe warnings (pairing limitations, pinned hosts, transactions that could not be recorded)
outputPath - the persisted capture-session JSON path, always visible so the caller can generate an API test from it after stopping (empty before a session starts)
readiness - Ready/Risky/Blocked verdict rolled up from warnings; never null

public record MobileApiCaptureStatus(boolean active, String sessionId, int proxyPort, String caCertificatePem, long transactionCount, List<String> warnings, String outputPath, CaptureReadiness.State readiness) extends Record
Safe status of a mobile API capture session -- no bodies, no raw headers, nothing sensitive.

Shares the recorder readiness vocabulary (#3499): readiness reuses the frozen web CaptureReadiness.State (Ready/Risky/Blocked) so the mobile API capture speaks the same language as the web/mobile/Playwright recorders. The atomic unit here is a transaction (an HTTP request/response), not a GUI "step".

  • Constructor Details

    • MobileApiCaptureStatus

      public MobileApiCaptureStatus(boolean active, String sessionId, int proxyPort, String caCertificatePem, long transactionCount, List<String> warnings, String outputPath, CaptureReadiness.State readiness)
      Creates an instance of a MobileApiCaptureStatus record class.
      Parameters:
      active - the value for the active record component
      sessionId - the value for the sessionId record component
      proxyPort - the value for the proxyPort record component
      caCertificatePem - the value for the caCertificatePem record component
      transactionCount - the value for the transactionCount record component
      warnings - the value for the warnings record component
      outputPath - the value for the outputPath record component
      readiness - the value for the readiness record component
    • MobileApiCaptureStatus

      public MobileApiCaptureStatus(boolean active, String sessionId, int proxyPort, String caCertificatePem, long transactionCount, List<String> warnings)
      Back-compatible constructor matching the original pre-#3499 shape; defaults the session path to empty and readiness to CaptureReadiness.State.READY.
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • active

      public boolean active()
      Returns the value of the active record component.
      Returns:
      the value of the active record component
    • sessionId

      public String sessionId()
      Returns the value of the sessionId record component.
      Returns:
      the value of the sessionId record component
    • proxyPort

      public int proxyPort()
      Returns the value of the proxyPort record component.
      Returns:
      the value of the proxyPort record component
    • caCertificatePem

      public String caCertificatePem()
      Returns the value of the caCertificatePem record component.
      Returns:
      the value of the caCertificatePem record component
    • transactionCount

      public long transactionCount()
      Returns the value of the transactionCount record component.
      Returns:
      the value of the transactionCount record component
    • warnings

      public List<String> warnings()
      Returns the value of the warnings record component.
      Returns:
      the value of the warnings record component
    • outputPath

      public String outputPath()
      Returns the value of the outputPath record component.
      Returns:
      the value of the outputPath record component
    • readiness

      public CaptureReadiness.State readiness()
      Returns the value of the readiness record component.
      Returns:
      the value of the readiness record component