-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
185 changed files
with
10,979 additions
and
291 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
* Copyright (c) 2017, 2018 Oracle and/or its affiliates and others. | ||
* All rights reserved. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v. 2.0, which is available at | ||
* http://www.eclipse.org/legal/epl-2.0. | ||
* | ||
* This Source Code may also be made available under the following Secondary | ||
* Licenses when the conditions for such availability set forth in the | ||
* Eclipse Public License v. 2.0 are satisfied: GNU General Public License, | ||
* version 2 with the GNU Classpath Exception, which is available at | ||
* https://www.gnu.org/software/classpath/license.html. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 | ||
*/ | ||
|
||
package javax.servlet; | ||
|
||
public interface AsyncContext { | ||
String ASYNC_REQUEST_URI = "javax.servlet.async.request_uri"; | ||
|
||
String ASYNC_CONTEXT_PATH = "javax.servlet.async.context_path"; | ||
|
||
String ASYNC_MAPPING = "javax.servlet.async.mapping"; | ||
|
||
String ASYNC_PATH_INFO = "javax.servlet.async.path_info"; | ||
|
||
String ASYNC_SERVLET_PATH = "javax.servlet.async.servlet_path"; | ||
|
||
String ASYNC_QUERY_STRING = "javax.servlet.async.query_string"; | ||
|
||
ServletRequest getRequest(); | ||
|
||
ServletResponse getResponse(); | ||
|
||
boolean hasOriginalRequestAndResponse(); | ||
|
||
void dispatch(); | ||
|
||
void dispatch(String path); | ||
|
||
void dispatch(ServletContext context, String path); | ||
|
||
void complete(); | ||
|
||
void start(Runnable run); | ||
|
||
void addListener(AsyncListener listener); | ||
|
||
void addListener(AsyncListener listener, ServletRequest servletRequest, ServletResponse servletResponse); | ||
|
||
<T extends AsyncListener> T createListener(Class<T> clazz) throws ServletException; | ||
|
||
void setTimeout(long timeout); | ||
|
||
long getTimeout(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
* Copyright (c) 1997, 2018 Oracle and/or its affiliates and others. | ||
* All rights reserved. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v. 2.0, which is available at | ||
* http://www.eclipse.org/legal/epl-2.0. | ||
* | ||
* This Source Code may also be made available under the following Secondary | ||
* Licenses when the conditions for such availability set forth in the | ||
* Eclipse Public License v. 2.0 are satisfied: GNU General Public License, | ||
* version 2 with the GNU Classpath Exception, which is available at | ||
* https://www.gnu.org/software/classpath/license.html. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 | ||
*/ | ||
|
||
package javax.servlet; | ||
|
||
public class AsyncEvent { | ||
private AsyncContext context; | ||
private ServletRequest request; | ||
private ServletResponse response; | ||
private Throwable throwable; | ||
|
||
public AsyncEvent(AsyncContext context) { | ||
this(context, context.getRequest(), context.getResponse(), null); | ||
} | ||
|
||
public AsyncEvent(AsyncContext context, ServletRequest request, ServletResponse response) { | ||
this(context, request, response, null); | ||
} | ||
|
||
public AsyncEvent(AsyncContext context, Throwable throwable) { | ||
this(context, context.getRequest(), context.getResponse(), throwable); | ||
} | ||
|
||
public AsyncEvent(AsyncContext context, ServletRequest request, ServletResponse response, Throwable throwable) { | ||
this.context = context; | ||
this.request = request; | ||
this.response = response; | ||
this.throwable = throwable; | ||
} | ||
|
||
public AsyncContext getAsyncContext() { | ||
return context; | ||
} | ||
|
||
public ServletRequest getSuppliedRequest() { | ||
return request; | ||
} | ||
|
||
public ServletResponse getSuppliedResponse() { | ||
return response; | ||
} | ||
|
||
public Throwable getThrowable() { | ||
return throwable; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright (c) 2017, 2018 Oracle and/or its affiliates and others. | ||
* All rights reserved. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v. 2.0, which is available at | ||
* http://www.eclipse.org/legal/epl-2.0. | ||
* | ||
* This Source Code may also be made available under the following Secondary | ||
* Licenses when the conditions for such availability set forth in the | ||
* Eclipse Public License v. 2.0 are satisfied: GNU General Public License, | ||
* version 2 with the GNU Classpath Exception, which is available at | ||
* https://www.gnu.org/software/classpath/license.html. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 | ||
*/ | ||
|
||
package javax.servlet; | ||
|
||
import java.io.IOException; | ||
import java.util.EventListener; | ||
|
||
public interface AsyncListener extends EventListener { | ||
void onComplete(AsyncEvent event) throws IOException; | ||
|
||
void onTimeout(AsyncEvent event) throws IOException; | ||
|
||
void onError(AsyncEvent event) throws IOException; | ||
|
||
void onStartAsync(AsyncEvent event) throws IOException; | ||
} |
Oops, something went wrong.