# androidx.a2ui.model.processor

*** ** * ** ***

## Interfaces

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/a2ui/model/processor/A2uiActionInterceptor` | Intercepts, transforms, or drops `https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiUserAction`s before they are processed by the core layer. |
| `https://developer.android.com/reference/kotlin/androidx/a2ui/model/processor/A2uiJsonReader` | Reads a stream of JSON tokens. |
| `https://developer.android.com/reference/kotlin/androidx/a2ui/model/processor/A2uiMessageParser` | Parses raw input into `https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiServerToClientMessage` protocol messages. |
| `https://developer.android.com/reference/kotlin/androidx/a2ui/model/processor/A2uiMessageProcessor` | The A2UI message processor. |
| `https://developer.android.com/reference/kotlin/androidx/a2ui/model/processor/A2uiSurfaceModel` | A single A2UI surface. |

## Classes

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/a2ui/model/processor/A2uiJsonMessageParser` | Parses JSON strings into `https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiServerToClientMessage` protocol messages. |

## Enums

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/a2ui/model/processor/A2uiJsonToken` | Identifies the type of the next JSON token. |

## Extension functions summary

|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/a2ui/model/processor/A2uiMessageProcessor.https://developer.android.com/reference/kotlin/androidx/a2ui/model/processor/package-summary#(androidx.a2ui.model.processor.A2uiMessageProcessor).processInput(androidx.a2ui.model.processor.A2uiMessageParser,kotlin.Any)( parser: https://developer.android.com/reference/kotlin/androidx/a2ui/model/processor/A2uiMessageParser<T>, input: T )` Parses `https://developer.android.com/reference/kotlin/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/kotlin/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. |

## Extension functions

### A2uiMessageProcessor.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)

```
fun <T : Any?> A2uiMessageProcessor.processInput(
    parser: A2uiMessageParser<T>,
    input: T
): Unit
```

Parses `https://developer.android.com/reference/kotlin/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/kotlin/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/kotlin/androidx/a2ui/model/protocol/A2uiException` (such as `https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiException.A2uiValidationException`), the exception is caught, converted into an `https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiClientErrorMessage`, and sent to `https://developer.android.com/reference/kotlin/androidx/a2ui/model/processor/A2uiMessageProcessor#processError(androidx.a2ui.model.protocol.A2uiClientErrorMessage)`. Unexpected runtime exceptions are not caught.

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