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

    Fields
    Modifier and Type
    Field
    Description
    protected 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.OptionMap
     
    protected final org.xnio.OptionMap
     
    protected io.undertow.server.OpenListener
     
    protected final org.jboss.as.server.deployment.DelegatingSupplier<org.jboss.as.network.SocketBinding>
     
    protected final org.jboss.as.server.deployment.DelegatingSupplier<Server>
     
     
    protected final org.xnio.OptionMap
     
    protected final org.jboss.as.server.deployment.DelegatingSupplier<org.xnio.XnioWorker>
     

    Fields inherited from interface org.jboss.msc.service.Service

    NULL
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    ListenerService(Consumer<ListenerService> serviceConsumer, String name, org.xnio.OptionMap listenerOptions, org.xnio.OptionMap socketOptions, boolean proxyProtocol)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract void
     
    protected abstract io.undertow.server.OpenListener
     
    org.jboss.as.server.deployment.DelegatingSupplier<org.jboss.as.network.SocketBinding>
     
    org.jboss.as.server.deployment.DelegatingSupplier<io.undertow.connector.ByteBufferPool>
     
    Returns the listener name
    io.undertow.server.OpenListener
     
    abstract String
    Returns 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.SocketBinding
    Returns the listeners socket binding.
    protected io.undertow.protocols.ssl.UndertowXnioSsl
     
    protected org.xnio.OptionMap
     
    protected UndertowService
     
    org.jboss.as.server.deployment.DelegatingSupplier<org.xnio.XnioWorker>
     
    boolean
     
    abstract boolean
    Returns true if the listener is secure.
    boolean
    Returns true if the listener has shut down.
    protected abstract void
    preStart(org.jboss.msc.service.StartContext context)
     
    protected void
     
    void
    setEnabled(boolean enabled)
     
    void
    start(org.jboss.msc.service.StartContext context)
     
    void
    stop(org.jboss.msc.service.StopContext context)
     
    protected void
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.jboss.msc.value.Value

    getValue
  • Field Details

    • commonOptions

      protected static final org.xnio.OptionMap commonOptions
    • serviceConsumer

      protected Consumer<ListenerService> 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

      protected final org.jboss.as.server.deployment.DelegatingSupplier<Server> 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

      public org.jboss.as.server.deployment.DelegatingSupplier<Server> getServerService()
    • getUndertowService

      protected UndertowService getUndertowService()
    • getName

      public String getName()
      Description copied from interface: UndertowListener
      Returns the listener name
      Specified by:
      getName in interface UndertowListener
      Returns:
      The listener name
    • getServer

      public Server getServer()
      Description copied from interface: UndertowListener
      Returns the server this listener is registered with.
      Specified by:
      getServer in interface UndertowListener
      Returns:
      the server this listener is registered with
    • isEnabled

      public boolean isEnabled()
    • getSsl

      protected io.undertow.protocols.ssl.UndertowXnioSsl getSsl()
    • getSSLOptions

      protected org.xnio.OptionMap getSSLOptions(SSLContext sslContext)
    • setEnabled

      public void setEnabled(boolean enabled)
    • isSecure

      public abstract 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 interface UndertowListener
      Returns:
      true if 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:
      start in interface org.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:
      stop in interface org.jboss.msc.Service
    • getOpenListener

      public io.undertow.server.OpenListener getOpenListener()
    • createOpenListener

      protected abstract io.undertow.server.OpenListener createOpenListener()
    • getProtocol

      public abstract String getProtocol()
      Description copied from interface: UndertowListener
      Returns the transport protocol. This will generally either be http, https or ajp.
      Specified by:
      getProtocol in interface UndertowListener
      Returns:
      The transport protocol
    • isShutdown

      public boolean isShutdown()
      Description copied from interface: UndertowListener
      Returns true if the listener has shut down.
      Specified by:
      isShutdown in interface UndertowListener
      Returns:
      true if the listener has been shutdown
    • getSocketBinding

      public org.jboss.as.network.SocketBinding getSocketBinding()
      Description copied from interface: UndertowListener
      Returns the listeners socket binding.
      Specified by:
      getSocketBinding in interface UndertowListener
      Returns:
      The listeners socket binding