Package com.caucho.server.dispatch

Examples of com.caucho.server.dispatch.Invocation


    try {
      if (_method.getLength() == 0)
        throw new RuntimeException("HTTP protocol exception, expected method");

      Invocation invocation;

      invocation = getInvocation(getHost(),
                                 _uri.getBuffer(), _uri.getLength());

      getRequestFacade().setInvocation(invocation);

      startInvocation();

      if (_server.isPreview() && ! "resin.admin".equals(getHost())) {
        return sendBusyResponse();
      }

      invocation.service(getRequestFacade(), getResponseFacade());
    } catch (ClientDisconnectException e) {
      throw e;
    } catch (Throwable e) {
      log.log(Level.FINER, e.toString(), e);
View Full Code Here


  {
    _invocationKey.init(isSecure(),
                        host, getServerPort(),
                        uri, uriLength);

    Invocation invocation = _server.getInvocation(_invocationKey);

    if (invocation != null)
      return invocation.getRequestInvocation(_requestFacade);

    invocation = _server.createInvocation();
    invocation.setSecure(isSecure());

    if (host != null) {
      String hostName = host.toString().toLowerCase();

      invocation.setHost(hostName);
      invocation.setPort(getServerPort());

      // Default host name if the host doesn't have a canonical
      // name
      int p = hostName.lastIndexOf(':');
      int q = hostName.lastIndexOf(']');
      if (p > 0 && q < p)
        invocation.setHostName(hostName.substring(0, p));
      else
        invocation.setHostName(hostName);
    }

    return buildInvocation(invocation, uri, uriLength);
  }
View Full Code Here

          return isSuspend();
        }
      }

      Invocation invocation = getRequestFacade().getInvocation();

      invocation.service(getRequestFacade(), getResponseFacade());
    } catch (ClientDisconnectException e) {
      _responseFacade.killCache();

      throw e;
    } catch (Throwable e) {
View Full Code Here

    if (url == null)
      throw new IllegalArgumentException(L.l("request dispatcher url can't be null."));
    else if (! url.startsWith("/"))
      throw new IllegalArgumentException(L.l("request dispatcher url `{0}' must be absolute", url));

    Invocation includeInvocation = new Invocation();
    Invocation forwardInvocation = new Invocation();
    Invocation errorInvocation = new Invocation();
    Invocation dispatchInvocation = new Invocation();
    InvocationDecoder decoder = new InvocationDecoder();

    String rawURI = url;

    try {
View Full Code Here

         return false;
      }

      CharSequence host = getInvocationHost();

      Invocation invocation = getInvocation(host, _uri, _uriLength);

      if (invocation == null)
        return false;

      HttpServletRequestImpl requestFacade = getRequestFacade();

      requestFacade.setInvocation(invocation);

      isInvocation = true;
      startTime = _requestTimeProbe.start();
      startInvocation();

      invocation.service(requestFacade, getResponseFacade());
    } catch (ClientDisconnectException e) {
      getResponseFacade().killCache();
      killKeepalive();

      throw e;
View Full Code Here

   * @since Servlet 3.0
   */
  @Override
  public ServletContext getServletContext()
  {
    Invocation invocation = _invocation;

    if (invocation != null)
      return invocation.getWebApp();
    else
      return null;
  }
View Full Code Here

   * @since Servlet 3.0
   */
  @Override
  public boolean isAsyncSupported()
  {
    Invocation invocation = _invocation;

    if (invocation != null)
      return invocation.isAsyncSupported();
    else
      return false;
  }
View Full Code Here

TOP

Related Classes of com.caucho.server.dispatch.Invocation

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.