KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > directwebremoting > dwrp > ProtocolConstants


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.dwrp;
17
18 /**
19  * Various constants for type conversion
20  * @author Joe Walker [joe at getahead dot ltd dot uk]
21  * @noinspection InterfaceNeverImplemented
22  */

23 public interface ProtocolConstants
24 {
25     /**
26      * The name for reference types from javascript
27      */

28     public static final String JavaDoc TYPE_REFERENCE = "reference";
29
30     /**
31      * The name for string types from javascript
32      */

33     public static final String JavaDoc TYPE_STRING = "string";
34
35     /**
36      * How many calls are there in this request?
37      */

38     public static final String JavaDoc INBOUND_CALL_COUNT = "callCount";
39
40     /**
41      * The prefix to the call number on inbound calls
42      */

43     public static final String JavaDoc INBOUND_CALLNUM_PREFIX = "c";
44
45     /**
46      * The suffix to the call number on inbound calls
47      */

48     public static final String JavaDoc INBOUND_CALLNUM_SUFFIX = "-";
49
50     /**
51      * Used to define the id of this call
52      */

53     public static final String JavaDoc INBOUND_KEY_ID = "id";
54
55     /**
56      * The parameter that specifies the http session identifier
57      */

58     public static final String JavaDoc INBOUND_KEY_HTTP_SESSIONID = "httpSessionId";
59
60     /**
61      * The parameter that specifies the batch identifier
62      */

63     public static final String JavaDoc INBOUND_KEY_BATCHID = "batchId";
64
65     /**
66      * The parameter that specifies the script session identifier
67      */

68     public static final String JavaDoc INBOUND_KEY_SCRIPT_SESSIONID = "scriptSessionId";
69
70     /**
71      * The parameter that specifies the current page
72      */

73     public static final String JavaDoc INBOUND_KEY_PAGE = "page";
74
75     /**
76      * The inbound key to define the class to be used.
77      * This will be the javascript version of the full java package name.
78      */

79     public static final String JavaDoc INBOUND_KEY_SCRIPTNAME = "scriptName";
80
81     /**
82      * The inbound key to define the method to be called
83      */

84     public static final String JavaDoc INBOUND_KEY_METHODNAME = "methodName";
85
86     /**
87      * What prefix do we put to the input paramters
88      */

89     public static final String JavaDoc INBOUND_KEY_PARAM = "param";
90
91     /**
92      * What prefix do we put to the environment paramters
93      */

94     public static final String JavaDoc INBOUND_KEY_ENV = "e";
95
96     /**
97      * What prefix do we put to the meta-data paramters
98      */

99     public static final String JavaDoc INBOUND_KEY_METADATA = "p-";
100
101     /**
102      * The inbound key to declare if the XHR.responseText is readable when half filled
103      */

104     public static final String JavaDoc INBOUND_KEY_PARTIAL_RESPONSE = "partialResponse";
105
106     /**
107      * The character to use to distinguish between the variable name and the
108      * variable value
109      */

110     public static final String JavaDoc INBOUND_DECL_SEPARATOR = "=";
111
112     /**
113      * The character that we use to separate types for values in inbound
114      * variables
115      */

116     public static final String JavaDoc INBOUND_TYPE_SEPARATOR = ":";
117
118     /**
119      * How are javascript arrays begun
120      */

121     public static final String JavaDoc INBOUND_ARRAY_END = "]";
122
123     /**
124      * How are javascript arrays ended
125      */

126     public static final String JavaDoc INBOUND_ARRAY_START = "[";
127
128     /**
129      * How are javascript array elements separated
130      */

131     public static final String JavaDoc INBOUND_ARRAY_SEPARATOR = ",";
132
133     /**
134      * How javascript associative arrays (maps) are started
135      */

136     public static final String JavaDoc INBOUND_MAP_START = "{";
137
138     /**
139      * How javascript associative arrays (maps) are ended
140      */

141     public static final String JavaDoc INBOUND_MAP_END = "}";
142
143     /**
144      * How javascript map entries are split from each other
145      */

146     public static final String JavaDoc INBOUND_MAP_SEPARATOR = ",";
147
148     /**
149      * How javascript map entries are split into name/value pairs
150      */

151     public static final String JavaDoc INBOUND_MAP_ENTRY = ":";
152
153     /**
154      * null is sometimes needed in a javascript map
155      */

156     public static final String JavaDoc INBOUND_NULL = "null";
157
158     /**
159      * The marker to indicate that the output is from data inserted into the call
160      */

161     public static final String JavaDoc SCRIPT_CALL_INSERT = "//#DWR-INSERT";
162
163     /**
164      * The marker to indicate that the output is a reply to the call
165      */

166     public static final String JavaDoc SCRIPT_CALL_REPLY = "//#DWR-REPLY";
167
168     /**
169      * The marker to indicate the start of a evalable script block
170      */

171     public static final String JavaDoc SCRIPT_START_MARKER = "//#DWR-START#";
172
173     /**
174      * The marker to indicate the end of a evalable script block
175      */

176     public static final String JavaDoc SCRIPT_END_MARKER = "//#DWR-END#";
177 }
178
Popular Tags