public class SockJsServer extends Object
options
set, an
onConnection(org.projectodd.sockjs.SockJsServer.OnConnectionHandler)
handler added, and the server is then passed to a
SockJsServlet to handle the routing of requests.Modifier and Type | Class and Description |
---|---|
static interface |
SockJsServer.OnConnectionHandler |
static class |
SockJsServer.Options |
Modifier and Type | Field and Description |
---|---|
SockJsServer.Options |
options |
Constructor and Description |
---|
SockJsServer() |
Modifier and Type | Method and Description |
---|---|
void |
clearTimeout(ScheduledFuture future) |
void |
destroy() |
void |
dispatch(SockJsRequest req,
SockJsResponse res) |
void |
emitConnection(SockJsConnection connection) |
void |
init() |
void |
onConnection(SockJsServer.OnConnectionHandler handler)
Handle incoming connections - a SockJsServer isn't very useful
unless you set an OnConnectionHandler here.
|
protected DispatchFunction[] |
optsFilters() |
protected DispatchFunction[] |
optsFilters(DispatchFunction optionsFilter) |
protected String |
p(String match) |
ScheduledFuture |
setTimeout(Runnable callback,
long delay) |
protected String[] |
t(String match) |
public SockJsServer.Options options
public void init()
public void destroy()
public void dispatch(SockJsRequest req, SockJsResponse res) throws SockJsException
SockJsException
protected DispatchFunction[] optsFilters()
protected DispatchFunction[] optsFilters(DispatchFunction optionsFilter)
public void onConnection(SockJsServer.OnConnectionHandler handler)
handler
- The handler to call when a new connection is establishedpublic void emitConnection(SockJsConnection connection)
public ScheduledFuture setTimeout(Runnable callback, long delay)
public void clearTimeout(ScheduledFuture future)
Copyright © 2015. All rights reserved.