|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.restlet.Restlet
org.restlet.Application
org.restlet.ext.jaxrs.JaxRsApplication
public class JaxRsApplication
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 Summary | |
|---|---|
JaxRsApplication()
Creates an new JaxRsApplication. |
|
JaxRsApplication(Application appConfig)
|
|
JaxRsApplication(Context context)
Creates an new JaxRsApplication. |
|
| Method Summary | |
|---|---|
boolean |
add(Application appConfig)
Attaches a JAX-RS Application to this JaxRsApplication. |
Restlet |
createInboundRoot()
|
Authenticator |
getAuthenticator()
Returns the Authenticator. |
Authenticator |
getGuard()
Deprecated. Use getAuthenticator() instead. |
JaxRsRestlet |
getJaxRsRestlet()
Returns the used JaxRsRestlet. |
ObjectFactory |
getObjectFactory()
Returns the ObjectFactory for root resource class and provider instantiation, if given. |
Collection<Class<?>> |
getRootResources()
Returns an unmodifiable set with the attached root resource classes. |
Collection<String> |
getRootUris()
Returns an unmodifiable set of supported URIs (relative to this Application). |
void |
setApplications(Collection<Application> apps)
Adds the given applications to the available applications. |
void |
setAuthenticator(Authenticator authenticator)
Sets the Authenticator to use. |
void |
setContext(Context context)
|
void |
setGuard(Authenticator authenticator)
Deprecated. Use setAuthenticator(Authenticator) instead. |
void |
setObjectFactory(ObjectFactory objectFactory)
Sets the ObjectFactory for root resource class and provider instantiation. |
| Methods inherited from class org.restlet.Restlet |
|---|
createFinder, finalize, getApplication, getAuthor, getContext, getDescription, getFinderClass, getLogger, getName, getOwner, handle, handle, handle, isStarted, isStopped, setAuthor, setDescription, setFinderClass, setName, setOwner |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JaxRsApplication()
JaxRsApplication(Context)public JaxRsApplication(Context context)
Applications by
using add(Application).
context - The application's dedicated context based on the protected
parent component's context.
public JaxRsApplication(Application appConfig)
throws IllegalArgumentException
appConfig -
IllegalArgumentException| Method Detail |
|---|
public boolean add(Application appConfig)
throws 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.
IllegalArgumentException - if the given appConfig is null.public Restlet createInboundRoot()
createInboundRoot in class Applicationpublic Authenticator getAuthenticator()
Authenticator.
Authenticator.@Deprecated public Authenticator getGuard()
getAuthenticator() instead.
Authenticator.
Authenticator.public JaxRsRestlet getJaxRsRestlet()
JaxRsRestlet.
JaxRsRestlet.public ObjectFactory getObjectFactory()
public Collection<Class<?>> getRootResources()
public Collection<String> getRootUris()
public void setApplications(Collection<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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||