KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > web > connector > grizzly > AsyncHandler


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23 package com.sun.enterprise.web.connector.grizzly;
24
25 /**
26  * When asynchronous request processing is enabled, the
27  * <code>Task</code> must delegate the execution of the request
28  * processing to an implementation of this interface.
29  *
30  * @author Jeanfrancois Arcand
31  */

32 public interface AsyncHandler {
33     
34     /**
35      * Handle a <code>Task</code> execution.
36      */

37     public void handle(Task task);
38     
39     
40     /**
41      * Add the <code>Task</code> to the interrupted queue.
42      */

43     public void addToInterruptedQueue(Task task);
44     
45     
46     /**
47      * Remove the <code>Task</code> from the interrupted queue.
48      */

49     public void removeFromInterruptedQueue(Task task);
50     
51     
52     /**
53      * Set the <code>AsyncExecutor</code> used by this object.
54      */

55     public void setAsyncExecutorClassName(String JavaDoc asyncExecutorClassName);
56     
57     
58     /**
59      * Get the code>AsyncExecutor</code> used by this object.
60      */

61     public String JavaDoc getAsyncExecutorClassName();
62     
63     
64     /**
65      * Add a <code>AsyncFilter</code>
66      */

67     public void addAsyncFilter(AsyncFilter asyncFilter);
68     
69     
70     /**
71      * Remove an <code>AsyncFilter</code>
72      */

73     public boolean removeAsyncFilter(AsyncFilter asyncFilter);
74 }
75
Popular Tags