| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
logger |
static String |
UNDERTOW_EXCEPTION_CODE_REQUEST_TOO_LARGE |
| Constructor and Description |
|---|
SpincastUndertowServer(SpincastConfig config,
SpincastUndertowConfig spincastUndertowConfig,
FrontController frontController,
SpincastUtils spincastUtils,
CookieFactory cookieFactory,
CorsHandlerFactory corsHandlerFactory,
GzipCheckerHandlerFactory gzipCheckerHandlerFactory,
SkipResourceOnQueryStringHandlerFactory skipResourceOnQueryStringHandlerFactory,
SpincastResourceHandlerFactory spincastResourceHandlerFactory,
CacheBusterRemovalHandlerFactory cacheBusterRemovalHandlerFactory,
FileClassPathResourceManagerFactory fileClassPathResourceManagerFactory,
SpincastHttpAuthIdentityManagerFactory spincastHttpAuthIdentityManagerFactory,
WebsocketEndpointFactory spincastWebsocketEndpointFactory,
SSLContextFactory sslContextFactory,
ServerUtils serverUtils)
Constructor
|
protected final org.slf4j.Logger logger
public static final String UNDERTOW_EXCEPTION_CODE_REQUEST_TOO_LARGE
@Inject public SpincastUndertowServer(SpincastConfig config, SpincastUndertowConfig spincastUndertowConfig, FrontController frontController, SpincastUtils spincastUtils, CookieFactory cookieFactory, CorsHandlerFactory corsHandlerFactory, GzipCheckerHandlerFactory gzipCheckerHandlerFactory, SkipResourceOnQueryStringHandlerFactory skipResourceOnQueryStringHandlerFactory, SpincastResourceHandlerFactory spincastResourceHandlerFactory, CacheBusterRemovalHandlerFactory cacheBusterRemovalHandlerFactory, FileClassPathResourceManagerFactory fileClassPathResourceManagerFactory, SpincastHttpAuthIdentityManagerFactory spincastHttpAuthIdentityManagerFactory, WebsocketEndpointFactory spincastWebsocketEndpointFactory, SSLContextFactory sslContextFactory, ServerUtils serverUtils)
protected SpincastConfig getConfig()
protected SpincastUndertowConfig getSpincastUndertowConfig()
protected FrontController getFrontController()
protected SpincastUtils getSpincastUtils()
protected CookieFactory getCookieFactory()
protected CorsHandlerFactory getCorsHandlerFactory()
protected GzipCheckerHandlerFactory getGzipCheckerHandlerFactory()
protected SkipResourceOnQueryStringHandlerFactory getSkipResourceOnQueryStringHandlerFactory()
protected SpincastResourceHandlerFactory getSpincastResourceHandlerFactory()
protected CacheBusterRemovalHandlerFactory getCacheBusterRemovalHandlerFactory()
protected FileClassPathResourceManagerFactory getFileClassPathResourceManagerFactory()
protected SpincastHttpAuthIdentityManagerFactory getSpincastHttpAuthIdentityManagerFactory()
protected WebsocketEndpointFactory getSpincastWebsocketEndpointFactory()
protected Map<String,StaticResource<?>> getStaticResourcesServedByUrlPath()
protected Map<String,SpincastHttpAuthIdentityManager> getHttpAuthIdentityManagersByRealmName()
protected Map<String,WebsocketEndpoint> getWebsocketEndpointsMap()
protected SSLContextFactory getSslContextFactory()
protected ServerUtils getServerUtils()
public Map<String,String> getHttpAuthenticationRealms()
getHttpAuthenticationRealms in interface Serverprotected io.undertow.server.handlers.form.FormParserFactory getFormParserFactory()
protected Path createUndertowTempDir()
protected int getServerStartTryNbr()
protected long getStartServerSleepMilliseconds()
protected io.undertow.Undertow.Builder getServerBuilder()
protected void addHttpListener(io.undertow.Undertow.Builder builder,
String serverHost,
int httpServerPort)
protected void addHttpsListener(io.undertow.Undertow.Builder builder,
String serverHost,
int httpsServerPort)
protected io.undertow.Undertow.Builder addBuilderOptions(io.undertow.Undertow.Builder builder)
protected io.undertow.server.HttpHandler getFinalHandler()
protected CacheBusterRemovalHandler getCacheBusterRemovalHandler()
protected io.undertow.server.handlers.PathHandler getHttpAuthenticationHandler()
protected io.undertow.server.HttpHandler getHttpAuthHandlerNextHandler()
public void createHttpAuthenticationRealm(String pathPrefix, String realmName)
createHttpAuthenticationRealm in interface Serverprotected String getRealmNameToDisplay(String pathPrefix, String realmName)
protected SpincastHttpAuthIdentityManager getOrCreateHttpAuthIdentityManagersByRealmName(String realmName)
public void addHttpAuthentication(String realmName, String username, String password)
addHttpAuthentication in interface Serverpublic void removeHttpAuthentication(String username, String realmName)
removeHttpAuthentication in interface Serverpublic void removeHttpAuthentication(String username)
removeHttpAuthentication in interface Serverprotected io.undertow.server.HttpHandler getSpincastFrontControllerHandler()
protected int getSecondsToWaitForWebSocketEndpointsToBeProperlyClosedBeforeKillingTheServer()
protected int getMilliSecondsIncrementWhenWaitingForWebSocketEndpointsToBeProperlyClosedBeforeKillingTheServer()
protected void sendWebsocketEnpointsClosedWhenServerStops()
protected io.undertow.server.handlers.PathHandler getStaticResourcesPathHandler()
public void addStaticResourceToServe(StaticResource<?> staticResource)
addStaticResourceToServe in interface Serverpublic void removeStaticResourcesServed(StaticResourceType staticResourceType, String urlPath)
removeStaticResourcesServed in interface Serverpublic void removeAllStaticResourcesServed()
removeAllStaticResourcesServed in interface Serverprotected void removeStaticResource(StaticResourceType staticResourceType, String urlPath)
public StaticResource<?> getStaticResourceServed(String urlPath)
getStaticResourceServed in interface Serverpublic Set<StaticResource<?>> getStaticResourcesServed()
getStaticResourcesServed in interface Serverpublic HttpMethod getHttpMethod(Object exchange)
getHttpMethod in interface Serverprotected io.undertow.server.HttpServerExchange castExchange(Object exchange)
public ContentTypeDefaults getContentTypeBestMatch(Object exchangeObj)
getContentTypeBestMatch in interface Serverpublic String getFullUrlProxied(Object exchangeObj)
getFullUrlProxied in interface Serverpublic String getFullUrlProxied(Object exchangeObj, boolean keepCacheBusters)
getFullUrlProxied in interface Serverpublic String getFullUrlOriginal(Object exchangeObj)
getFullUrlOriginal in interface Serverpublic String getFullUrlOriginal(Object exchangeObj, boolean keepCacheBusters)
getFullUrlOriginal in interface Serverpublic void setResponseHeader(Object exchangeObj, String name, List<String> values)
setResponseHeader in interface Serverpublic void setResponseHeaders(Object exchange, Map<String,List<String>> headers)
setResponseHeaders in interface Serverpublic Map<String,List<String>> getResponseHeaders(Object exchangeObj)
getResponseHeaders in interface Serverpublic void removeResponseHeader(Object exchange, String name)
removeResponseHeader in interface Serverpublic void setResponseStatusCode(Object exchange, int statusCode)
setResponseStatusCode in interface Serverprotected io.undertow.io.IoCallback getDoNothingCallback()
protected io.undertow.io.IoCallback getCloseExchangeCallback()
public void flushBytes(Object exchange, byte[] bytes, boolean end)
flushBytes in interface Serverpublic boolean isResponseClosed(Object exchange)
isResponseClosed in interface Serverpublic boolean isResponseHeadersSent(Object exchange)
isResponseHeadersSent in interface Serverpublic String getRequestScheme(Object exchange)
getRequestScheme in interface Serverpublic void addCookies(Object exchange, Map<String,Cookie> cookies)
addCookies in interface Serverpublic Map<String,String> getCookies(Object exchange)
getCookies in interface Serverprotected String getCookieEncoding()
public Map<String,List<String>> getQueryStringParams(Object exchange)
getQueryStringParams in interface Serverpublic InputStream getRawInputStream(Object exchangeObj)
getRawInputStream in interface Serverprotected io.undertow.server.handlers.form.FormData getFormData(io.undertow.server.HttpServerExchange exchange)
public Map<String,List<String>> getFormData(Object exchangeObj)
getFormData in interface Serverpublic Map<String,List<UploadedFile>> getUploadedFiles(Object exchangeObj)
getUploadedFiles in interface Serverpublic boolean forceRequestSizeValidation(Object exchangeObj)
forceRequestSizeValidation in interface Serverpublic Map<String,List<String>> getRequestHeaders(Object exchangeObj)
getRequestHeaders in interface Serverprotected Object getWebsocketEndpointCreationLock(String endpointId)
public WebsocketEndpointManager websocketCreateEndpoint(String endpointId, WebsocketEndpointHandler appEndpointHandler)
websocketCreateEndpoint in interface Serverprotected WebsocketEndpointHandler createUndertowWebsocketEndpointHandler(String endpointId, WebsocketEndpointHandler appHandler)
public void websocketCloseEndpoint(String endpointId)
websocketCloseEndpoint in interface Serverpublic void websocketCloseEndpoint(String endpointId, int closingCode, String closingReason)
websocketCloseEndpoint in interface Serverpublic void websocketConnection(Object exchangeObj, String endpointId, String peerId)
websocketConnection in interface Serverpublic List<WebsocketEndpointManager> getWebsocketEndpointManagers()
getWebsocketEndpointManagers in interface Serverpublic WebsocketEndpointManager getWebsocketEndpointManager(String endpointId)
getWebsocketEndpointManager in interface ServerCopyright © 2019. All rights reserved.