Examples of AsyncEvent


Examples of javax.servlet.AsyncEvent


    public void setErrorState(Throwable t) {
        if (t!=null) request.setAttribute(RequestDispatcher.ERROR_EXCEPTION, t);
        request.getCoyoteRequest().action(ActionCode.ASYNC_ERROR, null);
        AsyncEvent errorEvent = new AsyncEvent(event.getAsyncContext(),
                event.getSuppliedRequest(), event.getSuppliedResponse(), t);
        List<AsyncListenerWrapper> listenersCopy =
            new ArrayList<AsyncListenerWrapper>();
        listenersCopy.addAll(listeners);
        for (AsyncListenerWrapper listener : listenersCopy) {
View Full Code Here

Examples of javax.servlet.AsyncEvent

        this.context = context;
        this.servletRequest = request;
        this.servletResponse = response;
        this.hasOriginalRequestAndResponse = originalRequestResponse;
        this.event = new AsyncEvent(this, request, response);

        List<AsyncListenerWrapper> listenersCopy = new ArrayList<>();
        listenersCopy.addAll(listeners);
        for (AsyncListenerWrapper listener : listenersCopy) {
            try {
View Full Code Here

Examples of javax.servlet.AsyncEvent

    public void setErrorState(Throwable t, boolean fireOnError) {
        if (t!=null) request.setAttribute(RequestDispatcher.ERROR_EXCEPTION, t);
        request.getCoyoteRequest().action(ActionCode.ASYNC_ERROR, null);

        if (fireOnError) {
            AsyncEvent errorEvent = new AsyncEvent(event.getAsyncContext(),
                    event.getSuppliedRequest(), event.getSuppliedResponse(), t);
            List<AsyncListenerWrapper> listenersCopy = new ArrayList<>();
            listenersCopy.addAll(listeners);
            for (AsyncListenerWrapper listener : listenersCopy) {
                try {
View Full Code Here

Examples of javax.servlet.AsyncEvent

      ((WebAppServlet)servletContext).dispatch(path, request, response);
    } catch (Exception e) {
      for (AsyncListener listener : listeners)
        try {
          Object[] data = associatedData.get(listener);
          listener.onError(data == null ? new AsyncEvent(this, e) : new AsyncEvent(this,
              (ServletRequest) data[0], (ServletResponse) data[1], e));
        } catch (Throwable t) {
          if (t instanceof ThreadDeath)
            throw (ThreadDeath) t;
        }
View Full Code Here

Examples of javax.servlet.AsyncEvent

  public void notifyTimeout() {
    for (AsyncListener listener : listeners)
      try {
        Object[] data = associatedData.get(listener);
        listener.onTimeout(data == null ? new AsyncEvent(this) : new AsyncEvent(this, (ServletRequest) data[0],
            (ServletResponse) data[1]));
      } catch (Throwable t) {
        if (t instanceof ThreadDeath)
          throw (ThreadDeath) t;
      }
View Full Code Here

Examples of javax.servlet.AsyncEvent

  public void notifyStart() {
    for (AsyncListener listener : listeners)
      try {
        Object[] data = associatedData.get(listener);
        listener.onStartAsync(data == null ? new AsyncEvent(this) : new AsyncEvent(this,
            (ServletRequest) data[0], (ServletResponse) data[1]));
      } catch (Throwable t) {
        if (t instanceof ThreadDeath)
          throw (ThreadDeath) t;
      }
View Full Code Here

Examples of javax.servlet.AsyncEvent

        this.context = context;
        this.servletRequest = request;
        this.servletResponse = response;
        this.hasOriginalRequestAndResponse = originalRequestResponse;
        this.event = new AsyncEvent(this, request, response);
       
        List<AsyncListenerWrapper> listenersCopy =
            new ArrayList<AsyncListenerWrapper>();
        listenersCopy.addAll(listeners);
        for (AsyncListenerWrapper listener : listenersCopy) {
View Full Code Here

Examples of javax.servlet.AsyncEvent


    public void setErrorState(Throwable t) {
        if (t!=null) request.setAttribute(RequestDispatcher.ERROR_EXCEPTION, t);
        request.getCoyoteRequest().action(ActionCode.ASYNC_ERROR, null);
        AsyncEvent errorEvent = new AsyncEvent(event.getAsyncContext(),
                event.getSuppliedRequest(), event.getSuppliedResponse(), t);
        List<AsyncListenerWrapper> listenersCopy =
            new ArrayList<AsyncListenerWrapper>();
        listenersCopy.addAll(listeners);
        for (AsyncListenerWrapper listener : listenersCopy) {
View Full Code Here

Examples of javax.servlet.AsyncEvent

        this.context = context;
        this.servletRequest = request;
        this.servletResponse = response;
        this.hasOriginalRequestAndResponse = originalRequestResponse;
        this.event = new AsyncEvent(this, request, response);
       
        List<AsyncListenerWrapper> listenersCopy =
            new ArrayList<AsyncListenerWrapper>();
        listenersCopy.addAll(listeners);
        for (AsyncListenerWrapper listener : listenersCopy) {
View Full Code Here

Examples of javax.servlet.AsyncEvent


    public void setErrorState(Throwable t) {
        if (t!=null) request.setAttribute(RequestDispatcher.ERROR_EXCEPTION, t);
        request.getCoyoteRequest().action(ActionCode.ASYNC_ERROR, null);
        AsyncEvent errorEvent = new AsyncEvent(event.getAsyncContext(),
                event.getSuppliedRequest(), event.getSuppliedResponse(), t);
        List<AsyncListenerWrapper> listenersCopy =
            new ArrayList<AsyncListenerWrapper>();
        listenersCopy.addAll(listeners);
        for (AsyncListenerWrapper listener : listenersCopy) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.