public class Http4K extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static Http4K |
instance |
protected Map<Integer,org.nustaq.kontraktor.util.Pair<io.undertow.server.handlers.PathHandler,io.undertow.Undertow>> |
serverMap |
static int |
UNDERTOW_IO_THREADS |
static int |
UNDERTOW_WORKER_THREADS |
| Constructor and Description |
|---|
Http4K() |
| Modifier and Type | Method and Description |
|---|---|
static BldFourK |
Build(String hostName,
int port) |
static BldFourK |
Build(String hostName,
int port,
SSLContext ctx) |
BldFourK |
builder(String hostName,
int port) |
BldFourK |
builder(String hostName,
int port,
SSLContext ctx) |
protected io.undertow.Undertow.Builder |
customize(io.undertow.Undertow.Builder builder,
io.undertow.server.handlers.PathHandler rootPathHandler,
int port,
String hostName,
SSLContext context) |
static Http4K |
get() |
org.nustaq.kontraktor.util.Pair<io.undertow.server.handlers.PathHandler,io.undertow.Undertow> |
getServer(int port,
String hostName)
creates or gets an undertow web server instance mapped by port.
|
org.nustaq.kontraktor.util.Pair<io.undertow.server.handlers.PathHandler,io.undertow.Undertow> |
getServer(int port,
String hostName,
SSLContext context) |
org.nustaq.kontraktor.IPromise<org.nustaq.kontraktor.remoting.base.ActorServer> |
publish(HttpPublisher publisher)
utility, just redirects to approriate connector.
|
org.nustaq.kontraktor.IPromise<org.nustaq.kontraktor.remoting.base.ActorServer> |
publish(WebSocketPublisher publisher)
utility, just redirects to approriate connector
Publishes an actor/service via websockets protocol with given encoding.
|
Http4K |
publishFileSystem(String hostName,
String urlPath,
int port,
File root)
publishes given file root
|
Http4K |
publishFileSystem(String hostName,
String urlPath,
int port,
io.undertow.server.handlers.resource.FileResourceManager man) |
Http4K |
publishHandler(String hostName,
String urlPath,
int port,
io.undertow.server.HttpHandler handler) |
Http4K |
publishResourcePath(String hostName,
String urlPath,
int port,
DynamicResourceManager man,
boolean compress) |
static void |
set(Http4K http) |
public static int UNDERTOW_IO_THREADS
public static int UNDERTOW_WORKER_THREADS
protected static Http4K instance
public static void set(Http4K http)
public static Http4K get()
public static BldFourK Build(String hostName, int port, SSLContext ctx)
public org.nustaq.kontraktor.util.Pair<io.undertow.server.handlers.PathHandler,io.undertow.Undertow> getServer(int port,
String hostName)
port - hostName - public org.nustaq.kontraktor.util.Pair<io.undertow.server.handlers.PathHandler,io.undertow.Undertow> getServer(int port,
String hostName,
SSLContext context)
public BldFourK builder(String hostName, int port, SSLContext ctx)
protected io.undertow.Undertow.Builder customize(io.undertow.Undertow.Builder builder,
io.undertow.server.handlers.PathHandler rootPathHandler,
int port,
String hostName,
SSLContext context)
public Http4K publishFileSystem(String hostName, String urlPath, int port, File root)
hostName - urlPath - - prefixPath (e.g. /myapp/resource)port - root - - directory to be publishedpublic Http4K publishFileSystem(String hostName, String urlPath, int port, io.undertow.server.handlers.resource.FileResourceManager man)
public Http4K publishResourcePath(String hostName, String urlPath, int port, DynamicResourceManager man, boolean compress)
public org.nustaq.kontraktor.IPromise<org.nustaq.kontraktor.remoting.base.ActorServer> publish(WebSocketPublisher publisher)
public org.nustaq.kontraktor.IPromise<org.nustaq.kontraktor.remoting.base.ActorServer> publish(HttpPublisher publisher)
Copyright © 2016. All rights reserved.