Package io.dapr.actors.client
Class ActorProxyBuilder<T>
java.lang.Object
io.dapr.actors.client.ActorProxyBuilder<T>
Builder to generate an ActorProxy instance. Builder can be reused for multiple instances.
-
Constructor Summary
ConstructorDescriptionActorProxyBuilder
(Class<T> actorTypeClass, ActorClient actorClient) Instantiates a new builder for a given Actor type, usingDefaultObjectSerializer
by default.ActorProxyBuilder
(String actorType, Class<T> actorTypeClass, ActorClient actorClient) Instantiates a new builder for a given Actor type, usingDefaultObjectSerializer
by default. -
Method Summary
Modifier and TypeMethodDescriptionInstantiates a new ActorProxy.withObjectSerializer
(DaprObjectSerializer objectSerializer) Instantiates a new builder for a given Actor type, usingDefaultObjectSerializer
.
-
Constructor Details
-
ActorProxyBuilder
Instantiates a new builder for a given Actor type, usingDefaultObjectSerializer
by default.DefaultObjectSerializer
is not recommended for production scenarios.- Parameters:
actorTypeClass
- Actor's type class.actorClient
- Dapr's sidecar client for Actor APIs.
-
ActorProxyBuilder
Instantiates a new builder for a given Actor type, usingDefaultObjectSerializer
by default.DefaultObjectSerializer
is not recommended for production scenarios.- Parameters:
actorType
- Actor's type.actorTypeClass
- Actor's type class.actorClient
- Dapr's sidecar client for Actor APIs.
-
-
Method Details
-
withObjectSerializer
Instantiates a new builder for a given Actor type, usingDefaultObjectSerializer
.- Parameters:
objectSerializer
- Serializer for objects sent/received.- Returns:
- This instance.
-
build
Instantiates a new ActorProxy.- Parameters:
actorId
- Actor's identifier.- Returns:
- New instance of ActorProxy.
-