Package org.microproxy.extras
Record Class ServerReplay.Extra
java.lang.Object
java.lang.Record
org.microproxy.extras.ServerReplay.Extra
- Record Components:
kind-forward,killorstatusstatus- the status to answer with, forstatus
- Enclosing class:
ServerReplay
What happens to requests without a recording, as mitmproxy's
server_replay_extra.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static ServerReplay.Extraforward()Returns sending the request on to the server (the default).final inthashCode()Returns a hash code value for this object.static ServerReplay.Extrakill()Returns closing the connection without a response.kind()Returns the value of thekindrecord component.static ServerReplay.ExtraParsesforward,killor a status code.intstatus()Returns the value of thestatusrecord component.static ServerReplay.Extrastatus(int status) Answering with an empty response.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Extra
Checks the parts.
-
-
Method Details
-
forward
Returns sending the request on to the server (the default).- Returns:
- sending the request on to the server (the default)
-
kill
Returns closing the connection without a response.- Returns:
- closing the connection without a response
-
status
Answering with an empty response.- Parameters:
status- the status to answer with- Returns:
- the behaviour
-
parse
Parsesforward,killor a status code.- Parameters:
value- the option value- Returns:
- the behaviour
- Throws:
IllegalArgumentException- for anything else
-
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. -
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. -
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 '=='. -
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-
status
public int status()Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-