Package org.wildfly.extension.undertow
Class HttpListenerService
- java.lang.Object
-
- org.wildfly.extension.undertow.ListenerService
-
- org.wildfly.extension.undertow.HttpListenerService
-
- All Implemented Interfaces:
org.jboss.msc.Service,org.jboss.msc.service.Service<UndertowListener>,org.jboss.msc.value.Value<UndertowListener>,UndertowListener
- Direct Known Subclasses:
HttpsListenerService
public class HttpListenerService extends ListenerService
- Author:
- Stuart Douglas, Tomaz Cerar, Richard Opalka
-
-
Field Summary
Fields Modifier and Type Field Description protected org.jboss.as.server.deployment.DelegatingSupplier<io.undertow.server.ListenerRegistry>httpListenerRegistryDeprecated.Replaced by HTTP_UPGRADE_REGISTRY.getCapabilityServiceName()-
Fields inherited from class org.wildfly.extension.undertow.ListenerService
binding, bufferPool, commonOptions, listenerOptions, openListener, redirectSocket, serverService, serviceConsumer, socketOptions, worker
-
-
Constructor Summary
Constructors Constructor Description HttpListenerService(Consumer<ListenerService> serviceConsumer, org.jboss.as.controller.PathAddress address, String serverName, org.xnio.OptionMap listenerOptions, org.xnio.OptionMap socketOptions, boolean certificateForwarding, boolean proxyAddressForwarding, boolean proxyProtocol)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcleanFailedStart()protected io.undertow.server.OpenListenercreateOpenListener()org.jboss.as.server.deployment.DelegatingSupplier<io.undertow.server.ListenerRegistry>getHttpListenerRegistry()StringgetProtocol()Returns the transport protocol.HttpListenerServicegetValue()booleanisSecure()Returns true if the listener is secure.protected voidpreStart(org.jboss.msc.service.StartContext context)protected voidstartListening(org.xnio.XnioWorker worker, InetSocketAddress socketAddress, org.xnio.ChannelListener<org.xnio.channels.AcceptingChannel<org.xnio.StreamConnection>> acceptListener)protected voidstopListening()protected voidunregisterBinding()-
Methods inherited from class org.wildfly.extension.undertow.ListenerService
getBinding, getBufferPool, getName, getOpenListener, getRedirectSocket, getServer, getServerService, getSocketBinding, getSsl, getSSLOptions, getUndertowService, getWorker, isEnabled, isShutdown, registerBinding, setEnabled, start, stop
-
-
-
-
Field Detail
-
httpListenerRegistry
@Deprecated protected final org.jboss.as.server.deployment.DelegatingSupplier<io.undertow.server.ListenerRegistry> httpListenerRegistry
Deprecated.Replaced by HTTP_UPGRADE_REGISTRY.getCapabilityServiceName()
-
-
Constructor Detail
-
HttpListenerService
public HttpListenerService(Consumer<ListenerService> serviceConsumer, org.jboss.as.controller.PathAddress address, String serverName, org.xnio.OptionMap listenerOptions, org.xnio.OptionMap socketOptions, boolean certificateForwarding, boolean proxyAddressForwarding, boolean proxyProtocol)
-
-
Method Detail
-
createOpenListener
protected io.undertow.server.OpenListener createOpenListener()
- Specified by:
createOpenListenerin classListenerService
-
isSecure
public boolean isSecure()
Description copied from interface:UndertowListenerReturns true if the listener is secure. In general this will be true for HTTPS listeners, however other listener types may have been explicitly marked as secure.- Specified by:
isSecurein interfaceUndertowListener- Specified by:
isSecurein classListenerService- Returns:
trueif the listener is considered security
-
preStart
protected void preStart(org.jboss.msc.service.StartContext context)
- Specified by:
preStartin classListenerService
-
startListening
protected void startListening(org.xnio.XnioWorker worker, InetSocketAddress socketAddress, org.xnio.ChannelListener<org.xnio.channels.AcceptingChannel<org.xnio.StreamConnection>> acceptListener) throws IOException- Throws:
IOException
-
cleanFailedStart
protected void cleanFailedStart()
- Specified by:
cleanFailedStartin classListenerService
-
unregisterBinding
protected void unregisterBinding()
- Overrides:
unregisterBindingin classListenerService
-
stopListening
protected void stopListening()
-
getValue
public HttpListenerService getValue() throws IllegalStateException, IllegalArgumentException
-
getHttpListenerRegistry
public org.jboss.as.server.deployment.DelegatingSupplier<io.undertow.server.ListenerRegistry> getHttpListenerRegistry()
-
getProtocol
public String getProtocol()
Description copied from interface:UndertowListenerReturns the transport protocol. This will generally either be http, https or ajp.- Specified by:
getProtocolin interfaceUndertowListener- Specified by:
getProtocolin classListenerService- Returns:
- The transport protocol
-
-