URLArgumentHandler (Apache Geode 2.0.2)
Description: declaration: package: org.apache.geode.modules.session.installer.args, class: URLArgumentHandler

Package 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
  Description
  `URLArgumentHandler()`

- ## Method Summary

  Modifier and Type
  Method
  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 Details

  - ### URLArgumentHandler

    public URLArgumentHandler()

- ## Method Details

  - ### 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