public class ServletEmbed
extends java.lang.Object
ResinEmbed resin = new ResinEmbed();
WebAppEmbed webApp = new WebAppEmbed("/foo", "/var/resin/foo");
ServletEmbed myServlet = new ServletEmbed("my-servlet", "qa.MyServlet");
webApp.addServlet(myServlet);
resin.addWebApp(webApp);
Constructor and Description |
---|
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
|
Modifier and Type | Method and Description |
---|---|
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
|
public ServletEmbed()
public ServletEmbed(java.lang.String servletClass)
servletClass
- the servlet-classpublic ServletEmbed(java.lang.String servletClass, java.lang.String servletName)
servletClass
- the servlet-classservletName
- the servlet-namepublic void setServletName(java.lang.String servletName)
public java.lang.String getServletName()
public void setServletClass(java.lang.String servletClass)
public java.lang.String getServletClass()
public void setLoadOnStartup(int loadOnStartup)
public void setAsyncSupported(boolean isSupported)
public void setInitParam(java.lang.String name, java.lang.String value)
public void addProperty(java.lang.String name, java.lang.Object value)
public void setProtocol(ServletProtocolEmbed protocol)
protected void configure(ServletConfigImpl servletConfig)