Package org.apache.wicket.ng.request.cycle

Examples of org.apache.wicket.ng.request.cycle.RequestCycle


  public final void onResourceRequested()
  {
    try
    {
      // Get request cycle
      final RequestCycle cycle = RequestCycle.get();

      // Fetch resource from subclass if necessary
      IResourceStream resourceStream = init();

      // Get servlet response to use when responding with resource
      final WebResponse response = (WebResponse)cycle.getResponse();

      // FIXME WICKET-385 Move HTTP caching features out of org.apache.wicket.Resource
      if (isCacheable())
      {
        response.setLastModifiedTime(resourceStream.lastModifiedTime().getMilliseconds());
      }
      else
      {
        response.setLastModifiedTime(-1);
      }
      configureResponse(response);

      cycle.scheduleRequestHandlerAfterCurrent(new ResourceStreamRequestHandler(
        resourceStream));
    }
    finally
    {
      // Really really really make sure parameters are cleared
View Full Code Here


    totalCreatedSessions.incrementAndGet();
  }

  RequestData getCurrentRequest()
  {
    RequestCycle requestCycle = RequestCycle.get();
    RequestData rd = requestCycle.getMetaData(REQUEST_DATA);
    if (rd == null)
    {
      rd = new RequestData();
      requestCycle.setMetaData(REQUEST_DATA, rd);
      active.incrementAndGet();
    }
    return rd;
  }
View Full Code Here

TOP

Related Classes of org.apache.wicket.ng.request.cycle.RequestCycle

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.