com.caucho.resin
Class BeanEmbed

java.lang.Object
  extended by com.caucho.resin.BeanEmbed

public class BeanEmbed
extends java.lang.Object

Embeddable version of a singleton bean

 ResinEmbed resin = new ResinEmbed();

 WebAppEmbed webApp = new WebAppEmbed("/foo", "/var/www/foo");

 MyBean myBean = new MyBean();

 BeanEmbed bean = new BeanEmbed(myBean);

 webApp.addBean(bean);

 resin.addWebApp(webApp);
 


Constructor Summary
BeanEmbed()
          Creates a new embedded bean
BeanEmbed(java.lang.Object value)
          Creates a new embedded bean with a singleton value
BeanEmbed(java.lang.Object value, java.lang.String name)
          Creates a new embedded bean with a singleton value
BeanEmbed(java.lang.String className)
          Creates a new embedded bean with a given classname
BeanEmbed(java.lang.String className, java.lang.String name)
          Creates a new embedded bean with a given classname and name
 
Method Summary
 void addProperty(java.lang.String name, java.lang.Object value)
          Adds a property.
protected  void configure()
          Configures the bean (for internal use)
 void setClass(java.lang.String className)
          Sets the bean's classname
 void setName(java.lang.String name)
          Sets the bean's name
 void setValue(java.lang.Object value)
          Sets the bean value.
 void validate()
          validates the bean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanEmbed

public BeanEmbed()
Creates a new embedded bean


BeanEmbed

public BeanEmbed(java.lang.Object value)
Creates a new embedded bean with a singleton value


BeanEmbed

public BeanEmbed(java.lang.Object value,
                 java.lang.String name)
Creates a new embedded bean with a singleton value


BeanEmbed

public BeanEmbed(java.lang.String className)
Creates a new embedded bean with a given classname


BeanEmbed

public BeanEmbed(java.lang.String className,
                 java.lang.String name)
Creates a new embedded bean with a given classname and name

Method Detail

setClass

public void setClass(java.lang.String className)
Sets the bean's classname


setName

public void setName(java.lang.String name)
Sets the bean's name


setValue

public void setValue(java.lang.Object value)
Sets the bean value.


addProperty

public void addProperty(java.lang.String name,
                        java.lang.Object value)
Adds a property.


validate

public void validate()
validates the bean


configure

protected void configure()
Configures the bean (for internal use)