Package org.metricshub.winrm.service
Class WinRMExecutorFactory
java.lang.Object
org.metricshub.winrm.service.WinRMExecutorFactory
Creates the
WindowsRemoteExecutor that fulfils a request. Since 2.0.0 the dependency-free
LightWinRMService is the only implementation: the legacy CXF-based backend has been removed.-
Method Summary
Modifier and TypeMethodDescriptionstatic WindowsRemoteExecutorcreateInstance(WinRMEndpoint winRMEndpoint, long timeout, Path ticketCache, List<AuthenticationEnum> authentications) Create aWindowsRemoteExecutor.static WindowsRemoteExecutorcreateInstance(WinRMEndpoint winRMEndpoint, long timeout, Path ticketCache, List<AuthenticationEnum> authentications, SSLContext sslContext, boolean trustAllCertificates) Create aWindowsRemoteExecutorwith an explicit TLS configuration, overriding theorg.metricshub.winrm.tls.insecuresystem property for this instance.static WindowsRemoteExecutorcreateInstance(WinRMEndpoint winRMEndpoint, long timeout, Path ticketCache, List<AuthenticationEnum> authentications, SSLContext sslContext, boolean trustAllCertificates, int consoleCodePage) Create aWindowsRemoteExecutorwith an explicit console code page for the command shell.
-
Method Details
-
createInstance
public static WindowsRemoteExecutor createInstance(WinRMEndpoint winRMEndpoint, long timeout, Path ticketCache, List<AuthenticationEnum> authentications) throws WinRMException Create aWindowsRemoteExecutor.- Parameters:
winRMEndpoint- endpoint with credentials (mandatory)timeout- timeout in milliseconds (must be > 0)ticketCache- Kerberos ticket cache path (may benull)authentications- requested authentication schemes (may benull)- Returns:
- an executor backed by
LightWinRMService - Throws:
WinRMException- for any problem creating the executor
-
createInstance
public static WindowsRemoteExecutor createInstance(WinRMEndpoint winRMEndpoint, long timeout, Path ticketCache, List<AuthenticationEnum> authentications, SSLContext sslContext, boolean trustAllCertificates) throws WinRMException Create aWindowsRemoteExecutorwith an explicit TLS configuration, overriding theorg.metricshub.winrm.tls.insecuresystem property for this instance.- Parameters:
winRMEndpoint- endpoint with credentials (mandatory)timeout- timeout in milliseconds (must be > 0)ticketCache- Kerberos ticket cache path (may benull)authentications- requested authentication schemes (may benull)sslContext- theSSLContextproviding the HTTPS socket factory (hostname verification stays on);nulluses the default configurationtrustAllCertificates- whentrue(and nosslContextis given), trust every server certificate and skip hostname verification — insecure, testing only- Returns:
- an executor backed by
LightWinRMService - Throws:
WinRMException- for any problem creating the executor
-
createInstance
public static WindowsRemoteExecutor createInstance(WinRMEndpoint winRMEndpoint, long timeout, Path ticketCache, List<AuthenticationEnum> authentications, SSLContext sslContext, boolean trustAllCertificates, int consoleCodePage) throws WinRMException Create aWindowsRemoteExecutorwith an explicit console code page for the command shell.- Parameters:
winRMEndpoint- endpoint with credentials (mandatory)timeout- timeout in milliseconds (must be > 0)ticketCache- Kerberos ticket cache path (may benull)authentications- requested authentication schemes (may benull)sslContext- theSSLContextproviding the HTTPS socket factory (hostname verification stays on);nulluses the default configurationtrustAllCertificates- whentrue(and nosslContextis given), trust every server certificate and skip hostname verification — insecure, testing onlyconsoleCodePage- the console code page of the command shell; 0 keeps the default 65001- Returns:
- an executor backed by
LightWinRMService - Throws:
WinRMException- for any problem creating the executor
-