Package org.wildfly.extension.undertow
Class Host
- java.lang.Object
-
- org.wildfly.extension.undertow.Host
-
- All Implemented Interfaces:
org.jboss.msc.Service
,org.jboss.msc.service.Service<Host>
,org.jboss.msc.value.Value<Host>
,FilterLocation
public class Host extends Object implements org.jboss.msc.service.Service<Host>, FilterLocation
- Author:
- Tomaz Cerar (c) 2013 Red Hat Inc., Radoslav Husar, Richard Opalka
-
-
Constructor Summary
Constructors Constructor Description Host(Consumer<Host> serviceConsumer, Supplier<Server> server, Supplier<UndertowService> undertowService, Supplier<org.jboss.as.controller.ControlledProcessStateService> controlledProcessStateService, Supplier<org.jboss.as.server.suspend.SuspendController> suspendController, String name, List<String> aliases, String defaultWebModule, int defaultResponseCode, Boolean queueRequestsOnStart)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFilter(UndertowFilter filterRef)
Map<String,io.undertow.security.api.AuthenticationMechanism>
getAdditionalAuthenticationMechanisms()
Set<String>
getAllAliases()
String
getDefaultWebModule()
Set<io.undertow.servlet.api.Deployment>
getDeployments()
Set<String>
getLocations()
String
getName()
protected io.undertow.server.HttpHandler
getOrCreateRootHandler()
protected io.undertow.server.HttpHandler
getRootHandler()
Server
getServer()
org.jboss.as.server.suspend.SuspendController.State
getSuspendState()
Host
getValue()
void
registerDeployment(io.undertow.servlet.api.Deployment deployment, io.undertow.server.HttpHandler handler)
void
registerHandler(String path, io.undertow.server.HttpHandler handler)
void
removeFilter(UndertowFilter filterRef)
protected void
setupDefaultResponseCodeHandler()
void
start(org.jboss.msc.service.StartContext context)
void
stop(org.jboss.msc.service.StopContext context)
void
unregisterDeployment(io.undertow.servlet.api.Deployment deployment)
void
unregisterHandler(String path)
-
-
-
Constructor Detail
-
Host
public Host(Consumer<Host> serviceConsumer, Supplier<Server> server, Supplier<UndertowService> undertowService, Supplier<org.jboss.as.controller.ControlledProcessStateService> controlledProcessStateService, Supplier<org.jboss.as.server.suspend.SuspendController> suspendController, String name, List<String> aliases, String defaultWebModule, int defaultResponseCode, Boolean queueRequestsOnStart)
-
-
Method Detail
-
start
public void start(org.jboss.msc.service.StartContext context) throws org.jboss.msc.service.StartException
- Specified by:
start
in interfaceorg.jboss.msc.Service
- Throws:
org.jboss.msc.service.StartException
-
stop
public void stop(org.jboss.msc.service.StopContext context)
- Specified by:
stop
in interfaceorg.jboss.msc.Service
-
getValue
public Host getValue() throws IllegalStateException, IllegalArgumentException
- Specified by:
getValue
in interfaceorg.jboss.msc.value.Value<Host>
- Throws:
IllegalStateException
IllegalArgumentException
-
getServer
public Server getServer()
-
getName
public String getName()
-
getRootHandler
protected io.undertow.server.HttpHandler getRootHandler()
-
getOrCreateRootHandler
protected io.undertow.server.HttpHandler getOrCreateRootHandler()
-
getDefaultWebModule
public String getDefaultWebModule()
-
registerDeployment
public void registerDeployment(io.undertow.servlet.api.Deployment deployment, io.undertow.server.HttpHandler handler)
-
unregisterDeployment
public void unregisterDeployment(io.undertow.servlet.api.Deployment deployment)
-
registerHandler
public void registerHandler(String path, io.undertow.server.HttpHandler handler)
-
unregisterHandler
public void unregisterHandler(String path)
-
getDeployments
public Set<io.undertow.servlet.api.Deployment> getDeployments()
- Returns:
- set of currently registered
Deployment
s on this host
-
getAdditionalAuthenticationMechanisms
public Map<String,io.undertow.security.api.AuthenticationMechanism> getAdditionalAuthenticationMechanisms()
-
addFilter
public void addFilter(UndertowFilter filterRef)
- Specified by:
addFilter
in interfaceFilterLocation
-
removeFilter
public void removeFilter(UndertowFilter filterRef)
- Specified by:
removeFilter
in interfaceFilterLocation
-
getSuspendState
public org.jboss.as.server.suspend.SuspendController.State getSuspendState()
-
setupDefaultResponseCodeHandler
protected void setupDefaultResponseCodeHandler()
-
-