Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mule.transport.servlet
Class MuleRESTReceiverServlet

    java.lang.Object
      javax.servlet.GenericServlet
          javax.servlet.http.HttpServlet
              org.mule.transport.servlet.AbstractReceiverServlet
                  org.mule.transport.servlet.MuleReceiverServlet
                      org.mule.transport.servlet.MuleRESTReceiverServlet

All Implemented Interfaces:
  Serializable, Servlet, ServletConfig

    public class MuleRESTReceiverServlet

extends MuleReceiverServlet

`MuleRESTReceiverServlet` is used for sending and receiving events from the Mule server via a servlet container. The servlet uses the REST style of request processing.

GET METHOD will do a request from an endpoint if an endpoint parameter is set otherwise it behaves the same way as POST. You can either specify the endpoint URL REST-style, e.g., to read from jms://orders.queue

http://www.mycompany.com/rest/jms/orders/queue

or a logical Mule endpoint name, e.g., this would get the first email message received by the orderEmailInbox endpoint.

http://www.mycompany.com/rest/ordersEmailInbox

POST METHOD Do a synchronous call and return a result http://www.clientapplication.com/service/clientquery?custId=1234

PUT METHOD Do an asynchronous call without returning a result (other than an http status code) http://www.clientapplication.com/service/orders?payload=more beer

DELETE METHOD Same as GET only without returning a result

See Also:
  Serialized Form

Field Summary

Fields inherited from class org.mule.transport.servlet.MuleReceiverServlet
`connector`

Fields inherited from class org.mule.transport.servlet.AbstractReceiverServlet
`DEFAULT_CONTENT_TYPE_PROPERTY, DEFAULT_GET_TIMEOUT, DEFAULT_PAYLOAD_PARAMETER_NAME, defaultContentType, feedback, FEEDBACK_PROPERTY, logger, muleContext, PAYLOAD_PARAMETER_NAME, payloadParameterName, REQUEST_TIMEOUT_PROPERTY, SERVLET_CONNECTOR_NAME_PROPERTY, timeout`

Constructor Summary
`MuleRESTReceiverServlet()`

Method Summary
`protected void` | `doDelete(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)`
`protected void` | `doGet(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)`
`protected void` | `doPost(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)`
`protected void` | `doPut(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)`
`protected InboundEndpoint` | `getEndpointForURI(HttpServletRequest httpServletRequest)`

Methods inherited from class org.mule.transport.servlet.MuleReceiverServlet
`doConnect, doHead, doInit, doMethod, doOptions, doTrace, getReceiverForURI, getReceiverName, getReceivers, getRequestUrl, routeMessage, setupRequestMessage, setupRequestMessage`

Methods inherited from class org.mule.transport.servlet.AbstractReceiverServlet
`handleException, init, setHttpHeadersOnServletResponse, setupMuleContext, writeResponse`

Methods inherited from class javax.servlet.http.HttpServlet
`getLastModified, service, service`

Methods inherited from class javax.servlet.GenericServlet
`destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MuleRESTReceiverServlet

    public MuleRESTReceiverServlet()

Method Detail

### doGet

    protected void doGet(HttpServletRequest httpServletRequest,
                         HttpServletResponse httpServletResponse)
                  throws ServletException,
                         IOException

  Overrides:
    `doGet` in class `MuleReceiverServlet`
  Throws:
    `ServletException`
    `IOException`

### doPost

    protected void doPost(HttpServletRequest httpServletRequest,
                          HttpServletResponse httpServletResponse)
                   throws ServletException,
                          IOException

  Overrides:
    `doPost` in class `MuleReceiverServlet`
  Throws:
    `ServletException`
    `IOException`

### doPut

    protected void doPut(HttpServletRequest httpServletRequest,
                         HttpServletResponse httpServletResponse)
                  throws ServletException,
                         IOException

  Overrides:
    `doPut` in class `MuleReceiverServlet`
  Throws:
    `ServletException`
    `IOException`

### doDelete

    protected void doDelete(HttpServletRequest httpServletRequest,
                            HttpServletResponse httpServletResponse)
                     throws ServletException,
                            IOException

  Overrides:
    `doDelete` in class `MuleReceiverServlet`
  Throws:
    `ServletException`
    `IOException`

### getEndpointForURI

    protected InboundEndpoint getEndpointForURI(HttpServletRequest httpServletRequest)
                                         throws MuleException

  Throws:
    `MuleException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.