protected SimpleJsonRpcRequestFactory createFactory() {
return GWT.create(SimpleJsonRpcRequestFactory.class);
}
private SimpleJsonRpcRequestFactory createFactory(final String[] expectedPayloadRegexes) {
SimpleJsonRpcRequestFactory req = createFactory();
req.initialize(new SimpleEventBus(), new RequestTransport() {
@Override
public void send(String payload, TransportReceiver receiver) {
stringMatchesRegexes(payload, expectedPayloadRegexes);
}
});