-
@ExperimentalApi(value = https://github.com/grpc/grpc-java/issues/8022) public final class InboundParcelablePolicy
Contains the policy for accepting inbound parcelable objects.
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
InboundParcelablePolicy.Builder
A builder for InboundParcelablePolicy.
-
Field Summary
Fields Modifier and Type Field Description public final static int
MAX_PARCELABLE_METADATA_SIZE
public final static InboundParcelablePolicy
DEFAULT
private final int
maxParcelableMetadataSize
-
Method Summary
Modifier and Type Method Description int
getMaxParcelableMetadataSize()
boolean
shouldAcceptParcelableMetadataValues()
boolean
shouldAcceptParcelableMessages()
static InboundParcelablePolicy.Builder
newBuilder()
-
-
Method Detail
-
getMaxParcelableMetadataSize
int getMaxParcelableMetadataSize()
-
shouldAcceptParcelableMetadataValues
boolean shouldAcceptParcelableMetadataValues()
-
shouldAcceptParcelableMessages
boolean shouldAcceptParcelableMessages()
-
newBuilder
static InboundParcelablePolicy.Builder newBuilder()
-
-
-
-