Conversation
…g call, now we using asynch call and collect the results via callbacks. Mono's are created based on the result. This make more efficient use of the resources since nothing is blocking now. Reformatted according new checkstyle
artursouza
left a comment
There was a problem hiding this comment.
We first check SpringBoot code overall style(ad-hoc) and then refer to this one if we cannot make a call based on the SpringBoot code: https://azure.github.io/azure-sdk/java_design.html#service-client-builder
| * | ||
| * Provides the interface for implementation of proxy access for actor service. | ||
| */ | ||
| public interface IActorProxy { |
There was a problem hiding this comment.
We don't use the I* convention. Call ActorProxy and rename the implementation to ActorProxyImpl.
| * | ||
| * @author Swen Schisler <swen.schisler@fourtytwosoft.io> | ||
| */ | ||
| public class ActorProxy implements IActorProxy { |
There was a problem hiding this comment.
We should not expose implementation, please make it package accessible only.
| * implementing {@link #IActor} interfaces. The proxy object can be used used | ||
| * for client-to-actor and actor-to-actor communication. | ||
| * | ||
| * @author Swen Schisler <swen.schisler@fourtytwosoft.io> |
|
|
||
| import io.dapr.actors.ActorId; | ||
|
|
||
| public interface IActorProxyFactory { |
There was a problem hiding this comment.
Please, remove this interface. We will use the Builder pattern, similar to what we have in the http client.
There was a problem hiding this comment.
| * Defines the interface that must be implemented for providing factory for | ||
| * creating actor request body and response body objects. | ||
| */ | ||
| public interface IActorMessageBodyFactory { |
There was a problem hiding this comment.
We do not use the I* convention for interfaces. Just the name: https://azure.github.io/azure-sdk/java_design.html#naming-patterns
There was a problem hiding this comment.
No builder or factory for model classes: https://azure.github.io/azure-sdk/java_design.html#model-classes
| * has. | ||
| * | ||
| */ | ||
| public interface IActorResponseMessageBody { |
There was a problem hiding this comment.
There was a problem hiding this comment.
This interface is not needed for non remoting invocations.
| * Body for remoting requests . This contains all the parameters remoting method | ||
| * has. | ||
| */ | ||
| public interface IActorRequestMessageBody { |
There was a problem hiding this comment.
No need for interface in model classes: https://azure.github.io/azure-sdk/java_design.html#model-classes
There was a problem hiding this comment.
This interface is not needed for non remoting invocations.
| } | ||
|
|
||
| public IActorMessageBodyFactory getActorMessageBodyFactory() { | ||
| return ActorMessageBodyFactory; |
There was a problem hiding this comment.
This is not needed for non remoting invocations.
| return ActorMessageBodyFactory; | ||
| } | ||
|
|
||
| public void setActorMessageBodyFactory(IActorMessageBodyFactory ActorMessageBodyFactory) { |
There was a problem hiding this comment.
This is not needed for non remoting invocations
|
|
||
| /** | ||
| * Defines the interface that must be implemented for providing factory for | ||
| * creating actor request body and response body objects. |
There was a problem hiding this comment.
This is not needed for non remoting invocations
| */ | ||
| package io.dapr.actors.communication.client; | ||
|
|
||
| public class ActorRemotingClient { |
There was a problem hiding this comment.
This is not needed for non remoting invocations
Description
okhttp3 declares that Response objects needs closure to free resources, this wasn't done so far.
#48
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: