Package org.wildfly.extension.undertow
Class ListenerService
java.lang.Object
org.wildfly.extension.undertow.ListenerService
- All Implemented Interfaces:
org.jboss.msc.Service,org.jboss.msc.service.Service<UndertowListener>,org.jboss.msc.value.Value<UndertowListener>,UndertowListener
- Direct Known Subclasses:
AjpListenerService,HttpListenerService
public abstract class ListenerService
extends Object
implements org.jboss.msc.service.Service<UndertowListener>, UndertowListener
- Author:
- Tomaz Cerar, Richard Opalka
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.jboss.as.server.deployment.DelegatingSupplier<org.jboss.as.network.SocketBinding>protected final org.jboss.as.server.deployment.DelegatingSupplier<io.undertow.connector.ByteBufferPool>protected static final org.xnio.OptionMapprotected final org.xnio.OptionMapprotected io.undertow.server.OpenListenerprotected final org.jboss.as.server.deployment.DelegatingSupplier<org.jboss.as.network.SocketBinding>protected final org.jboss.as.server.deployment.DelegatingSupplier<Server>protected Consumer<ListenerService>protected final org.xnio.OptionMapprotected final org.jboss.as.server.deployment.DelegatingSupplier<org.xnio.XnioWorker>Fields inherited from interface org.jboss.msc.service.Service
NULL -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedListenerService(Consumer<ListenerService> serviceConsumer, String name, org.xnio.OptionMap listenerOptions, org.xnio.OptionMap socketOptions, boolean proxyProtocol) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidprotected abstract io.undertow.server.OpenListenerorg.jboss.as.server.deployment.DelegatingSupplier<org.jboss.as.network.SocketBinding>org.jboss.as.server.deployment.DelegatingSupplier<io.undertow.connector.ByteBufferPool>getName()Returns the listener nameio.undertow.server.OpenListenerabstract StringReturns the transport protocol.org.jboss.as.server.deployment.DelegatingSupplier<org.jboss.as.network.SocketBinding>Returns the server this listener is registered with.org.jboss.as.server.deployment.DelegatingSupplier<Server>org.jboss.as.network.SocketBindingReturns the listeners socket binding.protected io.undertow.protocols.ssl.UndertowXnioSslgetSsl()protected org.xnio.OptionMapgetSSLOptions(SSLContext sslContext) protected UndertowServiceorg.jboss.as.server.deployment.DelegatingSupplier<org.xnio.XnioWorker>booleanabstract booleanisSecure()Returns true if the listener is secure.booleanReturns true if the listener has shut down.protected abstract voidpreStart(org.jboss.msc.service.StartContext context) protected voidvoidsetEnabled(boolean enabled) voidstart(org.jboss.msc.service.StartContext context) voidstop(org.jboss.msc.service.StopContext context) protected voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jboss.msc.value.Value
getValue
-
Field Details
-
commonOptions
protected static final org.xnio.OptionMap commonOptions -
serviceConsumer
-
worker
protected final org.jboss.as.server.deployment.DelegatingSupplier<org.xnio.XnioWorker> worker -
binding
protected final org.jboss.as.server.deployment.DelegatingSupplier<org.jboss.as.network.SocketBinding> binding -
redirectSocket
protected final org.jboss.as.server.deployment.DelegatingSupplier<org.jboss.as.network.SocketBinding> redirectSocket -
bufferPool
protected final org.jboss.as.server.deployment.DelegatingSupplier<io.undertow.connector.ByteBufferPool> bufferPool -
serverService
-
listenerOptions
protected final org.xnio.OptionMap listenerOptions -
socketOptions
protected final org.xnio.OptionMap socketOptions -
openListener
protected volatile io.undertow.server.OpenListener openListener
-
-
Constructor Details
-
ListenerService
protected ListenerService(Consumer<ListenerService> serviceConsumer, String name, org.xnio.OptionMap listenerOptions, org.xnio.OptionMap socketOptions, boolean proxyProtocol)
-
-
Method Details
-
getWorker
public org.jboss.as.server.deployment.DelegatingSupplier<org.xnio.XnioWorker> getWorker() -
getBinding
public org.jboss.as.server.deployment.DelegatingSupplier<org.jboss.as.network.SocketBinding> getBinding() -
getRedirectSocket
public org.jboss.as.server.deployment.DelegatingSupplier<org.jboss.as.network.SocketBinding> getRedirectSocket() -
getBufferPool
public org.jboss.as.server.deployment.DelegatingSupplier<io.undertow.connector.ByteBufferPool> getBufferPool() -
getServerService
-
getUndertowService
-
getName
Description copied from interface:UndertowListenerReturns the listener name- Specified by:
getNamein interfaceUndertowListener- Returns:
- The listener name
-
getServer
Description copied from interface:UndertowListenerReturns the server this listener is registered with.- Specified by:
getServerin interfaceUndertowListener- Returns:
- the server this listener is registered with
-
isEnabled
public boolean isEnabled() -
getSsl
protected io.undertow.protocols.ssl.UndertowXnioSsl getSsl() -
getSSLOptions
-
setEnabled
public void setEnabled(boolean enabled) -
isSecure
public abstract 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- Returns:
trueif the listener is considered security
-
registerBinding
protected void registerBinding() -
unregisterBinding
protected void unregisterBinding() -
preStart
protected abstract void preStart(org.jboss.msc.service.StartContext context) -
start
public void start(org.jboss.msc.service.StartContext context) throws org.jboss.msc.service.StartException - Specified by:
startin interfaceorg.jboss.msc.Service- Throws:
org.jboss.msc.service.StartException
-
cleanFailedStart
protected abstract void cleanFailedStart() -
stop
public void stop(org.jboss.msc.service.StopContext context) - Specified by:
stopin interfaceorg.jboss.msc.Service
-
getOpenListener
public io.undertow.server.OpenListener getOpenListener() -
createOpenListener
protected abstract io.undertow.server.OpenListener createOpenListener() -
getProtocol
Description copied from interface:UndertowListenerReturns the transport protocol. This will generally either be http, https or ajp.- Specified by:
getProtocolin interfaceUndertowListener- Returns:
- The transport protocol
-
isShutdown
public boolean isShutdown()Description copied from interface:UndertowListenerReturns true if the listener has shut down.- Specified by:
isShutdownin interfaceUndertowListener- Returns:
trueif the listener has been shutdown
-
getSocketBinding
public org.jboss.as.network.SocketBinding getSocketBinding()Description copied from interface:UndertowListenerReturns the listeners socket binding.- Specified by:
getSocketBindingin interfaceUndertowListener- Returns:
- The listeners socket binding
-