org.mule.module.jersey
Class JerseyResourcesComponent

java.lang.Object
  extended by org.mule.component.AbstractComponent
      extended by org.mule.module.jersey.JerseyResourcesComponent
All Implemented Interfaces:
AnnotatedObject, Component, FlowConstructAware, MuleContextAware, Disposable, Initialisable, Lifecycle, Startable, Stoppable, MessageProcessor

public class JerseyResourcesComponent
extends AbstractComponent

Wraps a set of components which can get invoked by Jersey. This component will map the MuleMessage format to the internal Jersey format. Jersey will then select the appropriate component to invoke based on the request parameters/URI.


Field Summary
static String JERSEY_RESPONSE
           
 
Fields inherited from class org.mule.component.AbstractComponent
flowConstruct, interceptorChain, interceptors, lifecycleManager, logger, muleContext, notificationHandler, statistics
 
Fields inherited from interface org.mule.api.lifecycle.Initialisable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Startable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Stoppable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Disposable
PHASE_NAME
 
Fields inherited from interface org.mule.api.AnnotatedObject
PROPERTY_NAME
 
Constructor Summary
JerseyResourcesComponent()
           
 
Method Summary
protected  com.sun.jersey.api.core.DefaultResourceConfig createConfiguration(Set<Class<?>> resources)
           
protected  void doInitialise()
           
protected  Object doInvoke(MuleEvent event)
           
protected static URI getBaseUri(URI endpointUri, String scheme, String host, String contextPath)
           
protected static URI getCompleteUri(URI endpointUri, String scheme, String host, String path, String query)
           
protected  com.sun.jersey.core.spi.component.ioc.IoCComponentProviderFactory getComponentProvider()
           
 List<JavaComponent> getComponents()
           
protected static InputStream getInputStream(MuleMessage message)
           
protected  void initializeOtherResources(List<?> newResources, Set<Class<?>> resources)
           
protected  void initializeResources(Set<Class<?>> resources)
           
 void setComponents(List<JavaComponent> components)
           
 void setContextResolvers(List<javax.ws.rs.ext.ContextResolver<?>> contextResolvers)
           
 void setExceptionMappers(List<javax.ws.rs.ext.ExceptionMapper<?>> exceptionMappers)
           
 void setMessageProcessors(List<MessageProcessor> messageProcessors)
           
 
Methods inherited from class org.mule.component.AbstractComponent
createResultEvent, dispose, doDispose, doStart, doStop, fireComponentNotification, getAnnotation, getAnnotations, getFlowConstruct, getInterceptors, getName, getStatistics, initialise, process, release, setAnnotations, setFlowConstruct, setInterceptors, setMuleContext, start, stop, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

JERSEY_RESPONSE

public static String JERSEY_RESPONSE
Constructor Detail

JerseyResourcesComponent

public JerseyResourcesComponent()
Method Detail

doInitialise

protected void doInitialise()
                     throws InitialisationException
Overrides:
doInitialise in class AbstractComponent
Throws:
InitialisationException

initializeResources

protected void initializeResources(Set<Class<?>> resources)
                            throws InitialisationException
Throws:
InitialisationException

initializeOtherResources

protected void initializeOtherResources(List<?> newResources,
                                        Set<Class<?>> resources)

createConfiguration

protected com.sun.jersey.api.core.DefaultResourceConfig createConfiguration(Set<Class<?>> resources)

doInvoke

protected Object doInvoke(MuleEvent event)
                   throws Exception
Specified by:
doInvoke in class AbstractComponent
Throws:
Exception

getInputStream

protected static InputStream getInputStream(MuleMessage message)
                                     throws TransformerException
Throws:
TransformerException

getComponentProvider

protected com.sun.jersey.core.spi.component.ioc.IoCComponentProviderFactory getComponentProvider()

getCompleteUri

protected static URI getCompleteUri(URI endpointUri,
                                    String scheme,
                                    String host,
                                    String path,
                                    String query)
                             throws URISyntaxException
Throws:
URISyntaxException

getBaseUri

protected static URI getBaseUri(URI endpointUri,
                                String scheme,
                                String host,
                                String contextPath)
                         throws URISyntaxException
Throws:
URISyntaxException

getComponents

public List<JavaComponent> getComponents()

setComponents

public void setComponents(List<JavaComponent> components)

setMessageProcessors

public void setMessageProcessors(List<MessageProcessor> messageProcessors)

setExceptionMappers

public void setExceptionMappers(List<javax.ws.rs.ext.ExceptionMapper<?>> exceptionMappers)

setContextResolvers

public void setContextResolvers(List<javax.ws.rs.ext.ContextResolver<?>> contextResolvers)


Copyright © 2003-2014 MuleSoft, Inc.. All Rights Reserved.