Search in sources :

Example 1 with HttpServerHelper

use of org.restlet.engine.adapter.HttpServerHelper in project AJSC by att.

the class RestletSpringServlet method getServer.

public HttpServerHelper getServer(HttpServletRequest request) {
    // Lazy initialization with double-check.
    HttpServerHelper result;
    // // Find the attribute name to use to store the server
    // // reference
    final String serverAttributeName = getInitParameter(NAME_SERVER_ATTRIBUTE, NAME_SERVER_ATTRIBUTE_DEFAULT + "." + getServletName());
    Component component = getComponent();
    // System.out.println("isFirstRequest:" +isFirstRequest);
    // if ((!isFirstRequest) && isNewRouteAdded(request, component)) {
    // result = createServer(request, component);
    // getServletContext().setAttribute(serverAttributeName, result);
    // } else {
    // System.out.println("Super getServer");
    result = super.getServer(request);
    // }
    isFirstRequest = false;
    return result;
}
Also used : HttpServerHelper(org.restlet.engine.adapter.HttpServerHelper) Component(org.restlet.Component)

Aggregations

Component (org.restlet.Component)1 HttpServerHelper (org.restlet.engine.adapter.HttpServerHelper)1