Package dk.brics.jwig

Examples of dk.brics.jwig.Response


          Cache cache = ThreadContext.getCache();
          StringBuilder updates = new StringBuilder();
          for (int i = 0; i < fragmentnames.length; i++) {
            String name = fragmentnames[i];
            String etag = etags[i];
            Response p = cache.get(name);
            if (p == null || !etag.equals("\"" + p.getETag() + "\""))
              updates.append(name).append(';');
          }
          if (updates.length() > 0) {
            String u = updates.toString();
          log.debug("Update ready already: " + u);
View Full Code Here


     *
     * @return true if processed by this request manager
     */
    public boolean process(String path, String url, HttpServletRequest request, HttpServletResponse response) {
        ThreadContext oc = ThreadContext.get();
        ThreadContext threadContext = new ThreadContext(request, response, url, new Response(),
                                                        getServletParams(request), path, oc);
        threadContext.createInvocationContext(null, null, null, -1);
        threadContext.setRequestManager(null);

        try {
View Full Code Here

                log.warn("IOException when sending empty response: " + e.getMessage());
            }
        }
        if (result != null) {
            if (result instanceof XML || result instanceof String) {
                Response r = new Response(c.getResponse());
                r.setResult(result);
                send(r);
            } else if (result instanceof URL) {
                try {
                    response.sendRedirect(result.toString());
                } catch (IOException e) {
View Full Code Here

    @Override
  synchronized public void remove(String url) {
        CachedResponse c = memorycache.remove(url);
        ThreadContext.getDependencyMap().pageRemovedFromCache(url);
        if (c != null) {
            Response p = c.response;
            log.info("Removing cached " + describe(p, url));
            for (AbstractHandler h : p.getHandlers()) {
                h.destroy();
            }
        }
    }
View Full Code Here

TOP

Related Classes of dk.brics.jwig.Response

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.