public interface

TypeNameObfuscator

com.google.gwt.user.server.rpc.impl.TypeNameObfuscator
Known Indirect Subclasses

Class Overview

This is a private interface that allows ProxyCreator to provide obfuscated type names to the server components via 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.

Summary

Constants
String SERVICE_INTERFACE_ID A reserved ID for specifying the identifier for the service interface itself.
Public Methods
abstract String getClassNameForTypeId(String id)
Returns the name of the class that should be instantiated based on an obfuscated identifier.
abstract String getTypeIdForClass(Class<?> clazz)
Returns the obfuscated identifier to be used to encode a class in the RPC wire format.

Constants

public static final String SERVICE_INTERFACE_ID

A reserved ID for specifying the identifier for the service interface itself.

Constant Value: "_"

Public Methods

public abstract String getClassNameForTypeId (String id)

Returns the name of the class that should be instantiated based on an obfuscated identifier.

Parameters
id the type id that was present in the RPC payload
Returns
  • the name of the class, suitable for use by forName(String), to be instantiated
Throws
SerializationException if there is no class that corresponds to the obfuscated id

public abstract String getTypeIdForClass (Class<?> clazz)

Returns the obfuscated identifier to be used to encode a class in the RPC wire format.

Parameters
clazz the class to be transmitted
Returns
  • the obfuscated type identifier.