Handler command response APIs. Passed to command handlers for console messages, data responses, and progress bars. Handlers can implement their own logging scheme (or use the Imperative.api to obtain an instance of the logger), but handlers should NEVER write directly to the console and should always use the APIs here to construct responses. The HandlerResponse object will automatically handle response formats, etc.

export
implements

  {IHandlerResponseApi}

### Hierarchy

- HandlerResponse

### Implements

- IHandlerResponseApi

## Index

### Constructors

- constructor

### Properties

- mApis

### Accessors

- console
- data
- format
- progress

## Constructors

### constructor

- new HandlerResponse(apis: CommandResponse): HandlerResponse

- - Defined in @zowe/imperative/src/cmd/src/response/HandlerResponse.ts:36

  Creates an instance of HandlerResponse.

  memberof

    HandlerResponse

  #### Parameters

  - ##### apis: CommandResponse

    The command response object (See class for details) - contains all the public APIs that the handler should use to formulate responses.

  #### Returns HandlerResponse

## Properties

### Private mApis

mApis: CommandResponse

- Defined in @zowe/imperative/src/cmd/src/response/HandlerResponse.ts:36

The command response object allocated by the command processor that exposes the APIs intended for the handler to use.

memberof

  HandlerResponse

## Accessors

### console

- get console(): IHandlerResponseConsoleApi

- - Defined in @zowe/imperative/src/cmd/src/response/HandlerResponse.ts:53

  Returns the instance of the console APIs for the handler. Provides APIs to console messaging (log, error, etc.).

  readonly
  memberof

    HandlerResponse

  #### Returns IHandlerResponseConsoleApi

### data

- get data(): IHandlerResponseDataApi

- - Defined in @zowe/imperative/src/cmd/src/response/HandlerResponse.ts:63

  Returns the instance of the data APIs for the handler. Provides APIs for the handlers to formulate their JSON response objects to the command.

  readonly
  memberof

    HandlerResponse

  #### Returns IHandlerResponseDataApi

### format

- get format(): IHandlerFormatOutputApi

- - Defined in @zowe/imperative/src/cmd/src/response/HandlerResponse.ts:83

  Returns the instance of the format APIs for the handler. APIs allow the handler to provide output objects/strings and they will be automatically formatted and printed to the console.

  readonly
  memberof

    HandlerResponse

  #### Returns IHandlerFormatOutputApi

### progress

- get progress(): IHandlerProgressApi

- - Defined in @zowe/imperative/src/cmd/src/response/HandlerResponse.ts:72

  Returns the instance of the progress bar APIs for the handler. Provides methods to start and end progress bars.

  readonly
  memberof

    HandlerResponse

  #### Returns IHandlerProgressApi

Generated using TypeDoc