URLArgumentHandler (Apache Geode 1.15.4)

org.apache.geode.modules.session.installer.args

## Class URLArgumentHandler

- java.lang.Object
- - org.apache.geode.modules.session.installer.args.URLArgumentHandler

- All Implemented Interfaces:
    ArgumentHandler

      public class URLArgumentHandler
      extends Object
      implements ArgumentHandler

  Argument handler implementation which accepts file paths or URLs and normalizes the parameters to URLs.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `URLArgumentHandler()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `handleArgument(Argument arg, String form, String[] parameters)` Ensure that the argument is either a file path or a properly formatted URL.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### URLArgumentHandler

          public URLArgumentHandler()

  - ### Method Detail

    - #### handleArgument

          public void handleArgument(Argument arg,
                                     String form,
                                     String[] parameters)
                              throws UsageException

      Ensure that the argument is either a file path or a properly formatted URL. If it is a file path, convert to a URL. If neither, throws a UsageException.
      Specified by:
        `handleArgument` in interface `ArgumentHandler`
      Parameters:
        `arg` - argument
        `form` - form used
        `parameters` - parameters supplied
      Throws:
        `UsageException` - when file not found or not a workable URL