Record Class MobileApiCaptureStatus
java.lang.Object
java.lang.Record
com.shaft.mcp.MobileApiCaptureStatus
- Record Components:
active- whether a capture session is currently runningsessionId- active (or last) session identifierproxyPort- 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 farwarnings- 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; nevernull
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 Summary
ConstructorsConstructorDescriptionMobileApiCaptureStatus(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 toCaptureReadiness.State.READY.MobileApiCaptureStatus(boolean active, String sessionId, int proxyPort, String caCertificatePem, long transactionCount, List<String> warnings, String outputPath, CaptureReadiness.State readiness) Creates an instance of aMobileApiCaptureStatusrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanactive()Returns the value of theactiverecord component.Returns the value of thecaCertificatePemrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theoutputPathrecord component.intReturns the value of theproxyPortrecord component.Returns the value of thereadinessrecord component.Returns the value of thesessionIdrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thetransactionCountrecord component.warnings()Returns the value of thewarningsrecord component.
-
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 aMobileApiCaptureStatusrecord class.- Parameters:
active- the value for theactiverecord componentsessionId- the value for thesessionIdrecord componentproxyPort- the value for theproxyPortrecord componentcaCertificatePem- the value for thecaCertificatePemrecord componenttransactionCount- the value for thetransactionCountrecord componentwarnings- the value for thewarningsrecord componentoutputPath- the value for theoutputPathrecord componentreadiness- the value for thereadinessrecord 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 toCaptureReadiness.State.READY.
-
-
Method Details
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
active
-
sessionId
-
proxyPort
-
caCertificatePem
Returns the value of thecaCertificatePemrecord component.- Returns:
- the value of the
caCertificatePemrecord component
-
transactionCount
public long transactionCount()Returns the value of thetransactionCountrecord component.- Returns:
- the value of the
transactionCountrecord component
-
warnings
-
outputPath
Returns the value of theoutputPathrecord component.- Returns:
- the value of the
outputPathrecord component
-
readiness
-