The handler parameters are passed to the instantiated command handler and populated by the command processor. The parameters supply everything a command handler needs to operate: arguments, response object, profiles, the command definition document, and more.

Handlers should NEVER perform their own console/stdout/stderr invocations. The response object is provided for all messaging and logging capabilities.

export
interface

  IHandlerParameters

### Hierarchy

- IHandlerParameters

## Index

### Properties

- arguments
- definition
- fullDefinition
- isChained
- positionals
- response
- stdin

## Properties

### arguments

arguments: ICommandArguments

- Defined in @zowe/imperative/src/cmd/src/doc/handler/IHandlerParameters.ts:45

The arguments specified by the user on the command line (in the Yargs object format).

memberof

  IHandlerParameters

### definition

definition: ICommandDefinition

- Defined in @zowe/imperative/src/cmd/src/doc/handler/IHandlerParameters.ts:59

The command definition node that defines the command being issued.

memberof

  IHandlerParameters

### fullDefinition

fullDefinition: ICommandDefinition

- Defined in @zowe/imperative/src/cmd/src/doc/handler/IHandlerParameters.ts:66

The full command definition tree that includes the command being issued.

memberof

  IHandlerParameters

### Optional isChained

isChained: boolean

- Defined in @zowe/imperative/src/cmd/src/doc/handler/IHandlerParameters.ts:79

Has your command been invoked from a chained handler? (see ICommandDefinition.chainedHandlers) You can use this to influence the behavior of your command (e.g. not printing certain messages from within a chained command)

### positionals

positionals: (string | number)[]

- Defined in @zowe/imperative/src/cmd/src/doc/handler/IHandlerParameters.ts:52

The positional options specified by the user on the command line.

memberof

  IHandlerParameters

### response

response: IHandlerResponseApi

- Defined in @zowe/imperative/src/cmd/src/doc/handler/IHandlerParameters.ts:38

The response object used to issue messages and build responses to the command. No command should be writing to console/stdout/stderr directly. The response object provides the capability of collecting responses for the JSON response format (among other capabilities). A handler can choose to log differently, however a logger is also provided on the command response object.

memberof

  IHandlerParameters

### stdin

stdin: stream.Readable

- Defined in @zowe/imperative/src/cmd/src/doc/handler/IHandlerParameters.ts:73

The input stream that can be used by the command being issued.

memberof

  IHandlerParameters

Generated using TypeDoc