|
XMOJO 5 API Docs | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.adventnet.adaptors.html.JettyHtmlServer
This class plugs in the Jetty WebServer to the HtmlAdaptor.
HttpServerInterface
Constructor Summary | |
JettyHtmlServer()
Primary constructor for the HttpServerImpl without any configuration options. |
|
JettyHtmlServer(int port,
boolean authentication)
Secondary constructor with configuration options. |
|
JettyHtmlServer(int port,
boolean authentication,
boolean sslSupport)
Constructor with configuration options. |
|
JettyHtmlServer(int port,
boolean authentication,
boolean sslSupport,
boolean isJarFile)
Constructor with configuration options. |
Method Summary | |
void |
addUser(java.lang.String userName,
java.lang.String passwd)
This method adds a new User with the userName and password to the Authentication of the WebServer. |
java.lang.String |
getConfigFileName()
Getter for the configFileName. |
java.lang.String |
getConfigJarFile()
Setter for the configuration file Name which will be inside the jar containing this class. |
java.lang.Integer |
getPort()
Returns the port number in which the http server gets started. |
boolean |
isAuthentication()
To know whether the authentication is enabled in the WebServer. |
boolean |
isSslSupport()
To know whether the SSL Support is enabled in the WebServer. |
void |
restartHttpServer()
Restarts the WebServer. |
void |
setAuthentication(boolean auth)
Setter for enabling and disabling Authentication of the WebServer. |
void |
setConfigFileName(java.lang.String configFileName)
Setter for the configuration file Name with location. |
void |
setConfigJarFile(java.lang.String jarConfig)
Setter for the configuration file Name which will be inside the jar containing this class. |
void |
setPort(int port)
Sets the port number in which the http server to get started. |
void |
setPort(java.lang.Integer port)
Sets the port number in which the http server to get started. |
void |
setSslSupport(boolean sslSupport)
Setter for enabling and disabling SSL Support of the WebServer. |
void |
startHttpServer()
Starts the HttpServer - Jetty WebServer. |
void |
stopHttpServer()
Stops the WebServer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JettyHtmlServer()
public JettyHtmlServer(int port, boolean authentication)
port
- The port to start the WebServerauthentication
- The boolean flag to turn ON/OFF
Authentication of the Requests. Default is false.public JettyHtmlServer(int port, boolean authentication, boolean sslSupport)
port
- The port to start the WebServerauthentication
- The boolean flag to turn ON/OFF
Authentication of the Requests. Default is false.sslSupport
- The boolean flag to turn ON/OFF SSL Support.
Default is false.public JettyHtmlServer(int port, boolean authentication, boolean sslSupport, boolean isJarFile)
port
- The port to start the WebServerauthentication
- The boolean flag to turn ON/OFF
Authentication of the Requests. Default is false.sslSupport
- The boolean flag to turn ON/OFF SSL Support.
Default is false.isJarFile
- Boolean flag to indicate configuration files taken from Jar.Method Detail |
public void setConfigFileName(java.lang.String configFileName)
setConfigFileName
in interface HttpServerInterface
configFileName
- The configuration file name with path.public java.lang.String getConfigFileName()
getConfigFileName
in interface HttpServerInterface
public void setConfigJarFile(java.lang.String jarConfig)
jarConfig
- The configuration file name with path as in the jar File.public java.lang.String getConfigJarFile()
public java.lang.Integer getPort()
setPort(Integer port)
public void setPort(java.lang.Integer port) throws java.lang.Exception
the
- port number of the http web-server.getPort()
public void setPort(int port)
setPort
in interface HttpServerInterface
the
- port number of the http web-server.getPort()
public void setAuthentication(boolean auth)
auth
- The flag for turning ON/OFF the authentication of WebServer.public boolean isAuthentication()
public void addUser(java.lang.String userName, java.lang.String passwd)
userName
- The user name to be added.password
- The password for the user.public void setSslSupport(boolean sslSupport)
sslSupport
- The flag for turning ON/OFF the SSL Support of WebServer.public boolean isSslSupport()
public void startHttpServer() throws java.lang.Exception
startHttpServer
in interface HttpServerInterface
java.lang.Exception
- on error while starting WebServer.stopHttpServer()
public void stopHttpServer() throws java.lang.Exception
stopHttpServer
in interface HttpServerInterface
java.lang.Exception
- on error while stopping WebServer.public void restartHttpServer() throws java.lang.Exception
restartHttpServer
in interface HttpServerInterface
java.lang.Exception
- while error trying to restart the WebServer
|
XMOJO 5 API Docs | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |