Package com.google.gwt.core.server
Class ServerGwtBridge
- java.lang.Object
-
- com.google.gwt.core.shared.GWTBridge
-
- com.google.gwt.core.server.ServerGwtBridge
-
public class ServerGwtBridge extends GWTBridge
Implements GWT.* methods for the server.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceServerGwtBridge.ClassInstantiatorSomething that knows how to provide an instance of a requested class.static classServerGwtBridge.ClassInstantiatorBaseHelper class that provides some wrappers for looking up and instantiating a class.static interfaceServerGwtBridge.PropertiesAn interface for accessing property values.
-
Constructor Summary
Constructors Constructor Description ServerGwtBridge()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Tcreate(java.lang.Class<?> classLiteral)static ServerGwtBridgegetInstance()Get the singletonServerGwtBridgeinstance, creating it if necessary.static GwtLocalegetLocale(ServerGwtBridge.Properties properties)java.lang.StringgetProperty(java.lang.String property)Get the value of the named property, preferring a value specific to this thread (seesetThreadProperty(String, String)) over one that is set globally (seesetGlobalProperty(String, String)).java.lang.StringgetVersion()booleanisClient()voidlog(java.lang.String message, java.lang.Throwable e)voidregister(java.lang.Class<?> baseClass, ServerGwtBridge.ClassInstantiator instantiator)Register an instantiator to be used for any subtypes of a given base class.voidsetGlobalProperty(java.lang.String property, java.lang.String value)Set a property value globally.voidsetThreadProperty(java.lang.String property, java.lang.String value)Set a property value for only the current thread.-
Methods inherited from class com.google.gwt.core.shared.GWTBridge
getThreadUniqueID
-
-
-
-
Method Detail
-
getInstance
public static ServerGwtBridge getInstance()
Get the singletonServerGwtBridgeinstance, creating it if necessary. The instance will be registered viaGWT.setBridge(GWTBridge)and will have the default instantiators registered on it.- Returns:
- the singleton
ServerGwtBridgeinstance
-
getLocale
public static GwtLocale getLocale(ServerGwtBridge.Properties properties)
-
create
public <T> T create(java.lang.Class<?> classLiteral)
-
getProperty
public java.lang.String getProperty(java.lang.String property)
Get the value of the named property, preferring a value specific to this thread (seesetThreadProperty(String, String)) over one that is set globally (seesetGlobalProperty(String, String)).- Parameters:
property-- Returns:
- the property's value or null if none
-
getVersion
public java.lang.String getVersion()
- Specified by:
getVersionin classGWTBridge
-
log
public void log(java.lang.String message, java.lang.Throwable e)
-
register
public void register(java.lang.Class<?> baseClass, ServerGwtBridge.ClassInstantiator instantiator)Register an instantiator to be used for any subtypes of a given base class.- Parameters:
baseClass-instantiator-
-
setGlobalProperty
public void setGlobalProperty(java.lang.String property, java.lang.String value)Set a property value globally. This value will be overridden by any thread-specific property value of the same name.- Parameters:
property-value-
-
setThreadProperty
public void setThreadProperty(java.lang.String property, java.lang.String value)Set a property value for only the current thread. This value will override any global property value of the same name.- Parameters:
property-value-
-
-