org.glassfish.jersey.server.internal
Class ConfigHelper

java.lang.Object
  extended by org.glassfish.jersey.server.internal.ConfigHelper

public final class ConfigHelper
extends Object

Helper class to provide some common functionality related to application configuration.

Author:
Jakub Podlesak (jakub.podlesak at oracle.com)

Method Summary
static ContainerLifecycleListener getContainerLifecycleListener(ApplicationHandler applicationHandler)
          Provides a single ContainerLifecycleListener instance based on the application configuration.
static javax.ws.rs.core.Application getWrappedApplication(javax.ws.rs.core.Application app)
          Gets the most internal wrapped application class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getContainerLifecycleListener

public static ContainerLifecycleListener getContainerLifecycleListener(ApplicationHandler applicationHandler)
Provides a single ContainerLifecycleListener instance based on the application configuration. This method looks for providers implementing ContainerLifecycleListener interface and aggregates them into a single umbrella listener instance that is returned.

Parameters:
applicationHandler - actual application from where to get the listener.
Returns:
a single instance of a ContainerLifecycleListener, can not be null.

getWrappedApplication

public static javax.ws.rs.core.Application getWrappedApplication(javax.ws.rs.core.Application app)
Gets the most internal wrapped application class. This method is similar to ResourceConfig.getApplication() except if provided application was created by wrapping multiple ResourceConfig instances this method returns the original application and not a resource config wrapper.

Returns:
the original Application subclass.


Copyright © 2007-2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.