org.directwebremoting.guice
Class GuiceCreator

java.lang.Object
  extended by org.directwebremoting.extend.AbstractCreator
      extended by org.directwebremoting.create.NewCreator
          extended by org.directwebremoting.guice.GuiceCreator
All Implemented Interfaces:
Creator

public class GuiceCreator
extends NewCreator
implements Creator

A creator that uses Guice dependency injection to create remoted objects.

Author:
Tim Peierls [tim at peierls dot net]

Field Summary
 
Fields inherited from interface org.directwebremoting.extend.Creator
APPLICATION, PAGE, REQUEST, SCRIPT, SESSION
 
Constructor Summary
GuiceCreator()
           
 
Method Summary
 java.lang.Object getInstance()
          Looks up an instance of this creator's type with an Injector.
 java.lang.Class<?> getType()
          The class named through setClass.
 void setClass(java.lang.String classname)
          Specified via @RemoteProxy or via a parameter in XML configuration.
 
Methods inherited from class org.directwebremoting.create.NewCreator
getClassName, setClassName
 
Methods inherited from class org.directwebremoting.extend.AbstractCreator
getJavascript, getScope, isCacheable, isHidden, setCacheable, setHidden, setJavascript, setProperties, setScope, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.directwebremoting.extend.Creator
getJavascript, getScope, isCacheable, isHidden, setProperties
 

Constructor Detail

GuiceCreator

public GuiceCreator()
Method Detail

setClass

public void setClass(java.lang.String classname)
Specified via @RemoteProxy or via a parameter in XML configuration.

Overrides:
setClass in class NewCreator
Parameters:
classname - The name of the class

getType

public java.lang.Class<?> getType()
The class named through setClass.

Specified by:
getType in interface Creator
Overrides:
getType in class NewCreator
Returns:
The type of this allowed class

getInstance

public java.lang.Object getInstance()
Looks up an instance of this creator's type with an Injector.

Specified by:
getInstance in interface Creator
Overrides:
getInstance in class NewCreator
Returns:
the instance to use

Copyright 2008