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:
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 maps 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 java.lang.String JERSEY_RESPONSE
           
protected  Log logger
           
 
Fields inherited from class org.mule.component.AbstractComponent
flowConstruct, interceptorChain, interceptors, 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
 
Constructor Summary
JerseyResourcesComponent()
           
 
Method Summary
protected  com.sun.jersey.api.core.DefaultResourceConfig createConfiguration(java.util.Set<java.lang.Class<?>> resources)
           
protected  void doInitialise()
           
protected  java.lang.Object doInvoke(MuleEvent event)
           
protected static java.net.URI getBaseUri(EndpointURI endpointUri, java.lang.String scheme, java.lang.String host, java.lang.String contextPath)
           
protected static java.net.URI getCompleteUri(EndpointURI endpointUri, java.lang.String scheme, java.lang.String host, java.lang.String path, java.lang.String query)
           
protected  com.sun.jersey.core.spi.component.ioc.IoCComponentProviderFactory getComponentProvider()
           
 java.util.List<JavaComponent> getComponents()
           
protected static java.io.InputStream getInputStream(MuleMessage message)
           
 void setComponents(java.util.List<JavaComponent> components)
           
 void setMessageProcessors(java.util.List<MessageProcessor> messageProcessors)
           
 
Methods inherited from class org.mule.component.AbstractComponent
createResultEvent, dispose, doDispose, doStart, doStop, fireComponentNotification, getFlowConstruct, getInterceptors, getStatistics, initialise, process, release, 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 java.lang.String JERSEY_RESPONSE

logger

protected final Log logger
Constructor Detail

JerseyResourcesComponent

public JerseyResourcesComponent()
Method Detail

doInitialise

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

createConfiguration

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

doInvoke

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

getInputStream

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

getComponentProvider

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

getCompleteUri

protected static java.net.URI getCompleteUri(EndpointURI endpointUri,
                                             java.lang.String scheme,
                                             java.lang.String host,
                                             java.lang.String path,
                                             java.lang.String query)
                                      throws java.net.URISyntaxException
Throws:
java.net.URISyntaxException

getBaseUri

protected static java.net.URI getBaseUri(EndpointURI endpointUri,
                                         java.lang.String scheme,
                                         java.lang.String host,
                                         java.lang.String contextPath)
                                  throws java.net.URISyntaxException
Throws:
java.net.URISyntaxException

getComponents

public java.util.List<JavaComponent> getComponents()

setComponents

public void setComponents(java.util.List<JavaComponent> components)

setMessageProcessors

public void setMessageProcessors(java.util.List<MessageProcessor> messageProcessors)


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