Package io.dropwizard.jersey.setup
Class JerseyEnvironment
java.lang.Object
io.dropwizard.jersey.setup.JerseyEnvironment
-
Constructor Summary
ConstructorsConstructorDescriptionJerseyEnvironment(JerseyContainerHolder holder, DropwizardResourceConfig config) -
Method Summary
Modifier and TypeMethodDescriptionvoiddisable()voidDisables the Jersey feature with the given name.voidEnables the Jersey feature with the given name.<T> @Nullable TgetProperty(String name) Gets the given Jersey property.voidAdds array of package names which will be used to scan for components.voidSets the given Jersey property.voidAdds the given class as a Jersey component.voidAdds the given object as a Jersey singleton component.voidvoidsetUrlPattern(String urlPattern)
-
Constructor Details
-
JerseyEnvironment
-
-
Method Details
-
disable
public void disable() -
replace
public void replace(Function<org.glassfish.jersey.server.ResourceConfig, jakarta.servlet.Servlet> replace) -
register
Adds the given object as a Jersey singleton component.- Parameters:
component- a Jersey singleton component
-
register
Adds the given class as a Jersey component. N.B.: This class must either have a no-args constructor or use Jersey's built-in dependency injection.- Parameters:
componentClass- a Jersey component class
-
packages
Adds array of package names which will be used to scan for components. Packages will be scanned recursively, including all nested packages.- Parameters:
packages- array of package names
-
enable
Enables the Jersey feature with the given name.- Parameters:
featureName- the name of the feature to be enabled- See Also:
-
ResourceConfig
-
disable
Disables the Jersey feature with the given name.- Parameters:
featureName- the name of the feature to be disabled- See Also:
-
ResourceConfig
-
property
Sets the given Jersey property.- Parameters:
name- the name of the Jersey propertyvalue- the value of the Jersey property- See Also:
-
ResourceConfig
-
getProperty
Gets the given Jersey property.- Parameters:
name- the name of the Jersey property- See Also:
-
ResourceConfig
-
getUrlPattern
-
setUrlPattern
-
getResourceConfig
-