示例#1
0
  public void handle(
      FeedHandlerRequest handlerRequest,
      FeedHandlerResponse handlerResponse,
      FeedHandlerChain handlerChain)
      throws FeedHandlerException, IOException {

    handlerChain.chain(handlerRequest, handlerResponse);
    if (handlerResponse.getFeedType() != FeedHandlerResponse.NONE) {
      handlerResponse.setHttpError(HttpServletResponse.SC_NO_CONTENT, null);
    }
  }
示例#2
0
  public void handle(
      FeedHandlerRequest handlerRequest,
      FeedHandlerResponse handlerResponse,
      FeedHandlerChain handlerChain)
      throws FeedHandlerException, IOException {

    handlerChain.chain(handlerRequest, handlerResponse);

    SyndFeed feed = handlerResponse.getSyndFeed();
    if (feed != null) {
      String toType = handlerRequest.getParameter(namespace("to"));
      if (toType == null) {
        toType = toDefault;
      }
      feed.setFeedType(toType);
    }
  }