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
6 changes: 3 additions & 3 deletions examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
<parent>
<groupId>io.dapr</groupId>
<artifactId>dapr-sdk-parent</artifactId>
<version>0.3.0-preview01</version>
<version>0.2.0-preview01</version>
</parent>

<artifactId>dapr-sdk-examples</artifactId>
<packaging>jar</packaging>
<version>0.3.0-preview01</version>
<version>0.2.0-preview01</version>
<name>dapr-sdk-examples</name>

<properties>
Expand Down Expand Up @@ -62,7 +62,7 @@
<dependency>
<groupId>io.dapr</groupId>
<artifactId>dapr-sdk</artifactId>
<version>0.3.0-preview01</version>
<version>0.2.0-preview01</version>
</dependency>
</dependencies>

Expand Down
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>io.dapr</groupId>
<artifactId>dapr-sdk-parent</artifactId>
<packaging>pom</packaging>
<version>0.3.0-preview01</version>
<version>0.2.0-preview01</version>
<name>dapr-sdk-parent</name>
<description>SDK for Dapr.</description>
<url>https://dapr.io</url>
Expand Down Expand Up @@ -77,6 +77,7 @@
</scm>

<modules>
<module>sdk-autogen</module>
<module>sdk</module>
<module>examples</module>
</modules>
Expand Down
113 changes: 113 additions & 0 deletions sdk-autogen/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.dapr</groupId>
<artifactId>dapr-sdk-parent</artifactId>
<version>0.2.0-preview01</version>
</parent>

<artifactId>dapr-sdk-autogen</artifactId>
<packaging>jar</packaging>
<version>0.2.0-preview01</version>
<name>dapr-sdk-autogen</name>
<description>Auto-generated SDK for Dapr</description>

<properties>
<protobuf.output.directory>${project.build.directory}/generated-sources</protobuf.output.directory>
<protobuf.input.directory>${project.parent.basedir}/proto</protobuf.input.directory>
</properties>

<dependencies>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty-shaded</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-protobuf</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-stub</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-testing</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java-util</artifactId>
<version>${protobuf.version}</version>
</dependency>
<dependency>
<groupId>com.github.os72</groupId>
<artifactId>protoc-jar-maven-plugin</artifactId>
<version>3.10.1</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>com.github.os72</groupId>
<artifactId>protoc-jar-maven-plugin</artifactId>
<version>3.10.1</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<protocVersion>${protobuf.version}</protocVersion>
<addProtoSources>inputs</addProtoSources>
<includeMavenTypes>direct</includeMavenTypes>
<includeStdTypes>true</includeStdTypes>
<inputDirectories>
<include>${protobuf.input.directory}/dapr</include>
<include>${protobuf.input.directory}/daprclient</include>
</inputDirectories>
<outputTargets>
<outputTarget>
<type>java</type>
<outputDirectory>${protobuf.output.directory}</outputDirectory>
</outputTarget>
<outputTarget>
<type>grpc-java</type>
<outputDirectory>${protobuf.output.directory}</outputDirectory>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}</pluginArtifact>
</outputTarget>
</outputTargets>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>

</plugins>
</build>
</project>
Empty file.
Empty file.
77 changes: 7 additions & 70 deletions sdk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@
<parent>
<groupId>io.dapr</groupId>
<artifactId>dapr-sdk-parent</artifactId>
<version>0.3.0-preview01</version>
<version>0.2.0-preview01</version>
</parent>

<artifactId>dapr-sdk</artifactId>
<packaging>jar</packaging>
<version>0.3.0-preview01</version>
<version>0.2.0-preview01</version>
<name>dapr-sdk</name>
<description>SDK for Dapr</description>

<properties>
<protobuf.output.directory>${project.build.directory}/generated-sources</protobuf.output.directory>
<protobuf.input.directory>${project.parent.basedir}/proto</protobuf.input.directory>
</properties>

<dependencies>
<dependency>
<groupId>io.dapr</groupId>
<artifactId>dapr-sdk-autogen</artifactId>
<version>0.2.0-preview01</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
Expand All @@ -37,34 +37,11 @@
<artifactId>okhttp</artifactId>
<version>4.2.1</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty-shaded</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-protobuf</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-stub</artifactId>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-testing</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java-util</artifactId>
<version>${protobuf.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand All @@ -75,50 +52,10 @@
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.os72</groupId>
<artifactId>protoc-jar-maven-plugin</artifactId>
<version>3.10.1</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>com.github.os72</groupId>
<artifactId>protoc-jar-maven-plugin</artifactId>
<version>3.10.1</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<protocVersion>${protobuf.version}</protocVersion>
<addProtoSources>inputs</addProtoSources>
<includeMavenTypes>direct</includeMavenTypes>
<includeStdTypes>true</includeStdTypes>
<inputDirectories>
<include>${protobuf.input.directory}/dapr</include>
<include>${protobuf.input.directory}/daprclient</include>
</inputDirectories>
<outputTargets>
<outputTarget>
<type>java</type>
<outputDirectory>${protobuf.output.directory}</outputDirectory>
</outputTarget>
<outputTarget>
<type>grpc-java</type>
<outputDirectory>${protobuf.output.directory}</outputDirectory>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}</pluginArtifact>
</outputTarget>
</outputTargets>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
Expand Down
10 changes: 5 additions & 5 deletions sdk/src/main/java/io/dapr/actors/AbstractDaprClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,20 +152,20 @@ protected static DaprError parseDaprError(String json) {
public interface DaprHttpCallback {

/**
* called when the server response was not 2xx or when an exception was
* Called when the server response was not 2xx or when an exception was
* thrown in the process
*
* @param response - in case of server error (4xx, 5xx) this contains the
* @param call - in case of server error (4xx, 5xx) this contains the
* server response in case of IO exception this is null
* @param throwable - contains the exception. in case of server error (4xx,
* @param e - contains the exception. in case of server error (4xx,
* 5xx) this is null
*/
public void onFailure(Call call, Exception e);

/**
* contains the server response
* Contains the server response
*
* @param response
* @param response Success response.
*/
public void onSuccess(String response);
}
Expand Down
4 changes: 3 additions & 1 deletion sdk/src/main/java/io/dapr/actors/runtime/ActorRuntime.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public Collection<String> getRegisteredActorTypes() {
* Registers an actor with the runtime.
*
* @param clazz The type of actor.
* @param <T> Actor class type.
*/
public <T extends AbstractActor> void RegisterActor(Class<T> clazz) {
RegisterActor(clazz, null);
Expand All @@ -88,14 +89,15 @@ public <T extends AbstractActor> void RegisterActor(Class<T> clazz) {
*
* @param clazz The type of actor.
* @param actorFactory An optional factory to create actors.
* @param <T> Actor class type.
* This can be used for dependency injection into actors.
*/
public <T extends AbstractActor> void RegisterActor(Class<T> clazz, ActorFactory actorFactory) {
ActorTypeInformation actorTypeInfo = ActorTypeInformation.create(clazz);

ActorFactory actualActorFactory = actorFactory != null ? actorFactory : new DefaultActorFactory<T>(actorTypeInfo);
// TODO: Refactor into a Builder class.
DaprStateAsyncProvider stateProvider = new DaprStateAsyncProvider(this.appToDaprAsyncClient, new ActorStateProviderSerializer());
DaprStateAsyncProvider stateProvider = new DaprStateAsyncProvider(this.appToDaprAsyncClient, new ActorStateSerializer());
ActorService actorService = new ActorServiceImpl(actorTypeInfo, stateProvider, actualActorFactory);

// Create ActorManagers, override existing entry if registered again.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

package io.dapr.actors.runtime;

import java.io.IOException;

/**
* Represents a state change for an actor.
* @param <T> Type of the value being changed.
Expand Down

This file was deleted.

Loading