Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dist/contents/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Having said so, we assume that you have some knowledge about Java and especially
If you don't know anything about GWT, then we suggest you make yourself familiar with it
before reading any further:

GWT Introduction: http://code.google.com/webtoolkit/overview.html
GWT Introduction: http://code.google.com/webtoolkit/overview.html

[Contents of this distribution]

Expand All @@ -22,7 +22,7 @@ before reading any further:
|---quickstart (quickstart guide)
|-examples (demo apps)
|-libi (errai libs)


[Running the examples]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public void onClick(ClickEvent clickEvent) {
new RemoteCallback<Void>() {
public void callback(Void response) {
}
},
},
new ErrorCallback() {
public boolean error(Message message, Throwable throwable) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public interface TestService {
List<Date> getDates();

Date getDate();

public void exception() throws TestException;

}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class MessageBuilder {
public static MessageBuildSubject<MessageBuildSendableWithReply> createMessage() {
return new AbstractMessageBuilder(provider.get()).start();
}

/**
* Create a new message for the provided subject.
*
Expand Down Expand Up @@ -76,7 +76,7 @@ public static MessageBuildSubject<MessageReplySendable> createConversation(Messa
return new AbstractMessageBuilder<MessageReplySendable>(new ConversationMessageWrapper(message, newMessage)).start();
}
}

/**
* Create a conversational messages for the provided subject
*
Expand Down Expand Up @@ -108,7 +108,7 @@ public static MessageBuildCommand<MessageReplySendable> createConversation(Messa
public static AbstractRemoteCallBuilder createCall() {
return new AbstractRemoteCallBuilder(CommandMessage.create());
}

/**
* Creates an RPC call.
*
Expand All @@ -121,7 +121,7 @@ public static AbstractRemoteCallBuilder createCall() {
public static <R, T> T createCall(RemoteCallback<R> callback, Class<T> service) {
return new AbstractRemoteCallBuilder(CommandMessage.create()).call(callback, service);
}

/**
* Creates an RPC call with an ErrorCallback.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public <T, R> T call(final RemoteCallback<R> callback, final ErrorCallback error
else
return call(callback, errorCallback, remoteService);
}

((RPCStub) svc).setRemoteCallback(callback);
((RPCStub) svc).setErrorCallback(errorCallback);
return svc;
Expand All @@ -83,11 +83,11 @@ public RemoteCallEndpointDef call(final String serviceName) {
message.toSubject(serviceName + ":RPC");

final RemoteCallSendable sendable = new RemoteCallSendable() {

public void sendNowWith(final MessageBus bus) {
Integer id = null;
if (remoteCallback != null) {
final String replyTo = message.getSubject() + "." + message.getCommandType() +
final String replyTo = message.getSubject() + "." + message.getCommandType() +
":RespondTo:" + (id = uniqueNumber());

if (remoteCallback != null) {
Expand All @@ -103,11 +103,11 @@ public void callback(Message message) {
message.set(MessageParts.ReplyTo, replyTo);
}
}

if (message.getErrorCallback() != null) {
final String errorTo = message.getSubject() + "." + message.getCommandType() +
final String errorTo = message.getSubject() + "." + message.getCommandType() +
":Errors:" + ((id == null) ? uniqueNumber() : id);

bus.subscribe(errorTo,
new MessageCallback() {
@SuppressWarnings({"unchecked"})
Expand All @@ -119,7 +119,7 @@ public void callback(Message m) {
);
message.set(MessageParts.ErrorTo, errorTo);
}

message.sendNowWith(bus);
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public class ClientMessageBusImpl implements ClientMessageBus {
* IMPORTANT: only access this member via {@link #getNextRequestNumber()}.
*/
private int requestNumber = 0;

private boolean disconnected = false;

ProxySettings proxySettings;
Expand Down Expand Up @@ -173,7 +173,7 @@ private RequestBuilder getRecvBuilder() {
RequestBuilder.GET,
URL.encode(endpoint) + "?z=" + getNextRequestNumber()
);

builder.setHeader("Content-Type", "application/json");
builder.setHeader(ClientMessageBus.REMOTE_QUEUE_ID_HEADER, clientId);
return builder;
Expand Down Expand Up @@ -1343,7 +1343,7 @@ public void addError(String message, String additionalDetails, Throwable e) {
}
}
}

public int getNextRequestNumber() {
if (requestNumber == Integer.MAX_VALUE) {
requestNumber = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public static void handleMessageDeliveryFailure(MessageBus bus, Message message,
"\nexception: " + e +
"\ndisconnect: " + disconnect;
System.err.println(logMessage);

try {
if (message.getErrorCallback() != null) {
if (!message.getErrorCallback().error(message, e)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1872,16 +1872,16 @@ OpenAjax.hub.InlineHubClient.prototype.getParameters = function() {

Copyright 2006-2009 OpenAjax Alliance

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

Expand Down Expand Up @@ -3443,14 +3443,14 @@ smash._protocolID = "openajax-2.0";
//smash._initialClientURI = undefined; // For use by the smash provider loaded by a client. Should only be changed from the default value if the client does URI redirection at load time. Otherwise, we will assume that the current URI was also the initial URI

//--- security token stuff ---
//configurable pseudo random number generator (prng) to use for generating the security token.
//If not set, we use Math.random.
//configurable pseudo random number generator (prng) to use for generating the security token.
//If not set, we use Math.random.
//If set, the provided random number generator must support a function nextRandomB64Str(strlength:integer)
//that returns a string of length strlength, where each character is a "modified Base64 for URL" character.
//This includes A-Z, a-z, and 0-9 for the first 62 digits, like standard Base64 encoding, but
//no padding '='. And the '+', '/' characters of standard Base64 are replaced by '-', '_'.
smash._prng = undefined;
smash._securityTokenLength = 6; // configurable security token length. If default value is not used, both manager and clients have to change it to the same value.
smash._securityTokenLength = 6; // configurable security token length. If default value is not used, both manager and clients have to change it to the same value.
smash._securityTokenOverhead = null; // the number of characters in a serialized message consumed by the security tokens
smash._computeOtherTokenConstants = function() {
smash._securityTokenOverhead = 2 * smash._securityTokenLength;
Expand Down Expand Up @@ -4097,11 +4097,11 @@ smash.SECommMessage.CONNECT_ACK = "cac";
//DISCONNECT message
smash.SECommMessage.DISCONNECT = "xcon";
smash.SECommMessage.DISCONNECT_ACK = "xac";
//PUBLISH message: additionalHeader is {f:"S"} or {f:"J"} representing that the payload is a string or JSON,
//PUBLISH message: additionalHeader is {f:"S"} or {f:"J"} representing that the payload is a string or JSON,
//topic and payload are topic, payload of message
smash.SECommMessage.PUBLISH = "pub";
//DISTRIBUTE message: additionalHeader is {f: string, s:[string, ...]} where f is defined as in the PUBLISH message,
//and s representing subIds that should receive this message; topic and payload are as in PUBLISH message
//DISTRIBUTE message: additionalHeader is {f: string, s:[string, ...]} where f is defined as in the PUBLISH message,
//and s representing subIds that should receive this message; topic and payload are as in PUBLISH message
smash.SECommMessage.DISTRIBUTE = "dis";
//SUSCRIBE message: additionalHeader is {subId: string}, payload==null, topic is subscription topic
smash.SECommMessage.SUBSCRIBE = "sub";
Expand Down Expand Up @@ -4414,7 +4414,7 @@ smash.SEComm = function() {
}
}

//Static array which contains the list of the currently loaded instances. The array is indexed by the url of the child component.
//Static array which contains the list of the currently loaded instances. The array is indexed by the url of the child component.
smash.SEComm.instances = [];

//-----------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -5032,7 +5032,7 @@ smash.CommLib = function(child, controllers, clientName) {
//
//- a message authentication code (MAC): HMAC-SHA-1 (RFC2104/2202)
//BigEndianWord[5] <- smash.crypto.hmac_sha1(
// BigEndianWord[3-16] keyWA,
// BigEndianWord[3-16] keyWA,
// Ascii or Unicode string dataS,
// int chrsz (8 for Asci/16 for Unicode)
//
Expand All @@ -5043,7 +5043,7 @@ smash.CommLib = function(child, controllers, clientName) {
//addSeed(String seed)
//BigEndianWord[len] <- nextRandomOctets(int len)
//Base64-String[len] <- nextRandomB64Str(int len)
//Note: HMAC-SHA1 in counter-mode does not provide forward-security on corruption.
//Note: HMAC-SHA1 in counter-mode does not provide forward-security on corruption.
// However, the PRNG state is kept inside a closure. So if somebody can break the closure, he probably could
// break a whole lot more and forward-security of the prng is not the highest of concerns anymore :-)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
}
@code{
def box(cls) { org.mvel2.util.ParseTools.boxPrimitive(cls); }
Expand Down Expand Up @@ -41,7 +41,7 @@ def pretty(cls) {
public void setErrorCallback(org.jboss.errai.bus.client.api.ErrorCallback callback) {
this.errorCallback = callback;
}

@foreach{method : interfaceClass.getMethods()}
public @{method.getReturnType() == Void ? "void" : pretty(method.getReturnType())}
@{method.getName()}(@code{count = 0;}@foreach{type : method.getParameterTypes()}@{type.getCanonicalName()} _@{count++}@end{", "}) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class MessageQueueImpl implements MessageQueue {
* done in such large chunks.
*/
private static final int MAXIMUM_PAYLOAD_SIZE = 25;

// private static final long DEFAULT_TRANSMISSION_WINDOW = millis(25);
// private static final long MAX_TRANSMISSION_WINDOW = millis(100);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class PooledExecutorService implements TaskProvider {
* Enumeration of possible ways of handling a queue full scenario.
*/
public enum SaturationPolicy {

/**
* Runs the task in the calling thread.
*/
Expand All @@ -62,7 +62,7 @@ void dealWith(Runnable task) {
task.run();
}
},

/**
* Throws a RuntimeException when called. The exception message includes
* {@code task.toString()}, so name your runnables if you'd like nice messages
Expand Down Expand Up @@ -114,7 +114,7 @@ public void execute(final Runnable runnable) throws InterruptedException {
if (!queue.offer(new SingleFireTask(runnable))) {
saturationPolicy.dealWith(runnable);
}

// queue.add(new SingleFireTask(runnable));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ else if (first) {
if (i == 0) {
build.append(",").append(keyValue(encodeString(SerializationParts.INSTANTIATE_ONLY,ctx), "true"));
}

return build.append('}').toString();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2010 JBoss, a divison Red Hat, Inc.
* Copyright 2010 JBoss, a divison Red Hat, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public boolean canConvertFrom(Class aClass) {

public static Object instantiate(Map oMap, DecodingContext ctx) {
try {

Class clazz = Thread.currentThread().getContextClassLoader().loadClass((String) oMap.get(SerializationParts.ENCODED_TYPE));
String objId = (String) oMap.get(SerializationParts.OBJECT_ID);

Expand All @@ -78,10 +78,10 @@ else if (java.util.Date.class.isAssignableFrom(clazz)) {
else if (java.sql.Date.class.isAssignableFrom(clazz)) {
return new java.sql.Date(getNumeric(oMap.get("Value")));
}

Object newInstance = clazz.newInstance();
if (objId != null) ctx.putObject(objId, newInstance);

return newInstance;

}
Expand Down Expand Up @@ -127,7 +127,7 @@ else if (o instanceof Map) {
Map<?, ?> oMap = (Map) o;
if (oMap.containsKey(SerializationParts.ENCODED_TYPE)) {
Object newInstance = instantiate(oMap, ctx);

if (ctx.hasUnsatisfiedDependency(o)) {
ctx.swapDepReference(o, newInstance);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ protected void configure() {
Map<String, MessageCallback> epts = new HashMap<String, MessageCallback>();

final Object targetService = svc;

// we scan for endpoints
for (final Method method : loadClass.getDeclaredMethods()) {
if (method.isAnnotationPresent(Endpoint.class)) {
Expand Down Expand Up @@ -255,7 +255,7 @@ public <T> T getRemoteProxy(Class<T> proxyType) {
throw new RuntimeException("This API is not supported in the server-side environment.");
}
};

return svc;
}
}
Loading