org.mule.transport.http.components
Class RestServiceWrapper
java.lang.Object
org.mule.component.AbstractComponent
org.mule.transport.http.components.RestServiceWrapper
- All Implemented Interfaces:
- Component, FlowConstructAware, MuleContextAware, Disposable, Initialisable, Lifecycle, Startable, Stoppable, MessageProcessor
public class RestServiceWrapper
- extends AbstractComponent
This service can used to proxy REST style services as local Mule Components. It
can be configured with a service URL plus a number of properties that allow you to
configure the parameters and error conditions on the service.
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 |
DELETE
public static final java.lang.String DELETE
- See Also:
- Constant Field Values
GET
public static final java.lang.String GET
- See Also:
- Constant Field Values
CONTENT_TYPE_VALUE
public static final java.lang.String CONTENT_TYPE_VALUE
- See Also:
- Constant Field Values
HTTP_METHOD
public static final java.lang.String HTTP_METHOD
- See Also:
- Constant Field Values
logger
protected transient Log logger
- logger used by this class
RestServiceWrapper
public RestServiceWrapper()
getServiceUrl
public java.lang.String getServiceUrl()
setServiceUrl
public void setServiceUrl(java.lang.String serviceUrl)
getRequiredParams
public java.util.Map getRequiredParams()
setRequiredParams
public void setRequiredParams(java.util.Map requiredParams)
- Required params that are pulled from the message. If these params don't exist
the call will fail Note that you can use
ExpressionEvaluator
expressions such as
xpath, header, xquery, etc
- Parameters:
requiredParams
-
getOptionalParams
public java.util.Map getOptionalParams()
- Optional params that are pulled from the message. If these params don't exist
execution will continue. Note that you can use
ExpressionEvaluator
expressions such as xpath, header, xquery, etc
setOptionalParams
public void setOptionalParams(java.util.Map optionalParams)
getHttpMethod
public java.lang.String getHttpMethod()
setHttpMethod
public void setHttpMethod(java.lang.String httpMethod)
getPayloadParameterNames
public java.util.List getPayloadParameterNames()
setPayloadParameterNames
public void setPayloadParameterNames(java.util.List payloadParameterNames)
getFilter
public Filter getFilter()
setFilter
public void setFilter(Filter errorFilter)
doInitialise
protected void doInitialise()
throws InitialisationException
- Overrides:
doInitialise
in class AbstractComponent
- Throws:
InitialisationException
doInvoke
public java.lang.Object doInvoke(MuleEvent event)
throws java.lang.Exception
- Specified by:
doInvoke
in class AbstractComponent
- Throws:
java.lang.Exception
isErrorPayload
protected boolean isErrorPayload(MuleMessage message)
handleException
protected void handleException(RestServiceException e,
MuleMessage result)
throws java.lang.Exception
- Throws:
java.lang.Exception
Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.