Class GenericGrizzlyListener

java.lang.Object
org.glassfish.grizzly.config.GenericGrizzlyListener
All Implemented Interfaces:
GrizzlyListener

public class GenericGrizzlyListener extends Object implements GrizzlyListener
Generic GrizzlyListener implementation, which is not HTTP dependent, and can support any Transport configuration, based on FilterChain.
Author:
Alexey Stashok
  • Field Details

    • name

      protected volatile String name
    • address

      protected volatile InetAddress address
    • port

      protected volatile int port
    • transport

      protected org.glassfish.grizzly.nio.NIOTransport transport
    • rootFilterChain

      protected org.glassfish.grizzly.filterchain.FilterChain rootFilterChain
    • isAjpEnabled

      protected volatile boolean isAjpEnabled
    • isSpdyEnabled

      protected volatile boolean isSpdyEnabled
    • isHttp2Enabled

      protected volatile boolean isHttp2Enabled
    • skipHttp2

      protected volatile boolean skipHttp2
    • isWebSocketEnabled

      protected volatile boolean isWebSocketEnabled
    • isCometEnabled

      protected volatile boolean isCometEnabled
  • Constructor Details

    • GenericGrizzlyListener

      public GenericGrizzlyListener()
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface GrizzlyListener
    • setName

      protected final void setName(String name)
    • getAddress

      public InetAddress getAddress()
      Specified by:
      getAddress in interface GrizzlyListener
    • setAddress

      protected final void setAddress(InetAddress inetAddress)
    • getPort

      public int getPort()
      Specified by:
      getPort in interface GrizzlyListener
    • setPort

      protected void setPort(int port)
    • start

      public void start() throws IOException
      Specified by:
      start in interface GrizzlyListener
      Throws:
      IOException
    • stop

      public void stop() throws IOException
      Specified by:
      stop in interface GrizzlyListener
      Throws:
      IOException
    • destroy

      public void destroy()
      Specified by:
      destroy in interface GrizzlyListener
    • processDynamicConfigurationChange

      public void processDynamicConfigurationChange(org.glassfish.hk2.api.ServiceLocator habitat, PropertyChangeEvent[] events)
      Specified by:
      processDynamicConfigurationChange in interface GrizzlyListener
    • getAdapter

      public <T> T getAdapter(Class<T> adapterClass)
      Specified by:
      getAdapter in interface GrizzlyListener
    • getFilters

      public <E> List<E> getFilters(Class<E> clazz)
    • getTransport

      public org.glassfish.grizzly.Transport getTransport()
    • isAjpEnabled

      public boolean isAjpEnabled()
      Returns:
      true if AJP (or JK) is enabled for this listener, or false otherwise.
    • isSpdyEnabled

      public boolean isSpdyEnabled()
      Returns:
      true if SPDY is enabled for this listener, or false otherwise.
    • isHttp2Enabled

      public boolean isHttp2Enabled()
      Returns:
      true if HTTP2 is enabled for this listener, or false otherwise.
    • isWebSocketEnabled

      public boolean isWebSocketEnabled()
      Returns:
      true if WebSocket is enabled for this listener, or false otherwise.
    • isCometEnabled

      public boolean isCometEnabled()
      Returns:
      true if Comet is enabled for this listener, or false otherwise.
    • toString

      public String toString()
      Returns super.toString()[name=xyz, address=a.b.c.d, port=nnnn]
      Overrides:
      toString in class Object
    • getFilters

      public static <E> List<E> getFilters(Class<E> clazz, org.glassfish.grizzly.filterchain.FilterChain filterChain, List<E> filters)
    • configure

      public void configure(org.glassfish.hk2.api.ServiceLocator habitat, NetworkListener networkListener) throws IOException
      Specified by:
      configure in interface GrizzlyListener
      Throws:
      IOException
    • configureTransport

      protected void configureTransport(NetworkListener networkListener, Transport transportConfig, org.glassfish.grizzly.filterchain.FilterChainBuilder filterChainBuilder)
    • configureTCPTransport

      protected org.glassfish.grizzly.nio.NIOTransport configureTCPTransport(Transport transportConfig)
    • configureUDPTransport

      protected org.glassfish.grizzly.nio.NIOTransport configureUDPTransport()
    • configureDefaultThreadPoolConfigs

      protected <T extends org.glassfish.grizzly.nio.NIOTransport> T configureDefaultThreadPoolConfigs(T transport)
    • configureProtocol

      protected void configureProtocol(org.glassfish.hk2.api.ServiceLocator habitat, NetworkListener networkListener, Protocol protocol, org.glassfish.grizzly.filterchain.FilterChainBuilder filterChainBuilder)
    • configureSubProtocol

      protected void configureSubProtocol(org.glassfish.hk2.api.ServiceLocator habitat, NetworkListener networkListener, Protocol protocol, org.glassfish.grizzly.filterchain.FilterChainBuilder filterChainBuilder)
    • configureSsl

      protected static org.glassfish.grizzly.filterchain.Filter configureSsl(org.glassfish.hk2.api.ServiceLocator habitat, Ssl ssl, org.glassfish.grizzly.filterchain.FilterChainBuilder filterChainBuilder)
    • configureThreadPool

      protected void configureThreadPool(org.glassfish.hk2.api.ServiceLocator habitat, NetworkListener networkListener, ThreadPool threadPool)
    • configureThreadPoolConfig

      protected org.glassfish.grizzly.threadpool.ThreadPoolConfig configureThreadPoolConfig(NetworkListener networkListener, ThreadPool threadPool)
    • startDelayedExecutor

      protected void startDelayedExecutor()
    • stopDelayedExecutor

      protected void stopDelayedExecutor()
    • configureHttpProtocol

      protected void configureHttpProtocol(org.glassfish.hk2.api.ServiceLocator habitat, NetworkListener networkListener, Http http, org.glassfish.grizzly.filterchain.FilterChainBuilder filterChainBuilder, boolean secure)
    • configureHttp2Support

      protected void configureHttp2Support(org.glassfish.hk2.api.ServiceLocator locator, NetworkListener listener, Http httpElement, org.glassfish.grizzly.filterchain.FilterChainBuilder builder, boolean secure)
    • createMockListener

      protected org.glassfish.grizzly.http.server.NetworkListener createMockListener(boolean isSecure)
    • configureCometSupport

      protected void configureCometSupport(org.glassfish.hk2.api.ServiceLocator habitat, NetworkListener networkListener, Http http, org.glassfish.grizzly.filterchain.FilterChainBuilder filterChainBuilder)
    • configureWebSocketSupport

      protected void configureWebSocketSupport(org.glassfish.hk2.api.ServiceLocator habitat, NetworkListener listener, Http http, org.glassfish.grizzly.filterchain.FilterChainBuilder filterChainBuilder)
    • configureAjpSupport

      protected void configureAjpSupport(org.glassfish.hk2.api.ServiceLocator habitat, NetworkListener networkListener, Http http, org.glassfish.grizzly.filterchain.FilterChainBuilder filterChainBuilder)
    • createHttpServerCodecFilter

      protected org.glassfish.grizzly.http.HttpServerFilter createHttpServerCodecFilter(Http http, boolean isChunkedEnabled, int headerBufferLengthBytes, String defaultResponseType, org.glassfish.grizzly.http.KeepAlive keepAlive, org.glassfish.grizzly.utils.DelayedExecutor delayedExecutor, int maxRequestHeaders, int maxResponseHeaders)
    • getHttpServerFilterConfiguration

      protected org.glassfish.grizzly.http.server.ServerFilterConfiguration getHttpServerFilterConfiguration(Http http)
    • getHttpHandler

      protected org.glassfish.grizzly.http.server.HttpHandler getHttpHandler()
    • configureHttpFileCache

      protected org.glassfish.grizzly.http.server.filecache.FileCache configureHttpFileCache(FileCache cache)
      Configure the Grizzly HTTP FileCache mechanism
    • configureKeepAlive

      protected org.glassfish.grizzly.http.KeepAlive configureKeepAlive(Http http)
    • configureContentEncodings

      protected Set<org.glassfish.grizzly.http.ContentEncoding> configureContentEncodings(Http http)
    • configureCompressionEncodings

      protected Set<org.glassfish.grizzly.http.ContentEncoding> configureCompressionEncodings(Http http)