public interface TypeNameObfuscator
StandardSerializationPolicy
.
The particulars of the implementation are deeply tied to the specifics of the RPC wire format and the code generated by TypeSerializerCreator.
This interface is not public in order to allow the API to be switched from Strings to ints in a future revision.
Modifier and Type | Field and Description |
---|---|
static String |
SERVICE_INTERFACE_ID
A reserved ID for specifying the identifier for the service interface
itself.
|
Modifier and Type | Method and Description |
---|---|
String |
getClassNameForTypeId(String id)
Returns the name of the class that should be instantiated based on an
obfuscated identifier.
|
String |
getTypeIdForClass(Class<?> clazz)
Returns the obfuscated identifier to be used to encode a class in the RPC
wire format.
|
static final String SERVICE_INTERFACE_ID
String getClassNameForTypeId(String id) throws SerializationException
id
- the type id that was present in the RPC payloadClass#forName
,
to be instantiatedSerializationException
- if there is no class that corresponds to the
obfuscated idString getTypeIdForClass(Class<?> clazz) throws SerializationException
clazz
- the class to be transmittedSerializationException
Copyright © 2016. All rights reserved.