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.apache.struts2.rest
Interface ContentTypeHandlerManager

All Known Implementing Classes:
  DefaultContentTypeHandlerManager

    public interface ContentTypeHandlerManager

Manages content type handlers

Field Summary
`static String` | `STRUTS_REST_HANDLER_OVERRIDE_PREFIX`

Method Summary
`String` | `findExtension(String url)` Finds the extension in the url
`ContentTypeHandler` | `getHandlerForRequest(javax.servlet.http.HttpServletRequest req)` Gets the handler for the request by looking at the request content type and extension
`ContentTypeHandler` | `getHandlerForResponse(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)` Gets the handler for the response by looking at the extension of the request
`String` | `handleResult(com.opensymphony.xwork2.config.entities.ActionConfig actionConfig, Object methodResult, Object target)` Deprecated. use version which requires `ActionInvocation`
`String` | `handleResult(com.opensymphony.xwork2.ActionInvocation actionInvocation, Object methodResult, Object target)`

Field Detail

### STRUTS_REST_HANDLER_OVERRIDE_PREFIX

    static final String STRUTS_REST_HANDLER_OVERRIDE_PREFIX

See Also:
  Constant Field Values

Method Detail

### getHandlerForRequest

    ContentTypeHandler getHandlerForRequest(javax.servlet.http.HttpServletRequest req)

  Gets the handler for the request by looking at the request content type and extension

  Parameters:
    `req` - The request
  Returns:
    The appropriate handler

### getHandlerForResponse

    ContentTypeHandler getHandlerForResponse(javax.servlet.http.HttpServletRequest req,
                                             javax.servlet.http.HttpServletResponse res)

  Gets the handler for the response by looking at the extension of the request

  Parameters:
    `req` - The request
  Returns:
    The appropriate handler

### handleResult

    @Deprecated
    String handleResult(com.opensymphony.xwork2.config.entities.ActionConfig actionConfig,
                                   Object methodResult,
                                   Object target)
                        throws IOException

  Deprecated. use version which requires `ActionInvocation`

  Handles the result using handlers to generate content type-specific content

  Parameters:
    `actionConfig` - The action config for the current request
    `methodResult` - The object returned from the action method
    `target` - The object to return, usually the action object
  Returns:
    The new result code to process
  Throws:
    `IOException` - If unable to write to the response

### handleResult

    String handleResult(com.opensymphony.xwork2.ActionInvocation actionInvocation,
                        Object methodResult,
                        Object target)
                        throws IOException

  Throws:
    `IOException`

### findExtension

    String findExtension(String url)

  Finds the extension in the url

  Parameters:
    `url` - The url
  Returns:
    The extension

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 © 2000–2017 Apache Software Foundation. All rights reserved.