org.glassfish.jersey.server
Class ResourceConfig

java.lang.Object
  extended by javax.ws.rs.core.Application
      extended by org.glassfish.jersey.server.ResourceConfig
All Implemented Interfaces:
FeaturesAndProperties

public final class ResourceConfig
extends javax.ws.rs.core.Application
implements FeaturesAndProperties

The resource configuration for configuring a web application.

Author:
Paul Sandoz

Nested Class Summary
static interface ResourceConfig.Builder
          ResourceConfig builder.
 
Method Summary
static ResourceConfig.Builder builder()
           
static ResourceConfig.Builder builder(javax.ws.rs.core.Application application)
           
static ResourceConfig.Builder builder(Class<? extends javax.ws.rs.core.Application> applicationClass)
           
static ResourceConfig.Builder builder(ResourceConfig resourceConfig)
           
static ResourceConfig empty()
           
static ResourceConfig from(javax.ws.rs.core.Application application)
           
 Set<Class<?>> getClasses()
          Set of current resource and provider classes.
static String[] getElements(String[] elements)
          Get a canonical array of String elements from a String array where each entry may contain zero or more elements separated by ';'.
static String[] getElements(String[] elements, String delimiters)
          Get a canonical array of String elements from a String array where each entry may contain zero or more elements separated by characters in delimiters string.
static String[] getElements(String elements, String delimiters)
          Get a canonical array of String elements from a String that may contain zero or more elements separated by characters in delimiters string.
 Map<String,Object> getProperties()
           
 Object getProperty(String name)
           
 Set<Object> getSingletons()
          Set of singletons.
 boolean isProperty(String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

from

public static ResourceConfig from(javax.ws.rs.core.Application application)

empty

public static ResourceConfig empty()

builder

public static ResourceConfig.Builder builder()

builder

public static ResourceConfig.Builder builder(ResourceConfig resourceConfig)

builder

public static ResourceConfig.Builder builder(javax.ws.rs.core.Application application)

builder

public static ResourceConfig.Builder builder(Class<? extends javax.ws.rs.core.Application> applicationClass)

getClasses

public Set<Class<?>> getClasses()
Set of current resource and provider classes. Any modification to this list won't be reflected anywhere. set.

Overrides:
getClasses in class javax.ws.rs.core.Application
Returns:
Set of resource and provider classes.

getSingletons

public Set<Object> getSingletons()
Set of singletons. Any modification to this list won't be reflected anywhere. set.

Overrides:
getSingletons in class javax.ws.rs.core.Application
Returns:
Set of singletons.

getProperties

public Map<String,Object> getProperties()
Specified by:
getProperties in interface FeaturesAndProperties

getProperty

public Object getProperty(String name)
Specified by:
getProperty in interface FeaturesAndProperties

isProperty

public boolean isProperty(String name)
Specified by:
isProperty in interface FeaturesAndProperties

getElements

public static String[] getElements(String[] elements)
Get a canonical array of String elements from a String array where each entry may contain zero or more elements separated by ';'.

Parameters:
elements - an array where each String entry may contain zero or more ServerProperties.COMMON_DELIMITERS separated elements.
Returns:
the array of elements, each element is trimmed, the array will not contain any empty or null entries.

getElements

public static String[] getElements(String[] elements,
                                   String delimiters)
Get a canonical array of String elements from a String array where each entry may contain zero or more elements separated by characters in delimiters string.

Parameters:
elements - an array where each String entry may contain zero or more delimiters separated elements.
delimiters - string with delimiters, every character represents one delimiter.
Returns:
the array of elements, each element is trimmed, the array will not contain any empty or null entries.

getElements

public static String[] getElements(String elements,
                                   String delimiters)
Get a canonical array of String elements from a String that may contain zero or more elements separated by characters in delimiters string.

Parameters:
elements - a String that may contain zero or more delimiters separated elements.
delimiters - string with delimiters, every character represents one delimiter.
Returns:
the array of elements, each element is trimmed.


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.