Skip to content

Commit b6724af

Browse files
committed
Updated to GWT 2.4.0.
1 parent c0b3e75 commit b6724af

File tree

7 files changed

+80
-21
lines changed

7 files changed

+80
-21
lines changed
Binary file not shown.

lib/compile/gwt-opencms-1.0.jar

-6.9 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.

lib/runtime/gwt-servlet.jar

418 KB
Binary file not shown.

src-components/gwt-opencms.jardesc

+18-18
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
<?xml version="1.0" encoding="WINDOWS-1252"?>
2-
<jardesc>
3-
<jar path="C:/dev/gwt-opencms-1.0.jar"/>
4-
<options buildIfNeeded="true" compress="true" descriptionLocation="/OpenCms v8/src-components/gwt-opencms.jardesc" exportErrors="false" exportWarnings="true" includeDirectoryEntries="false" overwrite="true" saveDescription="true" storeRefactorings="false" useSourceFolders="false"/>
5-
<storedRefactorings deprecationInfo="true" structuralOnly="false"/>
6-
<selectedProjects/>
7-
<manifest generateManifest="true" manifestLocation="" manifestVersion="1.0" reuseManifest="false" saveManifest="false" usesManifest="true">
8-
<sealing sealJar="false">
9-
<packagesToSeal/>
10-
<packagesToUnSeal/>
11-
</sealing>
12-
</manifest>
13-
<selectedElements exportClassFiles="true" exportJavaFiles="true" exportOutputFolder="false">
14-
<javaElement handleIdentifier="=OpenCms v8/src-components&lt;org.opencms.gwt.rebind.rpc"/>
15-
<javaElement handleIdentifier="=OpenCms v8/src-components&lt;com.google.gwt.user.client.rpc"/>
16-
<javaElement handleIdentifier="=OpenCms v8/src-components&lt;org.opencms.gwt.rebind"/>
17-
</selectedElements>
18-
</jardesc>
1+
<?xml version="1.0" encoding="WINDOWS-1252" standalone="no"?>
2+
<jardesc>
3+
<jar path="C:/dev/gwt-opencms-1.0.jar"/>
4+
<options buildIfNeeded="true" compress="true" descriptionLocation="/OpenCms/src-components/gwt-opencms.jardesc" exportErrors="false" exportWarnings="true" includeDirectoryEntries="false" overwrite="true" saveDescription="true" storeRefactorings="false" useSourceFolders="false"/>
5+
<storedRefactorings deprecationInfo="true" structuralOnly="false"/>
6+
<selectedProjects/>
7+
<manifest generateManifest="true" manifestLocation="" manifestVersion="1.0" reuseManifest="false" saveManifest="false" usesManifest="true">
8+
<sealing sealJar="false">
9+
<packagesToSeal/>
10+
<packagesToUnSeal/>
11+
</sealing>
12+
</manifest>
13+
<selectedElements exportClassFiles="true" exportJavaFiles="false" exportOutputFolder="false">
14+
<javaElement handleIdentifier="=OpenCms/src-components&lt;com.google.gwt.user.client.rpc"/>
15+
<javaElement handleIdentifier="=OpenCms/src-components&lt;org.opencms.gwt.rebind.rpc"/>
16+
<javaElement handleIdentifier="=OpenCms/src-components&lt;org.opencms.gwt.rebind"/>
17+
</selectedElements>
18+
</jardesc>

src-gwt/org/opencms/gwt/client/super_src/com/google/gwt/user/client/rpc/impl/RemoteServiceProxy.java

+62-3
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import com.google.gwt.user.client.rpc.SerializationStreamReader;
3232
import com.google.gwt.user.client.rpc.SerializationStreamWriter;
3333
import com.google.gwt.user.client.rpc.ServiceDefTarget;
34+
import com.google.gwt.user.client.rpc.impl.RpcStatsContext;
3435
import com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.ResponseReader;
3536

3637
/**
@@ -54,6 +55,63 @@ public abstract class RemoteServiceProxy implements SerializationStreamFactory,
5455
* The content type to be used in HTTP requests.
5556
*/
5657
private static final String RPC_CONTENT_TYPE = "text/x-gwt-rpc; charset=utf-8";
58+
59+
/**
60+
* A helper class that prepares the service to serialize data.
61+
*/
62+
public class ServiceHelper {
63+
64+
private final String fullServiceName;
65+
private final String methodName;
66+
private final RpcStatsContext statsContext;
67+
private SerializationStreamWriter streamWriter;
68+
69+
public ServiceHelper(String serviceName, String methodName) {
70+
this.fullServiceName = serviceName + "." + methodName;
71+
this.methodName = methodName;
72+
this.statsContext = new RpcStatsContext();
73+
}
74+
75+
/**
76+
* Finishes the serialization.
77+
*/
78+
public Request finish(AsyncCallback callback, ResponseReader responseHeader)
79+
throws SerializationException {
80+
String payload = streamWriter.toString();
81+
boolean toss = statsContext.isStatsAvailable()
82+
&& statsContext.stats(statsContext.timeStat(fullServiceName, "requestSerialized"));
83+
return doInvoke(responseHeader, fullServiceName, statsContext, payload, callback);
84+
}
85+
86+
/**
87+
* Finishes the serialization and return a RequestBuilder.
88+
*/
89+
public RequestBuilder finishForRequestBuilder(AsyncCallback callback,
90+
ResponseReader responseHeader) throws SerializationException {
91+
String payload = streamWriter.toString();
92+
boolean toss = statsContext.isStatsAvailable()
93+
&& statsContext.stats(statsContext.timeStat(fullServiceName, "requestSerialized"));
94+
return doPrepareRequestBuilder(
95+
responseHeader, fullServiceName, statsContext, payload, callback);
96+
}
97+
98+
/**
99+
* Starts the serialization.
100+
*/
101+
public SerializationStreamWriter start(String remoteServiceInterfaceName,
102+
int paramCount) throws SerializationException {
103+
boolean toss = statsContext.isStatsAvailable()
104+
&& statsContext.stats(statsContext.timeStat(fullServiceName, "begin"));
105+
streamWriter = createStreamWriter();
106+
if (getRpcToken() != null) {
107+
streamWriter.writeObject(getRpcToken());
108+
}
109+
streamWriter.writeString(remoteServiceInterfaceName);
110+
streamWriter.writeString(methodName);
111+
streamWriter.writeInt(paramCount);
112+
return streamWriter;
113+
}
114+
}
57115

58116
/**
59117
* @deprecated use {@link RpcStatsContext}.
@@ -323,9 +381,10 @@ protected <T> Request doInvoke(ResponseReader responseReader,
323381
try {
324382
return rb.send();
325383
} catch (RequestException ex) {
326-
InvocationException iex = new InvocationException(
327-
"Unable to initiate the asynchronous service invocation -- check the network connection",
328-
ex);
384+
InvocationException iex = new InvocationException(
385+
"Unable to initiate the asynchronous service invocation (" +
386+
methodName + ") -- check the network connection",
387+
ex);
329388
callback.onFailure(iex);
330389
} finally {
331390
if (statsContext.isStatsAvailable()) {

0 commit comments

Comments
 (0)