@Deprecated public class JaxRsApplication extends Application
This is the main class to be used for the instantiation of a JAX-RS runtime environment.
To set up a JAX-RS runtime environment you should instantiate a
JaxRsApplication(Context)
.
Application
(s) by calling add(Application)
.Authenticator
see
setAuthenticator(Authenticator)
.Component
.
Concurrency note: instances of this class or its subclasses can be invoked by
several threads at the same time and therefore must be thread-safe. You
should be especially careful when storing state in member variables.Constructor and Description |
---|
JaxRsApplication()
Deprecated.
Creates an new JaxRsApplication.
|
JaxRsApplication(javax.ws.rs.core.Application appConfig)
Deprecated.
|
JaxRsApplication(Context context)
Deprecated.
Creates an new JaxRsApplication.
|
JaxRsApplication(Context context,
javax.ws.rs.core.Application appConfig)
Deprecated.
Creates an new JaxRsApplication.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(javax.ws.rs.core.Application appConfig)
Deprecated.
Attaches a JAX-RS
Application to this JaxRsApplication. |
Restlet |
createInboundRoot()
Deprecated.
|
Authenticator |
getAuthenticator()
Deprecated.
Returns the
Authenticator . |
Authenticator |
getGuard()
Deprecated.
Use
getAuthenticator() instead. |
JaxRsRestlet |
getJaxRsRestlet()
Deprecated.
Returns the used
JaxRsRestlet . |
ObjectFactory |
getObjectFactory()
Deprecated.
Returns the ObjectFactory for root resource class and provider
instantiation, if given.
|
java.util.Collection<java.lang.Class<?>> |
getRootResources()
Deprecated.
Returns an unmodifiable set with the attached root resource classes.
|
java.util.Collection<java.lang.String> |
getRootUris()
Deprecated.
Returns an unmodifiable set of supported URIs (relative to this
Application).
|
void |
setApplications(java.util.Collection<javax.ws.rs.core.Application> apps)
Deprecated.
Adds the given applications to the available applications.
|
void |
setAuthenticator(Authenticator authenticator)
Deprecated.
Sets the
Authenticator to use. |
void |
setContext(Context context)
Deprecated.
|
void |
setGuard(Authenticator authenticator)
Deprecated.
Use
setAuthenticator(Authenticator) instead. |
void |
setObjectFactory(ObjectFactory objectFactory)
Deprecated.
Sets the ObjectFactory for root resource class and provider
instantiation.
|
createOutboundRoot, getConnectorService, getConnegService, getConverterService, getCurrent, getDecoderService, getEncoderService, getInboundRoot, getMetadataService, getOutboundRoot, getRangeService, getRole, getRoles, getServices, getStatusService, getTaskService, getTunnelService, handle, isDebugging, setConnectorService, setConnegService, setConverterService, setCurrent, setDebugging, setDecoderService, setEncoderService, setInboundRoot, setInboundRoot, setMetadataService, setOutboundRoot, setOutboundRoot, setRangeService, setRoles, setStatusService, setTaskService, setTunnelService, start, stop
createFinder, finalize, getApplication, getAuthor, getContext, getDescription, getFinderClass, getLogger, getName, getOwner, handle, handle, handle, isStarted, isStopped, setAuthor, setDescription, setFinderClass, setName, setOwner
public JaxRsApplication()
JaxRsApplication(Context)
public JaxRsApplication(Context context)
Application
s by
using add(Application)
.context
- The application's dedicated context based on the protected
parent component's context.public JaxRsApplication(Context context, javax.ws.rs.core.Application appConfig) throws java.lang.IllegalArgumentException
Application
s by
using add(Application)
.context
- The application's dedicated context based on the protected
parent component's context.appConfig
- java.lang.IllegalArgumentException
public JaxRsApplication(javax.ws.rs.core.Application appConfig) throws java.lang.IllegalArgumentException
appConfig
- java.lang.IllegalArgumentException
public boolean add(javax.ws.rs.core.Application appConfig) throws java.lang.IllegalArgumentException
Attaches a JAX-RS Application
to this JaxRsApplication.
The providers are available for all root resource classes provided to
this JaxRsApplication. If you won't mix them, instantiate another
JaxRsApplication.
appConfig
- Contains the classes to load as root resource classes and as
providers. Invalid root resource classes and provider classes
are ignored, according to JAX-RS specification.java.lang.IllegalArgumentException
- if the given appConfig is null.public Restlet createInboundRoot()
createInboundRoot
in class Application
public Authenticator getAuthenticator()
Authenticator
.Authenticator
.@Deprecated public Authenticator getGuard()
getAuthenticator()
instead.Authenticator
.Authenticator
.public JaxRsRestlet getJaxRsRestlet()
JaxRsRestlet
.JaxRsRestlet
.public ObjectFactory getObjectFactory()
public java.util.Collection<java.lang.Class<?>> getRootResources()
public java.util.Collection<java.lang.String> getRootUris()
public void setApplications(java.util.Collection<javax.ws.rs.core.Application> apps)
apps
- public void setAuthenticator(Authenticator authenticator)
Authenticator
to use. This should be called before the
root Restlet is created.
This replaced the guard set via setGuard(Authenticator)
.
authenticator
- The Authenticator
to use.public void setContext(Context context)
setContext
in class Application
@Deprecated public void setGuard(Authenticator authenticator)
setAuthenticator(Authenticator)
instead.Authenticator
to use. This should be called before the
root Restlet is created.
This replaced the guard set via setGuard(Authenticator)
.
authenticator
- The Authenticator
to use.public void setObjectFactory(ObjectFactory objectFactory)
objectFactory
- the ObjectFactory for root resource class and provider
instantiation.Copyright © 2005-2024 Restlet.