org.trialox.jaxrs
Class JaxRsHandler

java.lang.Object
  extended by org.trialox.jaxrs.JaxRsHandler
All Implemented Interfaces:
org.wymiwyg.wrhapi.Handler

public class JaxRsHandler
extends java.lang.Object
implements org.wymiwyg.wrhapi.Handler

Am implementation of Jax-Rs (aka JSR 311) based on wrhapi. It support both injection of javax.ws.rs.core.Application instances, as well as direct injection of Providers and root resources. For direct injection a component jas to expose a service of type java.lang.Object and have the property "javax.ws.rs" set to true.

Author:
reto

Constructor Summary
JaxRsHandler()
           
 
Method Summary
protected  void bindApplicationConfig(javax.ws.rs.core.Application applicationConfig)
          this is called when a new app config arrives
protected  void bindComponent(java.lang.Object component)
          Binds the specified JAXRS root-resource or provider.
 void handle(org.wymiwyg.wrhapi.Request origRequest, org.wymiwyg.wrhapi.Response response)
           
protected  void unbindApplicationConfig(javax.ws.rs.core.Application applicationConfig)
           
protected  void unbindComponent(java.lang.Object component)
          Unbinds the specified JAXRS component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JaxRsHandler

public JaxRsHandler()
Method Detail

bindComponent

protected void bindComponent(java.lang.Object component)
Binds the specified JAXRS root-resource or provider.

Parameters:
component - The new JAXRS component to bind.

unbindComponent

protected void unbindComponent(java.lang.Object component)
Unbinds the specified JAXRS component.

Parameters:
component - The JAXRS component to unbind.

bindApplicationConfig

protected void bindApplicationConfig(javax.ws.rs.core.Application applicationConfig)
this is called when a new app config arrives

Parameters:
applicationConfig -

unbindApplicationConfig

protected void unbindApplicationConfig(javax.ws.rs.core.Application applicationConfig)

handle

public void handle(org.wymiwyg.wrhapi.Request origRequest,
                   org.wymiwyg.wrhapi.Response response)
            throws org.wymiwyg.wrhapi.HandlerException
Specified by:
handle in interface org.wymiwyg.wrhapi.Handler
Throws:
org.wymiwyg.wrhapi.HandlerException


Copyright © 2008. All Rights Reserved.