KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > directwebremoting > extend > Calls


1 /*
2  * Copyright 2005 Joe Walker
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.directwebremoting.extend;
17
18 import java.util.ArrayList JavaDoc;
19 import java.util.List JavaDoc;
20
21 /**
22  * The request made by the browser which consists of a number of function call
23  * requests and some associated information like the request mode (XHR or
24  * iframe).
25  * @author Joe Walker [joe at getahead dot ltd dot uk]
26  */

27 public class Calls
28 {
29     /**
30      * How many calls are there is this request
31      * @return The total number of calls
32      */

33     public int getCallCount()
34     {
35         return calls.size();
36     }
37
38     /**
39      * @param index The index (starts at 0) of the call to fetch
40      * @return Returns the calls.
41      */

42     public Call getCall(int index)
43     {
44         return (Call) calls.get(index);
45     }
46
47     /**
48      * Add a call to the collection of calls we are about to make
49      * @param call The call to add
50      */

51     public void addCall(Call call)
52     {
53         calls.add(call);
54     }
55
56     /**
57      * @param batchId The batchId to set.
58      */

59     public void setBatchId(String JavaDoc batchId)
60     {
61         this.batchId = batchId;
62     }
63
64     /**
65      * @return Returns the batchId.
66      */

67     public String JavaDoc getBatchId()
68     {
69         return batchId;
70     }
71
72     private String JavaDoc batchId = null;
73
74     /**
75      * The collection of Calls that we should execute
76      */

77     protected List JavaDoc calls = new ArrayList JavaDoc();
78 }
79
Popular Tags