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
  • Field Details

    • DEFAULT_SHELL_LIFETIME

      public static final Duration DEFAULT_SHELL_LIFETIME
      The default lifetime of a WinRM shell
  • Method Details

    • with

      public static WindowsShellOptions with(com.oracle.bedrock.runtime.PropertiesBuilder builder)
      Create a WindowsShellOptions containing the basic set of WinRM options on top of which the the specified set of WinRM options will be added.
      Parameters:
      builder - the PropertiesBuilder containing the set of WinRM options to add to the basic options
      Returns:
      a WindowsShellOptions containing the basic set of WinRM options on top of which the the specified set of WinRM options will be added.
    • basic

      public static WindowsShellOptions basic()
      Create a WindowsShellOptions containing the basic set of WinRM options.
      Returns:
      a WindowsShellOptions containing the basic set of WinRM options
    • getBuilder

      public com.oracle.bedrock.runtime.PropertiesBuilder getBuilder()
      Obtains the PropertiesBuilder to use for realizing the WinRM options.
      Returns:
      the PropertiesBuilder
    • set

      public WindowsShellOptions set(String name, Object value)
      Defines a custom environment variable, overriding any previously defined variable of the same name.
      Parameters:
      name - the name of the environment variable
      value - the value of the environment variable
      Returns:
      the WindowsShellOptions Option to permit fluent-method calls
    • setIfAbsent

      public WindowsShellOptions setIfAbsent(String name, Object value)
      Defines a custom environment variable, if-and-only-if it's not already defined.
      Parameters:
      name - the name of the environment variable
      value - the value of the environment variable
      Returns:
      the WindowsShellOptions Option to permit fluent-method calls
    • set

      public WindowsShellOptions set(String name, Iterator<?> iterator)
      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 the getBuilder() is realized.
      Parameters:
      name - the name of the environment variable
      iterator - the Iterator providing values for the variable
      Returns:
      the WindowsShellOptions Option to permit fluent-method calls
    • setIfAbsent

      public WindowsShellOptions 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 the getBuilder() is realized.
      Parameters:
      name - the name of the environment variable
      iterator - the Iterator providing values for the variable
      Returns:
      the WindowsShellOptions Option to permit fluent-method calls
    • withLifetime

      public WindowsShellOptions withLifetime(long lifetime, TimeUnit units)
      Set the lifetime of the WinRM shell
      Parameters:
      lifetime - the lifetime of the WinRM shell
      units - the units to apply to the lifetime value
      Returns:
      this WindowsShellOptions
    • getShellLifetime

      public Duration getShellLifetime()
      Obtain the lifetime of the WinRM shell.
      Returns:
      the lifetime of the WinRM shell
    • compose

      public WindowsShellOptions compose(WindowsShellOptions other)
      Specified by:
      compose in interface com.oracle.bedrock.ComposableOption<WindowsShellOptions>