AutoRPC GWT :: Processor

A source code generator for GWT RPC async interfaces and RxJava adapter types.

Лицензия

Лицензия

Категории

Категории

GWT (Google Web Toolkit) Взаимодействие с пользователем Веб-фреймворки Auto Библиотеки уровня приложения Code Generators
Группа

Группа

com.intendia.gwt.autorpc
Идентификатор

Идентификатор

autorpc-gwt-processor
Последняя версия

Последняя версия

0.3
Дата

Дата

Тип

Тип

jar
Описание

Описание

AutoRPC GWT :: Processor
A source code generator for GWT RPC async interfaces and RxJava adapter types.

Скачать autorpc-gwt-processor

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.intendia.gwt.autorpc/autorpc-gwt-processor/ -->
<dependency>
    <groupId>com.intendia.gwt.autorpc</groupId>
    <artifactId>autorpc-gwt-processor</artifactId>
    <version>0.3</version>
</dependency>
// https://jarcasting.com/artifacts/com.intendia.gwt.autorpc/autorpc-gwt-processor/
implementation 'com.intendia.gwt.autorpc:autorpc-gwt-processor:0.3'
// https://jarcasting.com/artifacts/com.intendia.gwt.autorpc/autorpc-gwt-processor/
implementation ("com.intendia.gwt.autorpc:autorpc-gwt-processor:0.3")
'com.intendia.gwt.autorpc:autorpc-gwt-processor:jar:0.3'
<dependency org="com.intendia.gwt.autorpc" name="autorpc-gwt-processor" rev="0.3">
  <artifact name="autorpc-gwt-processor" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.intendia.gwt.autorpc', module='autorpc-gwt-processor', version='0.3')
)
libraryDependencies += "com.intendia.gwt.autorpc" % "autorpc-gwt-processor" % "0.3"
[com.intendia.gwt.autorpc/autorpc-gwt-processor "0.3"]

Зависимости

test (5)

Идентификатор библиотеки Тип Версия
com.intendia.gwt.autorpc : autorpc-gwt-annotations jar 0.3
com.google.gwt : gwt-servlet jar 2.8.1-rx1
io.reactivex.rxjava2 : rxjava jar 2.1.2
junit : junit jar 4.12
com.google.testing.compile : compile-testing jar 0.10

Модули Проекта

Данный проект не имеет модулей.

AutoRPC GWT Generator

Maven Central Build Status

Annotation processor to generate GWT RPC async interfaces and RxJava adapter types. Add autorpc-gwt-processor to your classpath (not required at runtime) and your async interfaces will be automatically generated. Rx interfaces will be generated only if the RxJava library is in the classpath.

Example project here. To run the example project just execute mvn gwt:devmode from parent project.

Download

Releases are deployed to the Central Repository.

Snapshots of the development version are available in Sonatype's snapshots repository.

Notes

The processor generates async interfaces for all classes annotated with @RemoteServiceRelativePath. This should works correctly almost always, but if you do not use this annotation you can use @AutoRpcGwt annotation included in the autorpc-gwt-annotations project (in this case, you should add this project as a dependency). However, if what you want is to skip the generation of one of yours services, you can add the annotation @SkipRpcGwt. You can use whatever annotation that matches this name or just add a dependency to autorpc-gwt-annotations and use the provided one.

Async interfaces returns always Request. GWT RPC support void, Request and RequestBuilder as return types, but this libs has considered that there are no advantages of returning void instead of Request. And returning Request might be interesting in some situations like request cancellation (automatically done by the Rx adapter if the observable is unsubscribed). RequestBuilder might be used in some cases to add some header, this return type is not supported to simplify implementation, but you can (and, IMO should) manipulate the RequestBuilder using a custom RpcRequestBuilder and overriding doCreate or doFinish like in this example.

GreetingServiceAsync async = GWT.create(GreetingService.class);
((RemoteServiceProxy) async).setRpcRequestBuilder(new RpcRequestBuilder() {
    @Override protected void doFinish(RequestBuilder rb) {
        super.doFinish(rb);
        rb.setHeader("X-Custom-Header", "Hi!");
    }
});
com.intendia.gwt.autorpc

Intendia OSS

Intendia open source software

Версии библиотеки

Версия
0.3
0.2
0.1