Skip to content
Merged
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
1 change: 1 addition & 0 deletions .artifacts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ dubbo-metrics-registry
dubbo-metrics-config-center
dubbo-metrics-netty
dubbo-metrics-event
dubbo-mutiny
dubbo-native
dubbo-parent
dubbo-plugin
Expand Down
6 changes: 6 additions & 0 deletions dubbo-dependencies-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@
<prometheus_client.version>0.16.0</prometheus_client.version>
<reactive.version>1.0.4</reactive.version>
<reactor.version>3.7.6</reactor.version>
<mutiny.version>2.9.0</mutiny.version>
<rxjava.version>2.2.21</rxjava.version>
<okhttp_version>3.14.9</okhttp_version>

Expand Down Expand Up @@ -966,6 +967,11 @@
<artifactId>reactor-core</artifactId>
<version>${reactor.version}</version>
</dependency>
<dependency>
<groupId>io.smallrye.reactive</groupId>
<artifactId>mutiny</artifactId>
<version>${mutiny.version}</version>
</dependency>
<dependency>
<groupId>io.reactivex.rxjava2</groupId>
<artifactId>rxjava</artifactId>
Expand Down
23 changes: 23 additions & 0 deletions dubbo-distribution/dubbo-all-shaded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,7 @@
<include>org.apache.dubbo:dubbo-qos-api</include>
<include>org.apache.dubbo:dubbo-security</include>
<include>org.apache.dubbo:dubbo-reactive</include>
<include>org.apache.dubbo:dubbo-mutiny</include>
<include>org.apache.dubbo:dubbo-spring-security</include>
<include>org.apache.dubbo:dubbo-spring6-security</include>
<include>org.apache.dubbo:dubbo-registry-api</include>
Expand Down Expand Up @@ -1005,6 +1006,21 @@
</dependency>
</dependencies>
</profile>
<profile>
<id>reactive-mutiny</id>
<activation>
<jdk>[17,)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-mutiny</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
</dependencies>
</profile>
<profile>
<id>loom</id>
<activation>
Expand Down Expand Up @@ -1037,6 +1053,13 @@
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-mutiny</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
23 changes: 23 additions & 0 deletions dubbo-distribution/dubbo-all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,7 @@
<include>org.apache.dubbo:dubbo-qos-api</include>
<include>org.apache.dubbo:dubbo-security</include>
<include>org.apache.dubbo:dubbo-reactive</include>
<include>org.apache.dubbo:dubbo-mutiny</include>
<include>org.apache.dubbo:dubbo-spring-security</include>
<include>org.apache.dubbo:dubbo-spring6-security</include>
<include>org.apache.dubbo:dubbo-registry-api</include>
Expand Down Expand Up @@ -990,6 +991,21 @@
</dependency>
</dependencies>
</profile>
<profile>
<id>reactive-mutiny</id>
<activation>
<jdk>[17,)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-mutiny</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
</dependencies>
</profile>
<profile>
<id>loom</id>
<activation>
Expand Down Expand Up @@ -1022,6 +1038,13 @@
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-mutiny</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
5 changes: 5 additions & 0 deletions dubbo-distribution/dubbo-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,11 @@
<artifactId>dubbo-reactive</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-mutiny</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.apache.dubbo</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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
* limitations under the License.
*/
package org.apache.dubbo.gen.tri.mutiny;

import org.apache.dubbo.gen.AbstractGenerator;
import org.apache.dubbo.gen.DubboGeneratorPlugin;

public class MutinyDubbo3TripleGenerator extends AbstractGenerator {

public static void main(String[] args) {
DubboGeneratorPlugin.generate(new MutinyDubbo3TripleGenerator());
}

@Override
protected String getClassPrefix() {
return "Dubbo";
}

@Override
protected String getClassSuffix() {
return "Triple";
}

@Override
protected String getTemplateFileName() {
return "MutinyDubbo3TripleStub.mustache";
}

@Override
protected String getInterfaceTemplateFileName() {
return "MutinyDubbo3TripleInterfaceStub.mustache";
}

@Override
protected String getSingleTemplateFileName() {
throw new IllegalStateException("Do not support single template!");
}

@Override
protected boolean useMultipleTemplate(boolean multipleFiles) {
return true;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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
* limitations under the License.
*/

{{#packageName}}
package {{packageName}};
{{/packageName}}

import io.smallrye.mutiny.Multi;
import io.smallrye.mutiny.Uni;

public interface {{interfaceClassName}} extends org.apache.dubbo.rpc.model.DubboStub {

String JAVA_SERVICE_NAME = "{{packageName}}.{{serviceName}}";
{{#commonPackageName}}
String SERVICE_NAME = "{{commonPackageName}}.{{serviceName}}";
{{/commonPackageName}}
{{^commonPackageName}}
String SERVICE_NAME = "{{commonPackageName}}.{{serviceName}}";
{{/commonPackageName}}
{{#methods}}
{{#javaDoc}}
{{{javaDoc}}}
{{/javaDoc}}
{{#deprecated}}
@java.lang.Deprecated
{{/deprecated}}
{{#isManyOutput}}Multi{{/isManyOutput}}{{^isManyOutput}}Uni{{/isManyOutput}}<{{outputType}}> {{methodName}}({{#isManyInput}}Multi{{/isManyInput}}{{^isManyInput}}Uni{{/isManyInput}}<{{inputType}}> mutinyRequest) ;

{{/methods}}
}
Loading
Loading