# A2uiMessageProcessorKt

Added in 1.0.0-alpha02

*** ** * ** ***


```
public final class A2uiMessageProcessorKt
```

<br />

*** ** * ** ***

## Summary

| ### Public methods |
|---|---|
| `static final void` | `<T extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/a2ui/model/processor/A2uiMessageProcessorKt#(androidx.a2ui.model.processor.A2uiMessageProcessor).processInput(androidx.a2ui.model.processor.A2uiMessageParser,kotlin.Any)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/a2ui/model/processor/A2uiMessageProcessor receiver, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/a2ui/model/processor/A2uiMessageParser<@https://developer.android.com/reference/androidx/annotation/NonNull T> parser, @https://developer.android.com/reference/androidx/annotation/NonNull T input )` Parses `https://developer.android.com/reference/androidx/a2ui/model/processor/package-summary#(androidx.a2ui.model.processor.A2uiMessageProcessor).processInput(androidx.a2ui.model.processor.A2uiMessageParser,kotlin.Any)` using `https://developer.android.com/reference/androidx/a2ui/model/processor/package-summary#(androidx.a2ui.model.processor.A2uiMessageProcessor).processInput(androidx.a2ui.model.processor.A2uiMessageParser,kotlin.Any)` and enqueues the resulting message into this processor. |

## Public methods

### processInput

Artifact: [androidx.a2ui:a2ui-model](https://developer.android.com/jetpack/androidx/releases/a2ui) [View Source](https://cs.android.com/search?q=file:androidx/a2ui/model/processor/A2uiMessageProcessor.kt+function:processInput) Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui#1.0.0-alpha02)

```
public static final void <T extends Object> processInput(
    @NonNull A2uiMessageProcessor receiver,
    @NonNull A2uiMessageParser<@NonNull T> parser,
    @NonNull T input
)
```

Parses `https://developer.android.com/reference/androidx/a2ui/model/processor/package-summary#(androidx.a2ui.model.processor.A2uiMessageProcessor).processInput(androidx.a2ui.model.processor.A2uiMessageParser,kotlin.Any)` using `https://developer.android.com/reference/androidx/a2ui/model/processor/package-summary#(androidx.a2ui.model.processor.A2uiMessageProcessor).processInput(androidx.a2ui.model.processor.A2uiMessageParser,kotlin.Any)` and enqueues the resulting message into this processor.

If parsing fails with an `https://developer.android.com/reference/androidx/a2ui/model/protocol/A2uiException` (such as `https://developer.android.com/reference/androidx/a2ui/model/protocol/A2uiException.A2uiValidationException`), the exception is caught, converted into an `https://developer.android.com/reference/androidx/a2ui/model/protocol/A2uiClientErrorMessage`, and sent to `https://developer.android.com/reference/androidx/a2ui/model/processor/A2uiMessageProcessor#processError(androidx.a2ui.model.protocol.A2uiClientErrorMessage)`. Unexpected runtime exceptions are not caught.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/a2ui/model/processor/A2uiMessageParser<@https://developer.android.com/reference/androidx/annotation/NonNull T> parser` | The parser to use for parsing the input. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull T input` | The raw input to parse and process. |