|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.inject.AbstractModule
org.directwebremoting.guice.AbstractDwrModule
public abstract class AbstractDwrModule
An extension of AbstractModule that adds DWR configuration methods,
in conjunction with DwrGuiceServlet.
| Constructor Summary | |
|---|---|
AbstractDwrModule()
|
|
| Method Summary | ||
|---|---|---|
protected void |
bindAnnotatedClasses(java.lang.Class... classes)
Call this method in configure
to specify classes that DWR should scan for annotations. |
|
protected com.google.inject.binder.LinkedBindingBuilder<org.directwebremoting.extend.Converter> |
bindConversion(java.lang.Class<?> type)
Creates a binding for a conversion for type. |
|
protected
|
bindConversion(java.lang.Class<T> type,
java.lang.Class<? extends T> impl)
Creates a binding for a conversion for type using an existing
conversion for impl, which must be assignable to type. |
|
protected com.google.inject.binder.LinkedBindingBuilder<org.directwebremoting.extend.Converter> |
bindConversion(java.lang.String match)
Creates a binding for a conversion for types with names matching match. |
|
protected void |
bindDwrScopes()
Configure DWR scopes and bindings for servlet-related types; incompatible with Guice's ServletModule because their
bindings for request, response, and session conflict. |
|
protected void |
bindDwrScopes(boolean bindPotentiallyConflictingTypes)
Configure DWR scopes and bindings for servlet-related types, specifying whether to include bindings that conflict with those provided by Guice's ServletModule. |
|
protected com.google.inject.binder.LinkedBindingBuilder<org.directwebremoting.AjaxFilter> |
bindFilter(java.lang.String scriptName)
Creates a binding for an Ajax filter for the script named scriptName. |
|
protected com.google.inject.binder.LinkedBindingBuilder<org.directwebremoting.AjaxFilter> |
bindGlobalFilter()
Creates a binding for a global Ajax filter. |
|
protected com.google.inject.binder.ConstantBindingBuilder |
bindParameter(ParamName paramName)
Call this method in configure
to create a binding for a DWR parameter. |
|
protected
|
bindRemoted(java.lang.Class<T> type)
Creates a binding to type that is used as the target of a
remote method call with the class's unqualified name as the script name. |
|
protected
|
bindRemotedAs(java.lang.String scriptName,
java.lang.Class<T> type)
Creates a binding to a type that is used as the target of a remote method call with the given scriptName. |
|
protected abstract void |
configure()
Implement this method to configure Guice bindings for a DWR-based web application. |
|
| Methods inherited from class com.google.inject.AbstractModule |
|---|
addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindScope, configure, install, requestStaticInjection |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractDwrModule()
| Method Detail |
|---|
protected abstract void configure()
configure in class com.google.inject.AbstractModuleprotected void bindDwrScopes()
ServletModule because their
bindings for request, response, and session conflict.
protected void bindDwrScopes(boolean bindPotentiallyConflictingTypes)
ServletModule.
bindPotentiallyConflictingTypes - whether to bind request, response,
and session types (risking conflict with Guice)protected com.google.inject.binder.LinkedBindingBuilder<org.directwebremoting.extend.Converter> bindConversion(java.lang.String match)
match.
match - the string describing which types to convertprotected com.google.inject.binder.LinkedBindingBuilder<org.directwebremoting.extend.Converter> bindConversion(java.lang.Class<?> type)
type.
type - the type to be converted
protected <T> void bindConversion(java.lang.Class<T> type,
java.lang.Class<? extends T> impl)
type using an existing
conversion for impl, which must be assignable to type.
The check for an existing conversion happens at run-time.
type - the type to be convertedprotected <T> com.google.inject.binder.LinkedBindingBuilder<T> bindRemoted(java.lang.Class<T> type)
type that is used as the target of a
remote method call with the class's unqualified name as the script name.
Note: if you are scoping the result, don't rely on implicit binding. Instead, link the type to itself explicitly. For example,
bindRemoted(ConcreteService.class)
.to(ConcreteService.class) // this line is required
.in(DwrScopes.SESSION);
This could be considered a bug.
type - the type to bind as a target for remote method calls
protected <T> com.google.inject.binder.LinkedBindingBuilder<T> bindRemotedAs(java.lang.String scriptName,
java.lang.Class<T> type)
scriptName.
Note: if you are scoping the result, don't rely on implicit binding. Instead, link the type to itself explicitly. For example,
bindRemotedAs("Mixer", ConcreteService.class)
.to(ConcreteService.class) // this line is required
.in(DwrScopes.SESSION);
This could be considered a bug.
type - the type to bind as a target for remote method callsscriptName - the name by which the target type will be known to script callersprotected com.google.inject.binder.LinkedBindingBuilder<org.directwebremoting.AjaxFilter> bindFilter(java.lang.String scriptName)
scriptName.
scriptName - the script to filterprotected com.google.inject.binder.LinkedBindingBuilder<org.directwebremoting.AjaxFilter> bindGlobalFilter()
scriptName - the script to filterprotected com.google.inject.binder.ConstantBindingBuilder bindParameter(ParamName paramName)
configure
to create a binding for a DWR parameter.
paramName - a parameter name supported by DWRprotected void bindAnnotatedClasses(java.lang.Class... classes)
configure
to specify classes that DWR should scan for annotations.
classes - the classes to be scanned for DWR-specific annotations
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||