public class

PortForwardingRule.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.test.rule.PortForwardingRule.Builder

Summary

Constructors
publicBuilder()

Methods
public PortForwardingRulebuild()

public PortForwardingRule.BuilderwithProperties(java.util.Properties properties)

Builder which allows to pass a java.util.Properties object for testing.

public PortForwardingRule.BuilderwithProxyHost(java.lang.String proxyHost)

Builder to set a specific host address to forward the network traffic to.

public PortForwardingRule.BuilderwithProxyPort(int proxyPort)

Builder to set a specific port number to forward the network traffic to.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder()

Methods

public PortForwardingRule.Builder withProxyHost(java.lang.String proxyHost)

Builder to set a specific host address to forward the network traffic to.

Parameters:

proxyHost: The host address to which the network traffic is forwarded during tests.

public PortForwardingRule.Builder withProxyPort(int proxyPort)

Builder to set a specific port number to forward the network traffic to.

Parameters:

proxyPort: The port number to which the network traffic is forwarded during tests.

public PortForwardingRule.Builder withProperties(java.util.Properties properties)

Builder which allows to pass a java.util.Properties object for testing. This will help to avoid the system properties being affected by tests.

Parameters:

properties: A pre-constructed properties object for testing.

public PortForwardingRule build()