|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.caucho.resin.ResinEmbed
public class ResinEmbed
Embeddable version of the Resin server.
ResinEmbed resin = new ResinEmbed();
HttpEmbed http = new HttpEmbed(8080);
resin.addPort(http);
WebAppEmbed webApp = new WebAppEmbed("/foo", "/home/ferg/ws/foo");
resin.addWebApp(webApp);
resin.start();
resin.join();
Constructor Summary | |
---|---|
ResinEmbed()
Creates a new resin server. |
|
ResinEmbed(java.lang.String configFile)
Creates a new resin server. |
Method Summary | |
---|---|
void |
addBean(BeanEmbed bean)
Adds a web bean. |
void |
addPort(PortEmbed port)
Adds a port to the server, e.g. |
void |
addScanRoot()
|
void |
addWebApp(WebAppEmbed webApplication)
Adds a web-app to the server. |
void |
destroy()
Destroys the embedded server |
protected void |
finalize()
|
void |
initializeEnvironment()
Initialize the Resin environment |
void |
join()
Waits for the Resin process to exit. |
static void |
main(java.lang.String[] args)
Basic embedding server. |
void |
removeWebApp(WebAppEmbed webApplication)
|
void |
request(java.io.InputStream is,
java.io.OutputStream os)
Sends a HTTP request to the embedded server for testing. |
java.lang.String |
request(java.lang.String httpRequest)
Sends a HTTP request to the embedded server for testing. |
void |
request(java.lang.String httpRequest,
java.io.OutputStream os)
Sends a HTTP request to the embedded server for testing. |
void |
resetLogManager()
Set log handler |
void |
setConfig(java.lang.String configFile)
Sets the config file |
void |
setDevelopmentMode(boolean isDevelopment)
|
void |
setIgnoreClientDisconnect(boolean isIgnore)
|
void |
setPorts(PortEmbed[] ports)
Sets a list of ports. |
void |
setRootDirectory(java.lang.String rootUrl)
Sets the root directory |
void |
setServerHeader(java.lang.String serverName)
Sets the server header |
void |
setWebApps(WebAppEmbed[] webApps)
Sets a list of webapps |
void |
start()
Starts the embedded server |
void |
stop()
Stops the embedded server |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResinEmbed()
public ResinEmbed(java.lang.String configFile)
Method Detail |
---|
public void setRootDirectory(java.lang.String rootUrl)
public void setConfig(java.lang.String configFile)
public void addPort(PortEmbed port)
port
- the embedded port to add to the serverpublic void setPorts(PortEmbed[] ports)
public void setServerHeader(java.lang.String serverName)
public void addWebApp(WebAppEmbed webApplication)
public void removeWebApp(WebAppEmbed webApplication)
public void setWebApps(WebAppEmbed[] webApps)
public void addBean(BeanEmbed bean)
public void setDevelopmentMode(boolean isDevelopment)
public void setIgnoreClientDisconnect(boolean isIgnore)
public void initializeEnvironment()
public void resetLogManager()
public void addScanRoot()
public void start()
public void stop()
public void join()
public void destroy()
public void request(java.io.InputStream is, java.io.OutputStream os) throws java.io.IOException
is
- input stream containing the HTTP requestos
- output stream to receive the request
java.io.IOException
public void request(java.lang.String httpRequest, java.io.OutputStream os) throws java.io.IOException
httpRequest
- HTTP request string, e.g. "GET /test.jsp"os
- output stream to receive the request
java.io.IOException
public java.lang.String request(java.lang.String httpRequest) throws java.io.IOException
httpRequest
- HTTP request string, e.g. "GET /test.jsp"
java.io.IOException
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |