public class JerseyEnvironment extends Object
Constructor and Description |
---|
JerseyEnvironment(JerseyContainerHolder holder,
DropwizardResourceConfig config) |
Modifier and Type | Method and Description |
---|---|
void |
disable() |
void |
disable(String featureName)
Disables the Jersey feature with the given name.
|
void |
enable(String featureName)
Enables the Jersey feature with the given name.
|
<T> T |
getProperty(String name)
Gets the given Jersey property.
|
DropwizardResourceConfig |
getResourceConfig() |
String |
getUrlPattern() |
void |
packages(String... packages)
Adds array of package names which will be used to scan for components.
|
void |
property(String name,
Object value)
Sets the given Jersey property.
|
void |
register(Class<?> componentClass)
Adds the given class as a Jersey component.
|
void |
register(Object component)
Adds the given object as a Jersey singleton component.
|
void |
replace(com.google.common.base.Function<org.glassfish.jersey.server.ResourceConfig,javax.servlet.Servlet> replace) |
void |
setUrlPattern(String urlPattern) |
public JerseyEnvironment(JerseyContainerHolder holder, DropwizardResourceConfig config)
public void disable()
public void replace(com.google.common.base.Function<org.glassfish.jersey.server.ResourceConfig,javax.servlet.Servlet> replace)
public void register(Object component)
component
- a Jersey singleton componentpublic void register(Class<?> componentClass)
componentClass
- a Jersey component classpublic void packages(String... packages)
packages
- array of package namespublic void enable(String featureName)
featureName
- the name of the feature to be enabledResourceConfig
public void disable(String featureName)
featureName
- the name of the feature to be disabledResourceConfig
public void property(String name, @Nullable Object value)
name
- the name of the Jersey propertyvalue
- the value of the Jersey propertyResourceConfig
@Nullable public <T> T getProperty(String name)
name
- the name of the Jersey propertyResourceConfig
public String getUrlPattern()
public void setUrlPattern(String urlPattern)
public DropwizardResourceConfig getResourceConfig()
Copyright © 2021. All rights reserved.