public class RatpackDataServer extends AbstractDataServer<ratpack.handling.Context>
DataApi
.AbstractDataServer.ResponseData
Modifier and Type | Field and Description |
---|---|
protected ratpack.func.Action<ratpack.server.ServerConfigBuilder> |
baseDirConfigurator |
protected ratpack.func.Action<ratpack.handling.Chain> |
handlerGetData |
protected ratpack.func.Action<ratpack.handling.Chain> |
handlerPostInit |
protected ratpack.func.Action<ratpack.handling.Chain> |
handlerPostInput |
protected ratpack.func.Action<ratpack.handling.Chain> |
handlerStaticAssets |
protected ratpack.func.Action<ratpack.handling.Chain> |
handlerTexttermAssets |
protected ratpack.func.Action<ratpack.server.ServerConfigBuilder> |
portConfigurator |
DEFAULT_PATH_FOR_GET_DATA, DEFAULT_PATH_FOR_INIT_DATA, DEFAULT_PATH_FOR_POST_INPUT, UTF_8_CHARSET
Constructor and Description |
---|
RatpackDataServer(BiFunction<String,String,DataApi> dataApiCreator,
Function<String,DataApi> dataApiGetter) |
Modifier and Type | Method and Description |
---|---|
protected List<ratpack.func.Action<ratpack.guice.BindingsSpec>> |
getBindings() |
protected List<ratpack.func.Action<ratpack.server.ServerConfigBuilder>> |
getConfigurators() |
DataApiProvider<ratpack.handling.Context> |
getDataApiProvider() |
protected List<ratpack.func.Action<ratpack.handling.Chain>> |
getHandlers() |
protected static String |
getId(ratpack.handling.Context ctx) |
int |
getPort() |
protected Optional<String> |
getResourceContent(String resourceName) |
protected Optional<String> |
getUrlContent(URL url) |
void |
init() |
protected void |
sendResponseData(ratpack.handling.Context ctx,
AbstractDataServer.ResponseData r) |
protected RatpackDataServer |
withBaseDir(String baseDir) |
RatpackDataServer |
withPort(int portNumber) |
getPathForGetData, getPathForPostInit, getPathForPostInput, handle, handleGetData, handleInit, handlePostInput, withPathForGetData, withPathForInitData, withPathForPostInput
protected final ratpack.func.Action<ratpack.handling.Chain> handlerPostInit
protected final ratpack.func.Action<ratpack.handling.Chain> handlerGetData
protected final ratpack.func.Action<ratpack.handling.Chain> handlerPostInput
protected final ratpack.func.Action<ratpack.handling.Chain> handlerTexttermAssets
protected final ratpack.func.Action<ratpack.handling.Chain> handlerStaticAssets
protected final ratpack.func.Action<ratpack.server.ServerConfigBuilder> portConfigurator
protected final ratpack.func.Action<ratpack.server.ServerConfigBuilder> baseDirConfigurator
public DataApiProvider<ratpack.handling.Context> getDataApiProvider()
getDataApiProvider
in class AbstractDataServer<ratpack.handling.Context>
protected List<ratpack.func.Action<ratpack.handling.Chain>> getHandlers()
protected List<ratpack.func.Action<ratpack.guice.BindingsSpec>> getBindings()
protected List<ratpack.func.Action<ratpack.server.ServerConfigBuilder>> getConfigurators()
protected RatpackDataServer withBaseDir(String baseDir)
public RatpackDataServer withPort(int portNumber)
public int getPort()
public void init()
protected void sendResponseData(ratpack.handling.Context ctx, AbstractDataServer.ResponseData r)
protected static String getId(ratpack.handling.Context ctx)