org.glassfish.grizzly.config
Class GenericGrizzlyListener

java.lang.Object
  extended by 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 Summary
protected  InetAddress address
           
protected  String name
           
protected  int port
           
protected  FilterChain rootFilterChain
           
protected  NIOTransport transport
           
 
Constructor Summary
GenericGrizzlyListener()
           
 
Method Summary
 void configure(org.jvnet.hk2.component.Habitat habitat, NetworkListener networkListener)
           
protected  void configureAjpSupport(org.jvnet.hk2.component.Habitat habitat, NetworkListener networkListener, Http http, FilterChainBuilder filterChainBuilder)
           
protected  void configureCometSupport(org.jvnet.hk2.component.Habitat habitat, NetworkListener networkListener, Http http, FilterChainBuilder filterChainBuilder)
           
protected  Set<ContentEncoding> configureCompressionEncodings(Http http)
           
protected  Set<ContentEncoding> configureContentEncodings(Http http)
           
protected  void configureDelayedExecutor()
           
protected  FileCache configureHttpFileCache(FileCache cache)
          Configure the Grizzly HTTP FileCache mechanism
protected  void configureHttpProtocol(org.jvnet.hk2.component.Habitat habitat, NetworkListener networkListener, Http http, FilterChainBuilder filterChainBuilder)
           
protected  KeepAlive configureKeepAlive(Http http)
           
protected  void configureProtocol(org.jvnet.hk2.component.Habitat habitat, NetworkListener networkListener, Protocol protocol, FilterChainBuilder filterChainBuilder)
           
protected static void configureSsl(org.jvnet.hk2.component.Habitat habitat, Ssl ssl, FilterChainBuilder filterChainBuilder)
           
protected  void configureSubProtocol(org.jvnet.hk2.component.Habitat habitat, NetworkListener networkListener, Protocol protocol, FilterChainBuilder filterChainBuilder)
           
protected  NIOTransport configureTCPTransport(Transport transportConfig)
           
protected  void configureThreadPool(org.jvnet.hk2.component.Habitat habitat, NetworkListener networkListener, ThreadPool threadPool)
           
protected  ThreadPoolConfig configureThreadPoolConfig(NetworkListener networkListener, ThreadPool threadPool)
           
protected  void configureTransport(NetworkListener networkListener, Transport transportConfig, FilterChainBuilder filterChainBuilder)
           
protected  NIOTransport configureUDPTransport()
           
protected  void configureWebSocketSupport(org.jvnet.hk2.component.Habitat habitat, Http http, FilterChainBuilder filterChainBuilder)
           
 void destroy()
           
<T> T
getAdapter(Class<T> adapterClass)
           
 InetAddress getAddress()
           
<E> List<E>
getFilters(Class<E> clazz)
           
static
<E> List<E>
getFilters(Class<E> clazz, FilterChain filterChain, List<E> filters)
           
protected  HttpHandler getHttpHandler()
           
protected  ServerFilterConfiguration getHttpServerFilterConfiguration(Http http)
           
 String getName()
           
 int getPort()
           
 Transport getTransport()
           
 void processDynamicConfigurationChange(org.jvnet.hk2.component.Habitat habitat, PropertyChangeEvent[] events)
           
protected  void setAddress(InetAddress inetAddress)
           
protected  void setName(String name)
           
protected  void setPort(int port)
           
 void start()
           
 void stop()
           
protected  void stopDelayedExecutor()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected volatile String name

address

protected volatile InetAddress address

port

protected volatile int port

transport

protected NIOTransport transport

rootFilterChain

protected FilterChain rootFilterChain
Constructor Detail

GenericGrizzlyListener

public GenericGrizzlyListener()
Method Detail

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.jvnet.hk2.component.Habitat 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 Transport getTransport()

getFilters

public static <E> List<E> getFilters(Class<E> clazz,
                                     FilterChain filterChain,
                                     List<E> filters)

configure

public void configure(org.jvnet.hk2.component.Habitat habitat,
                      NetworkListener networkListener)
               throws IOException
Specified by:
configure in interface GrizzlyListener
Throws:
IOException

configureTransport

protected void configureTransport(NetworkListener networkListener,
                                  Transport transportConfig,
                                  FilterChainBuilder filterChainBuilder)

configureTCPTransport

protected NIOTransport configureTCPTransport(Transport transportConfig)

configureUDPTransport

protected NIOTransport configureUDPTransport()

configureProtocol

protected void configureProtocol(org.jvnet.hk2.component.Habitat habitat,
                                 NetworkListener networkListener,
                                 Protocol protocol,
                                 FilterChainBuilder filterChainBuilder)

configureSubProtocol

protected void configureSubProtocol(org.jvnet.hk2.component.Habitat habitat,
                                    NetworkListener networkListener,
                                    Protocol protocol,
                                    FilterChainBuilder filterChainBuilder)

configureSsl

protected static void configureSsl(org.jvnet.hk2.component.Habitat habitat,
                                   Ssl ssl,
                                   FilterChainBuilder filterChainBuilder)

configureThreadPool

protected void configureThreadPool(org.jvnet.hk2.component.Habitat habitat,
                                   NetworkListener networkListener,
                                   ThreadPool threadPool)

configureThreadPoolConfig

protected ThreadPoolConfig configureThreadPoolConfig(NetworkListener networkListener,
                                                     ThreadPool threadPool)

configureDelayedExecutor

protected void configureDelayedExecutor()

stopDelayedExecutor

protected void stopDelayedExecutor()

configureHttpProtocol

protected void configureHttpProtocol(org.jvnet.hk2.component.Habitat habitat,
                                     NetworkListener networkListener,
                                     Http http,
                                     FilterChainBuilder filterChainBuilder)

configureCometSupport

protected void configureCometSupport(org.jvnet.hk2.component.Habitat habitat,
                                     NetworkListener networkListener,
                                     Http http,
                                     FilterChainBuilder filterChainBuilder)

configureWebSocketSupport

protected void configureWebSocketSupport(org.jvnet.hk2.component.Habitat habitat,
                                         Http http,
                                         FilterChainBuilder filterChainBuilder)

configureAjpSupport

protected void configureAjpSupport(org.jvnet.hk2.component.Habitat habitat,
                                   NetworkListener networkListener,
                                   Http http,
                                   FilterChainBuilder filterChainBuilder)

getHttpServerFilterConfiguration

protected ServerFilterConfiguration getHttpServerFilterConfiguration(Http http)

getHttpHandler

protected HttpHandler getHttpHandler()

configureHttpFileCache

protected FileCache configureHttpFileCache(FileCache cache)
Configure the Grizzly HTTP FileCache mechanism


configureKeepAlive

protected KeepAlive configureKeepAlive(Http http)

configureContentEncodings

protected Set<ContentEncoding> configureContentEncodings(Http http)

configureCompressionEncodings

protected Set<ContentEncoding> configureCompressionEncodings(Http http)


Copyright © 2013 Oracle Corporation. All Rights Reserved.