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>
httpListenerRegistry
Deprecated.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 void
cleanFailedStart()
protected io.undertow.server.OpenListener
createOpenListener()
org.jboss.as.server.deployment.DelegatingSupplier<io.undertow.server.ListenerRegistry>
getHttpListenerRegistry()
String
getProtocol()
Returns the transport protocol.HttpListenerService
getValue()
boolean
isSecure()
Returns true if the listener is secure.protected void
preStart(org.jboss.msc.service.StartContext context)
protected void
startListening(org.xnio.XnioWorker worker, InetSocketAddress socketAddress, org.xnio.ChannelListener<org.xnio.channels.AcceptingChannel<org.xnio.StreamConnection>> acceptListener)
protected void
stopListening()
protected void
unregisterBinding()
-
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:
createOpenListener
in classListenerService
-
isSecure
public boolean isSecure()
Description copied from interface:UndertowListener
Returns 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:
isSecure
in interfaceUndertowListener
- Specified by:
isSecure
in classListenerService
- Returns:
true
if the listener is considered security
-
preStart
protected void preStart(org.jboss.msc.service.StartContext context)
- Specified by:
preStart
in 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:
cleanFailedStart
in classListenerService
-
unregisterBinding
protected void unregisterBinding()
- Overrides:
unregisterBinding
in 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:UndertowListener
Returns the transport protocol. This will generally either be http, https or ajp.- Specified by:
getProtocol
in interfaceUndertowListener
- Specified by:
getProtocol
in classListenerService
- Returns:
- The transport protocol
-
-