Class InboundAgentExtension.Options.Builder
java.lang.Object
org.jvnet.hudson.test.junit.jupiter.InboundAgentExtension.Options.Builder
- Enclosing class:
- InboundAgentExtension.Options
A builder of
InboundAgentExtension.Options.
Instances of InboundAgentExtension.Options.Builder are created by calling InboundAgentExtension.Options.newBuilder().
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build and return anInboundAgentExtension.Options.Sets a custom certificate for the agent JVM, passed as the Remoting `-cert` CLI argument.Set a color for agent logs.javaOptions(String... opts) Set a label for the agent.Set the name of the agent.Disables certificate verification for the agent JVM, passed as the Remoting `-noCertificateCheck` CLI argument.Skip starting the agent.trustStore(String path, String password) Provide a custom truststore for the agent JVM.Set a tunnel for the agentUse WebSocket when connecting.webSocket(boolean websocket) Configure usage of WebSocket when connecting.withLogger(Class<?> clazz, Level level) withLogger(String logger, Level level) withPackageLogger(Class<?> clazz, Level level)
-
Method Details
-
name
Set the name of the agent.- Parameters:
name- the name- Returns:
- this builder
-
color
Set a color for agent logs.- Parameters:
color- the color- Returns:
- this builder
-
webSocket
Use WebSocket when connecting.- Returns:
- this builder
-
webSocket
Configure usage of WebSocket when connecting.- Parameters:
websocket- use websocket if true, otherwise use inbound TCP- Returns:
- this builder
-
tunnel
Set a tunnel for the agent- Returns:
- this builder
-
javaOptions
-
trustStore
Provide a custom truststore for the agent JVM. Can be useful when using a setup with a reverse proxy.- Parameters:
path- the path to the truststorepassword- the password for the truststore- Returns:
- this builder
-
cert
Sets a custom certificate for the agent JVM, passed as the Remoting `-cert` CLI argument. When usingRealJenkinsExtension, useRealJenkinsExtension.getRootCAPem()to obtain the required value to pass to this method.- Parameters:
cert- the certificate to use- Returns:
- this builder
-
noCertificateCheck
Disables certificate verification for the agent JVM, passed as the Remoting `-noCertificateCheck` CLI argument.- Returns:
- this builder
-
skipStart
Skip starting the agent.- Returns:
- this builder
-
label
Set a label for the agent.- Returns:
- this builder.
-
withLogger
-
withPackageLogger
-
withLogger
-
build
Build and return anInboundAgentExtension.Options.- Returns:
- a new
InboundAgentExtension.Options
-