Record Class ProxyRegistry.ContainerProxy
java.lang.Object
java.lang.Record
io.camunda.zeebe.qa.util.testcontainers.ProxyRegistry.ContainerProxy
- Record Components:
proxy- the Toxiproxy proxy instanceinternalPort- the unmapped port associated with this proxy on the container
- Enclosing class:
ProxyRegistry
public static record ProxyRegistry.ContainerProxy(eu.rekawek.toxiproxy.Proxy proxy, int internalPort)
extends Record
Wrapper type which keeps track of each proxy and their associated unmapped port. If you need to
get the port as accessible from outside the container network, you can use the associated
ContainerState.getMappedPort(int) and pass the internalPort() here.-
Constructor Summary
ConstructorsConstructorDescriptionContainerProxy(eu.rekawek.toxiproxy.Proxy proxy, int internalPort) Creates an instance of aContainerProxyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of theinternalPortrecord component.eu.rekawek.toxiproxy.Proxyproxy()Returns the value of theproxyrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ContainerProxy
public ContainerProxy(eu.rekawek.toxiproxy.Proxy proxy, int internalPort) Creates an instance of aContainerProxyrecord class.- Parameters:
proxy- the value for theproxyrecord componentinternalPort- the value for theinternalPortrecord component
-
-
Method Details
-
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 '=='. -
proxy
public eu.rekawek.toxiproxy.Proxy proxy()Returns the value of theproxyrecord component.- Returns:
- the value of the
proxyrecord component
-
internalPort
public int internalPort()Returns the value of theinternalPortrecord component.- Returns:
- the value of the
internalPortrecord component
-