public class

DelegatingClientOracle

extends ClientOracle
java.lang.Object
   ↳ com.google.gwt.rpc.server.ClientOracle
     ↳ com.google.gwt.rpc.server.DelegatingClientOracle

Class Overview

A delegate-pattern ClientOracle that can be used to introduce custom behavior.

Summary

Public Constructors
DelegatingClientOracle(ClientOracle delegate)
Public Methods
CommandSink createCommandSink(OutputStream out)
Create a CommandSink that can encode a payload for the client.
String createUnusedIdent(String ident)
Returns an identifier that does not conflict with any symbols defined in the client.
CastableTypeData getCastableTypeData(Class<?> clazz)
Returns the Json castableType data for a given type.
String getFieldId(Class<?> clazz, String fieldName)
Given a base type and the unobfuscated field name, find the obfuscated name for the field in the client.
String getFieldId(Enum<?> value)
Return the field name for a given enum value.
String getFieldId(String className, String fieldName)
This is similar to getFieldId(Class, String) but does not search supertypes.
Pair<Class<?>, String> getFieldName(Class<?> clazz, String fieldId)
Return the name of a field from a client-side id.
String getMethodId(String className, String methodName, String... jsniArgTypes)
This is similar to #getMethodId(Class, String, Class...) but does not search supertypes.
String getMethodId(Class<?> clazz, String methodName, Class...<?> args)
Returns the name of the top-level function which implements the named method that takes the exact arguments specified.
Field[] getOperableFields(Class<?> clazz)
Returns the fields of a given class that should be serialized.
int getQueryId(Class<?> clazz)
Returns the assigned castability queryId of a given type.
String getSeedName(Class<?> clazz)
Returns the name of the top-level function that is used as the seed function for a given type.
String getTypeName(String seedName)
Returns the deobfuscated name of a type based on the name of the type's seed function.
boolean isScript()
Indicates whether or not the remote client is running as compiled script.
[Expand]
Inherited Methods
From class com.google.gwt.rpc.server.ClientOracle
From class java.lang.Object

Public Constructors

public DelegatingClientOracle (ClientOracle delegate)

Public Methods

public CommandSink createCommandSink (OutputStream out)

Create a CommandSink that can encode a payload for the client.

Parameters
out the OutputStream to which the output will be written
Returns
  • a CommandSink
Throws
IOException

public String createUnusedIdent (String ident)

Returns an identifier that does not conflict with any symbols defined in the client. This method does not accumulate any state.

public CastableTypeData getCastableTypeData (Class<?> clazz)

Returns the Json castableType data for a given type.

public String getFieldId (Class<?> clazz, String fieldName)

Given a base type and the unobfuscated field name, find the obfuscated name for the field in the client. This will search superclasses as well for the first matching field.

public String getFieldId (Enum<?> value)

Return the field name for a given enum value.

public String getFieldId (String className, String fieldName)

This is similar to getFieldId(Class, String) but does not search supertypes. It is intended to be used to access "magic" GWT types.

public Pair<Class<?>, String> getFieldName (Class<?> clazz, String fieldId)

Return the name of a field from a client-side id. This will search superclasses for the first instance of the named field.

Returns
  • The field's declaring class and the name of the field

public String getMethodId (String className, String methodName, String... jsniArgTypes)

This is similar to #getMethodId(Class, String, Class...) but does not search supertypes. It is intended to be used to access "magic" GWT types.

public String getMethodId (Class<?> clazz, String methodName, Class...<?> args)

Returns the name of the top-level function which implements the named method that takes the exact arguments specified. This will search in the given class as well as its supertypes.

public Field[] getOperableFields (Class<?> clazz)

Returns the fields of a given class that should be serialized. This method does not crawl supertypes.

public int getQueryId (Class<?> clazz)

Returns the assigned castability queryId of a given type.

public String getSeedName (Class<?> clazz)

Returns the name of the top-level function that is used as the seed function for a given type.

public String getTypeName (String seedName)

Returns the deobfuscated name of a type based on the name of the type's seed function.

public boolean isScript ()

Indicates whether or not the remote client is running as compiled script. This may be used to optimize the payload based on assumptions that can be mode about web-mode or hosted-mode clients.