|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.clerezza.triaxrs.JaxRsHandler
public class JaxRsHandler
Am implementation of JAX-RS (aka JSR 311) based on wrhapi.
It supports both injection of javax.ws.rs.core.Application
instances, as well as direct injection of Providers and root
resources. For direct injection a component just need to expose a service of
type java.lang.Object and have the property "javax.ws.rs" set to
true.
| Field Summary | |
|---|---|
static ThreadLocal<WebRequest> |
localRequest
Keeps the WebRequest for a thread. |
static AggregatedProviders |
providers
Provides access to the providers, this aggregation of (in order): - applicationProviders (if available) - componentSpecifiedProviders - built-in providers |
| Constructor Summary | |
|---|---|
JaxRsHandler()
|
|
| Method Summary | |
|---|---|
protected void |
activate(org.osgi.service.component.ComponentContext componentContext)
The activate method is called when SCR activates the component configuration |
protected void |
bindApplicationConfig(org.osgi.framework.ServiceReference serviceReference)
this is called when a new application config arrives |
protected void |
bindBundlePrefixManager(org.apache.clerezza.jaxrs.extensions.prefixmanager.BundlePrefixManager prefixManager)
|
protected void |
bindComponent(org.osgi.framework.ServiceReference serviceReference)
Binds the specified JAX-RS root-resource or provider. |
void |
handle(org.wymiwyg.wrhapi.Request origRequest,
org.wymiwyg.wrhapi.Response response)
|
protected void |
registerApplicationConfig(javax.ws.rs.core.Application applicationConfig,
String pathPrefix)
|
protected void |
registerComponent(Object component,
String pathPrefix)
|
protected void |
registerSingleComponentOfApplication(Class<?> clazz,
Object instance,
CascadingProviders applicationProviders,
String pathPrefix)
|
protected void |
unbindApplicationConfig(javax.ws.rs.core.Application applicationConfig)
|
protected void |
unbindBundlePrefixManager(org.apache.clerezza.jaxrs.extensions.prefixmanager.BundlePrefixManager prefixManager)
|
protected void |
unbindComponent(org.osgi.framework.ServiceReference serviceReference)
Unbinds the specified JAXRS component referred by the parameter. |
protected void |
unregisterApplicationConfig(javax.ws.rs.core.Application applicationConfig)
|
protected void |
unregisterComponent(Object component,
String pathPrefix)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final AggregatedProviders providers
public static ThreadLocal<WebRequest> localRequest
| Constructor Detail |
|---|
public JaxRsHandler()
| Method Detail |
|---|
protected void bindBundlePrefixManager(org.apache.clerezza.jaxrs.extensions.prefixmanager.BundlePrefixManager prefixManager)
protected void unbindBundlePrefixManager(org.apache.clerezza.jaxrs.extensions.prefixmanager.BundlePrefixManager prefixManager)
protected void bindComponent(org.osgi.framework.ServiceReference serviceReference)
component - The new JAX-RS component to bind.
protected void registerComponent(Object component,
String pathPrefix)
protected void unbindComponent(org.osgi.framework.ServiceReference serviceReference)
protected void unregisterComponent(Object component,
String pathPrefix)
protected void bindApplicationConfig(org.osgi.framework.ServiceReference serviceReference)
applicationConfig -
protected void registerApplicationConfig(javax.ws.rs.core.Application applicationConfig,
String pathPrefix)
protected void registerSingleComponentOfApplication(Class<?> clazz,
Object instance,
CascadingProviders applicationProviders,
String pathPrefix)
protected void unbindApplicationConfig(javax.ws.rs.core.Application applicationConfig)
protected void unregisterApplicationConfig(javax.ws.rs.core.Application applicationConfig)
protected void activate(org.osgi.service.component.ComponentContext componentContext)
componentContext -
public void handle(org.wymiwyg.wrhapi.Request origRequest,
org.wymiwyg.wrhapi.Response response)
throws org.wymiwyg.wrhapi.HandlerException
handle in interface org.wymiwyg.wrhapi.Handlerorg.wymiwyg.wrhapi.HandlerException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||