-
@ExperimentalApi(value = https://github.com/grpc/grpc-java/issues/8022) public final class InboundParcelablePolicyContains 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 classInboundParcelablePolicy.BuilderA builder for InboundParcelablePolicy.
-
Field Summary
Fields Modifier and Type Field Description public final static intMAX_PARCELABLE_METADATA_SIZEpublic final static InboundParcelablePolicyDEFAULTprivate final intmaxParcelableMetadataSize
-
Method Summary
Modifier and Type Method Description intgetMaxParcelableMetadataSize()booleanshouldAcceptParcelableMetadataValues()booleanshouldAcceptParcelableMessages()static InboundParcelablePolicy.BuildernewBuilder()-
-
Method Detail
-
getMaxParcelableMetadataSize
int getMaxParcelableMetadataSize()
-
shouldAcceptParcelableMetadataValues
boolean shouldAcceptParcelableMetadataValues()
-
shouldAcceptParcelableMessages
boolean shouldAcceptParcelableMessages()
-
newBuilder
static InboundParcelablePolicy.Builder newBuilder()
-
-
-
-