Package net.shibboleth.idp.cli

# Class CLI

java.lang.Object
net.shibboleth.idp.cli.CLI

public final class CLI extends Object
Entry point for generic command line utility.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`ARGS_PROPERTY`
Name of system property for command line argument class.

## Constructor Summary

Constructors
Modifier
Constructor
Description
`private`
`CLI()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`private static void`
`doRequest(CommandLineArguments args)`
Make a request using the arguments established.
`private static void`
`errorAndExit(String errorMessage, HttpURLConnection conn)`
Logs, as an error, the error message, any error stream content from the connection, and exits the program.
`static void`
`main(String[] args)`
Command line entry point.
`private static void`
`outputStream(InputStream source, PrintStream sink)`
Dump contents of stream to an output sink.

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

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

## Field Details

### ARGS_PROPERTY

@Nonnull @NotEmpty public static final String ARGS_PROPERTY
Name of system property for command line argument class.

See Also:
  - Constant Field Values

## Constructor Details

### CLI

private CLI()
Constructor.

## Method Details

### main

public static void main(@Nonnull String[] args) throws ReflectiveOperationException, SecurityException, IllegalArgumentException
Command line entry point.

Parameters:
  `args` - command line arguments
Throws:
  `SecurityException` - from the object construction
  `ReflectiveOperationException` - from the object construction
  `IllegalArgumentException` - from the object construction

### doRequest

private static void doRequest(@Nonnull CommandLineArguments args)
Make a request using the arguments established.

Parameters:
  `args` - the populated command line arguments

### outputStream

private static void outputStream(@Nonnull InputStream source, @Nonnull PrintStream sink) throws IOException
Dump contents of stream to an output sink.

Parameters:
  `source` - input stream to dump
  `sink` - output stream to write to
Throws:
  `IOException` - if an error occurs

### errorAndExit

private static void errorAndExit(@Nonnull String errorMessage, @Nullable HttpURLConnection conn)
Logs, as an error, the error message, any error stream content from the connection, and exits the program.

Parameters:
  `errorMessage` - error message
  `conn` - connection to get error information from