Class WindowsShellOptions
java.lang.Object
com.oracle.bedrock.runtime.remote.windows.winrm.WindowsShellOptions
- All Implemented Interfaces:
com.oracle.bedrock.ComposableOption<WindowsShellOptions>,com.oracle.bedrock.Option
public class WindowsShellOptions
extends Object
implements com.oracle.bedrock.Option, com.oracle.bedrock.ComposableOption<WindowsShellOptions>
An
Option to define options to set on a WinRM remote shell.
Copyright (c) 2015. All Rights Reserved. Oracle Corporation.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
- Author:
- Jonathan Knight
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.oracle.bedrock.Option
com.oracle.bedrock.Option.Collectable, com.oracle.bedrock.Option.Collector<C extends com.oracle.bedrock.Option.Collectable,T extends com.oracle.bedrock.Option.Collector<C, T>> -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic WindowsShellOptionsbasic()Create aWindowsShellOptionscontaining the basic set of WinRM options.compose(WindowsShellOptions other) com.oracle.bedrock.runtime.PropertiesBuilderObtains thePropertiesBuilderto use for realizing the WinRM options.Obtain the lifetime of the WinRM shell.Defines a custom environment variable, overriding any previously defined variable of the same name.Defines a custom environment variable, overriding any previously defined variable of the same name, the value to be used to be taken from the specified iterator when thegetBuilder()is realized.setIfAbsent(String name, Object value) Defines a custom environment variable, if-and-only-if it's not already defined.setIfAbsent(String name, Iterator<?> iterator) Defines a custom environment variable, if-and-only-if it's not already defined, the value to be used to be taken from the specified iterator when thegetBuilder()is realized.static WindowsShellOptionswith(com.oracle.bedrock.runtime.PropertiesBuilder builder) Create aWindowsShellOptionscontaining the basic set of WinRM options on top of which the the specified set of WinRM options will be added.withLifetime(long lifetime, TimeUnit units) Set the lifetime of the WinRM shell
-
Field Details
-
DEFAULT_SHELL_LIFETIME
The default lifetime of a WinRM shell
-
-
Method Details
-
with
Create aWindowsShellOptionscontaining the basic set of WinRM options on top of which the the specified set of WinRM options will be added.- Parameters:
builder- thePropertiesBuildercontaining the set of WinRM options to add to the basic options- Returns:
- a
WindowsShellOptionscontaining the basic set of WinRM options on top of which the the specified set of WinRM options will be added.
-
basic
Create aWindowsShellOptionscontaining the basic set of WinRM options.- Returns:
- a
WindowsShellOptionscontaining the basic set of WinRM options
-
getBuilder
public com.oracle.bedrock.runtime.PropertiesBuilder getBuilder()Obtains thePropertiesBuilderto use for realizing the WinRM options.- Returns:
- the
PropertiesBuilder
-
set
Defines a custom environment variable, overriding any previously defined variable of the same name.- Parameters:
name- the name of the environment variablevalue- the value of the environment variable- Returns:
- the
WindowsShellOptionsOptionto permit fluent-method calls
-
setIfAbsent
Defines a custom environment variable, if-and-only-if it's not already defined.- Parameters:
name- the name of the environment variablevalue- the value of the environment variable- Returns:
- the
WindowsShellOptionsOptionto permit fluent-method calls
-
set
Defines a custom environment variable, overriding any previously defined variable of the same name, the value to be used to be taken from the specified iterator when thegetBuilder()is realized.- Parameters:
name- the name of the environment variableiterator- theIteratorproviding values for the variable- Returns:
- the
WindowsShellOptionsOptionto permit fluent-method calls
-
setIfAbsent
Defines a custom environment variable, if-and-only-if it's not already defined, the value to be used to be taken from the specified iterator when thegetBuilder()is realized.- Parameters:
name- the name of the environment variableiterator- theIteratorproviding values for the variable- Returns:
- the
WindowsShellOptionsOptionto permit fluent-method calls
-
withLifetime
Set the lifetime of the WinRM shell- Parameters:
lifetime- the lifetime of the WinRM shellunits- the units to apply to the lifetime value- Returns:
- this
WindowsShellOptions
-
getShellLifetime
Obtain the lifetime of the WinRM shell.- Returns:
- the lifetime of the WinRM shell
-
compose
- Specified by:
composein interfacecom.oracle.bedrock.ComposableOption<WindowsShellOptions>
-