public static class WinRmClient.Builder extends Object
| Modifier and Type | Field and Description |
|---|---|
static Long |
DEFAULT_OPERATION_TIMEOUT |
| Constructor and Description |
|---|
WinRmClient.Builder(String endpoint,
String authenticationScheme) |
WinRmClient.Builder(URL endpoint,
String authenticationScheme) |
| Modifier and Type | Method and Description |
|---|---|
WinRmClient |
build()
Create a WinRmClient
|
WinRmClient.Builder |
context(WinRmClientContext context) |
WinRmClient.Builder |
credentials(String username,
String password) |
WinRmClient.Builder |
credentials(String domain,
String username,
String password)
Credentials to use for authentication
|
WinRmClient.Builder |
disableCertificateChecks(boolean disableCertificateChecks) |
WinRmClient.Builder |
environment(Map<String,String> environment) |
WinRmClient.Builder |
hostnameVerifier(HostnameVerifier hostnameVerifier) |
WinRmClient.Builder |
locale(Locale locale) |
WinRmClient.Builder |
operationTimeout(long operationTimeout)
If operations cannot be completed in a specified time,
the service returns a fault so that a client can comply with its obligations.
|
WinRmClient.Builder |
retriesForConnectionFailures(Integer retriesConnectionFailures) |
WinRmClient.Builder |
workingDirectory(String workingDirectory) |
public static final Long DEFAULT_OPERATION_TIMEOUT
public WinRmClient.Builder credentials(String username, String password)
public WinRmClient.Builder credentials(String domain, String username, String password)
public WinRmClient.Builder locale(Locale locale)
locale - The locale to run the process inpublic WinRmClient.Builder operationTimeout(long operationTimeout)
operationTimeout - in milliseconds
default value DEFAULT_OPERATION_TIMEOUTpublic WinRmClient.Builder retriesForConnectionFailures(Integer retriesConnectionFailures)
retriesConnectionFailures - How many times to retry the command before giving up in case of failure (exception).
Default is 16.public WinRmClient.Builder disableCertificateChecks(boolean disableCertificateChecks)
disableCertificateChecks - Skip trusted certificate and domain (CN) checks.
Used when working with self-signed certificates. Use hostnameVerifier(HostnameVerifier)
for a more precise white-listing of server certificates.public WinRmClient.Builder workingDirectory(String workingDirectory)
workingDirectory - the working directory of the processpublic WinRmClient.Builder environment(Map<String,String> environment)
environment - variables to pass to the commandpublic WinRmClient.Builder hostnameVerifier(HostnameVerifier hostnameVerifier)
hostnameVerifier - override the default HostnameVerifier allowing
users to add custom validation logic. Used when the default rules for URL
hostname verification fail. Use disableCertificateChecks(boolean) to
disable certificate checks for all host names.public WinRmClient.Builder context(WinRmClientContext context)
context - is a shared WinRmClientContext object which allows connection
reuse across WinRmClient invocations. If not set one will be created
for each WinRmClient instance.public WinRmClient build()
Copyright © 2017. All rights reserved.