public interface ApplicationConfigurator
Modifier and Type | Method and Description |
---|---|
ApplicationConfigurator |
addPackages(boolean recursively,
Package... packages)
Adds one or more packages which will be used to scan for resource,
provider and
feature classes. |
ApplicationConfigurator |
addPackages(boolean recursively,
String... packageNames)
Adds one or more fully qualified packages name which will be used to
scan for resource, provider and
feature classes. |
ApplicationConfigurator |
addPackages(Package... packages)
Adds one or more packages which will be used to scan for resource,
provider and
feature classes. |
ApplicationConfigurator |
addPackages(String... packageNames)
Adds one or more fully qualified packages name which will be used
to scan for resource, provider and
feature classes. |
ApplicationConfigurator |
addProperties(Map<String,Object> properties)
Adds custom application-wide properties.
|
ApplicationConfigurator |
register(Class<?> aClass)
Registers a resource, provider or
feature class. |
ApplicationConfigurator |
register(Object aSingleton)
Registers a resource, provider or
feature instance. |
ApplicationConfigurator addPackages(Package... packages)
feature
classes.
Packages will be scanned recursively.
Calling this method is similar to calling
addPackages(true, Package...)
.
packages
- an array of packages.this
object.addPackages(boolean, String...)
ApplicationConfigurator addPackages(boolean recursively, Package... packages)
feature
classes.
Note: Only packages accessible from the web application's classloader can be scanned.
recursively
- can be scanned recursively.packages
- an array of packagesthis
object.addPackages(boolean, String...)
ApplicationConfigurator addPackages(String... packageNames)
feature
classes.
Packages will be scanned recursively.
Calling this method is similar to calling
addPackages(true, String...)
packageNames
- an array of fully qualified packages name.this
object.addPackages(boolean, Package...)
ApplicationConfigurator addPackages(boolean recursively, String... packageNames)
feature
classes.
Note: Only packages accessible from the web application's classloader can be scanned.
recursively
- can be scanned recursively.packageNames
- an array of fully qualified packages name.this
object.addPackages(boolean, Package...)
ApplicationConfigurator addProperties(Map<String,Object> properties)
If any of the added properties already exists, the values of the existing properties will be replaced with the new values.
properties
- properties map to registerthis
object.ApplicationConfigurator register(Class<?> aClass)
feature
class.
A class will be ignored and a warning log message produced if the requirements of root resources or provider/feature are not met.
Classes registered through this method can be packaged inside or outside the web application archive.
aClass
- The class to register as a JAX-RS application's component.this
object.ApplicationConfigurator register(Object aSingleton)
feature
instance.
Its fields and properties declared as dependencies (see Context
)
are injected by the runtime prior to use.
A singleton will be ignored and a warning log message produced if the requirements of root resources or provider/feature are not met.
The class of objects registered through this method can be packaged inside or outside the web application archive.
aSingleton
- The object to register as a JAX-RS application's singleton.this
object.