org.mule.transport.http.components
Class RestServiceWrapper
java.lang.Object
org.mule.component.AbstractComponent
org.mule.transport.http.components.RestServiceWrapper
- All Implemented Interfaces:
- org.mule.api.component.Component, org.mule.api.lifecycle.Disposable, org.mule.api.lifecycle.Initialisable, org.mule.api.lifecycle.Lifecycle, org.mule.api.lifecycle.Startable, org.mule.api.lifecycle.Stoppable
public class RestServiceWrapper
- extends org.mule.component.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.
| Fields inherited from class org.mule.component.AbstractComponent |
disposed, disposing, initialised, service, started, statistics, stopping |
| 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 |
| Methods inherited from class org.mule.component.AbstractComponent |
checkDisposed, dispose, getReplyToHandler, getService, getStatistics, handleException, initialise, onCall, onEvent, release, setService, start, stop, toString |
REST_SERVICE_URL
public static final String REST_SERVICE_URL
- See Also:
- Constant Field Values
GET
public static final String GET
- See Also:
- Constant Field Values
CONTENT_TYPE
public static final String CONTENT_TYPE
- See Also:
- Constant Field Values
CONTENT_TYPE_VALUE
public static final String CONTENT_TYPE_VALUE
- See Also:
- Constant Field Values
HTTP_METHOD
public static final String HTTP_METHOD
- See Also:
- Constant Field Values
logger
protected transient Log logger
- logger used by this class
RestServiceWrapper
public RestServiceWrapper()
getServiceUrl
public String getServiceUrl()
setServiceUrl
public void setServiceUrl(String serviceUrl)
isUrlFromMessage
public boolean isUrlFromMessage()
setUrlFromMessage
public void setUrlFromMessage(boolean urlFromMessage)
getRequiredParams
public Map getRequiredParams()
setRequiredParams
public void setRequiredParams(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 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
- Parameters:
requiredParams -
setOptionalParams
public void setOptionalParams(Map optionalParams)
getHttpMethod
public String getHttpMethod()
setHttpMethod
public void setHttpMethod(String httpMethod)
getPayloadParameterNames
public List getPayloadParameterNames()
setPayloadParameterNames
public void setPayloadParameterNames(List payloadParameterNames)
getFilter
public org.mule.api.routing.filter.Filter getFilter()
setFilter
public void setFilter(org.mule.api.routing.filter.Filter errorFilter)
getErrorExpression
public String getErrorExpression()
setErrorExpression
public void setErrorExpression(String errorExpression)
doInitialise
protected void doInitialise()
throws org.mule.api.lifecycle.InitialisationException
- Specified by:
doInitialise in class org.mule.component.AbstractComponent
- Throws:
org.mule.api.lifecycle.InitialisationException
doOnCall
public org.mule.api.MuleMessage doOnCall(org.mule.api.MuleEvent event)
- Specified by:
doOnCall in class org.mule.component.AbstractComponent
isErrorPayload
protected boolean isErrorPayload(org.mule.api.MuleMessage message)
handleException
protected void handleException(RestServiceException e,
org.mule.api.MuleMessage result)
throws Exception
- Throws:
Exception
doOnEvent
protected void doOnEvent(org.mule.api.MuleEvent event)
- Specified by:
doOnEvent in class org.mule.component.AbstractComponent
doDispose
protected void doDispose()
- Specified by:
doDispose in class org.mule.component.AbstractComponent
doStart
protected void doStart()
throws org.mule.api.MuleException
- Specified by:
doStart in class org.mule.component.AbstractComponent
- Throws:
org.mule.api.MuleException
doStop
protected void doStop()
throws org.mule.api.MuleException
- Specified by:
doStop in class org.mule.component.AbstractComponent
- Throws:
org.mule.api.MuleException
Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.