public class JwwfServer
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static LogHandler |
logger |
static int |
userIdleTime |
| Constructor and Description |
|---|
JwwfServer(int port)
Server constructor
|
| Modifier and Type | Method and Description |
|---|---|
JwwfServer |
bindJettyServlet(org.eclipse.jetty.servlet.ServletHolder servletHolder,
java.lang.String url)
Binds Jetty servlet to URL, this allows creation of REST APIs, etc
|
JwwfServer |
bindWebapp(java.lang.Class<? extends User> user)
Binds webapp to '/' address
|
JwwfServer |
bindWebapp(java.lang.Class<? extends User> user,
java.lang.String url)
Binds webapp to address, by default '/'
|
static void |
debugOutput(boolean enable) |
JwwfServer |
join()
Waits for jetty server
|
void |
setApiUrl(java.lang.String url)
Sometimes you have to release your application and you can't set proxy for
websocket connections, you need to set url of api here.
|
static void |
setQuietLogger() |
JwwfServer |
start()
Starts Jetty server in background
|
JwwfServer |
startAndJoin()
Starts Jetty server and waits for it
|
public static LogHandler logger
public static int userIdleTime
public JwwfServer(int port)
port - Port to bind server topublic JwwfServer bindWebapp(java.lang.Class<? extends User> user, java.lang.String url)
user - User class for the web applicationurl - Url to bind to, myst begin and end with /, like /foo/bar/public JwwfServer bindWebapp(java.lang.Class<? extends User> user)
user - User class for the web applicationpublic JwwfServer bindJettyServlet(org.eclipse.jetty.servlet.ServletHolder servletHolder, java.lang.String url)
servletHolder - Jetty servlet holderurl - URL to bind servlet topublic JwwfServer start()
public JwwfServer startAndJoin()
public JwwfServer join()
public void setApiUrl(java.lang.String url)
url - Url to set, default(auto) is ws://"+document.location.host+"/wshndpublic static void debugOutput(boolean enable)
public static void setQuietLogger()