@ExperimentalApi(value="https://github.com/grpc/grpc-java/issues/8022")
public final class InboundParcelablePolicy
extends java.lang.Object
Since parcelables are generally error prone and parsing a parcelable can have unspecified side-effects, their use is generally discouraged. Some use cases require them though (E.g. when dealing with some platform-defined objects), so this policy allows them to be supported.
Parcelables can arrive as RPC messages, or as metadata values (in headers or footers). The default is to reject both cases, failing the RPC with a PERMISSION_DENED status code. This policy can be updated to accept one or both cases.
| Modifier and Type | Class and Description |
|---|---|
static class |
InboundParcelablePolicy.Builder
A builder for InboundParcelablePolicy.
|
| Modifier and Type | Field and Description |
|---|---|
static InboundParcelablePolicy |
DEFAULT |
static int |
MAX_PARCELABLE_METADATA_SIZE
The maximum allowed total size of Parcelables in metadata.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getMaxParcelableMetadataSize() |
static InboundParcelablePolicy.Builder |
newBuilder() |
boolean |
shouldAcceptParcelableMessages() |
boolean |
shouldAcceptParcelableMetadataValues() |
public static final int MAX_PARCELABLE_METADATA_SIZE
public static final InboundParcelablePolicy DEFAULT
public boolean shouldAcceptParcelableMetadataValues()
public boolean shouldAcceptParcelableMessages()
public int getMaxParcelableMetadataSize()
public static InboundParcelablePolicy.Builder newBuilder()