The FluentConfigurator uses a the Fluent Interface style as described by Martin Fowler.
To wire up the configuration programmatically rather than having to use dwr.xml, you'll need to:
org.directwebremoting.fluent.FluentConfigurator which implements the configure() method.customConfigurator' to the DWR servlet in web.xml to point at your new class.The implementation of configure() will look something like this:
public void configure() {
withConverterType("dog", "com.yourcompany.beans.Dog");
withCreatorType("ejb", "com.yourcompany.dwr.creator.EJBCreator");
withCreator("new", "ApartmentDAO")
.addParam("scope", session)
.addParam("class", "com.yourcompany.dao.ApartmentDAO")
.exclude("saveApartment")
.withAuth("method", "role");
withCreator("struts", "DogDAO")
.addParam("clas", "com.yourcompany.dao.DogDAO")
.include("getDog")
.include("getColor");
withConverter("dog", "*.Dog")
.addParam("name", "value");
withSignature()
.addLine("import java.util.List;")
.addLine("import com.example.Check;")
.addLine("Check.setLotteryResults(List<Integer> nos);");
}
For more information see the JavaDoc for FluentConfigurator
DWR's fluent configurator was originally contributed by Aaron Johnson.