com.caucho.resin
Class ServletEmbed

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

public class ServletEmbed
extends java.lang.Object

Embeddable version of a servlet

 ResinEmbed resin = new ResinEmbed();

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

 ServletEmbed myServlet = new ServletEmbed("my-servlet", "qa.MyServlet");
 webApp.addServlet(myServlet);

 resin.addWebApp(webApp);
 


Constructor Summary
ServletEmbed()
          Creates a new embedded servlet
ServletEmbed(java.lang.String servletClass)
          Creates a new embedded servlet
ServletEmbed(java.lang.String servletClass, java.lang.String servletName)
          Creates a new embedded servlet
 
Method Summary
 void addProperty(java.lang.String name, java.lang.Object value)
          Adds an init/ioc property.
protected  void configure(ServletConfigImpl servletConfig)
           
 java.lang.String getServletClass()
          The servlet-class
 java.lang.String getServletName()
          The servlet-name
 void setAsyncSupported(boolean isSupported)
          Sets true if the servlet can use async/comet
 void setInitParam(java.lang.String name, java.lang.String value)
          Sets an init-param.
 void setLoadOnStartup(int loadOnStartup)
          Sets the load-on-startup parameter.
 void setProtocol(ServletProtocolEmbed protocol)
          Sets the remoting protocol
 void setServletClass(java.lang.String servletClass)
          The servlet-class
 void setServletName(java.lang.String servletName)
          The servlet-name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServletEmbed

public ServletEmbed()
Creates a new embedded servlet


ServletEmbed

public ServletEmbed(java.lang.String servletClass)
Creates a new embedded servlet

Parameters:
servletClass - the servlet-class

ServletEmbed

public ServletEmbed(java.lang.String servletClass,
                    java.lang.String servletName)
Creates a new embedded servlet

Parameters:
servletClass - the servlet-class
servletName - the servlet-name
Method Detail

setServletName

public void setServletName(java.lang.String servletName)
The servlet-name


getServletName

public java.lang.String getServletName()
The servlet-name


setServletClass

public void setServletClass(java.lang.String servletClass)
The servlet-class


getServletClass

public java.lang.String getServletClass()
The servlet-class


setLoadOnStartup

public void setLoadOnStartup(int loadOnStartup)
Sets the load-on-startup parameter.


setAsyncSupported

public void setAsyncSupported(boolean isSupported)
Sets true if the servlet can use async/comet


setInitParam

public void setInitParam(java.lang.String name,
                         java.lang.String value)
Sets an init-param.


addProperty

public void addProperty(java.lang.String name,
                        java.lang.Object value)
Adds an init/ioc property.


setProtocol

public void setProtocol(ServletProtocolEmbed protocol)
Sets the remoting protocol


configure

protected void configure(ServletConfigImpl servletConfig)