Package io.dapr.actors.client

# Class ActorProxyBuilder<T>

java.lang.Object
io.dapr.actors.client.ActorProxyBuilder<T>

    public class ActorProxyBuilder<T>
    extends java.lang.Object

Builder to generate an ActorProxy instance. Builder can be reused for multiple instances.

- ## Constructor Summary

  Constructors
  Constructor | Description
  --- | ---
  `ActorProxyBuilder​(java.lang.Class<T> actorTypeClass)` | Instantiates a new builder for a given Actor type, using `DefaultObjectSerializer` by default.
  `ActorProxyBuilder​(java.lang.String actorType, java.lang.Class<T> actorTypeClass)` | Instantiates a new builder for a given Actor type, using `DefaultObjectSerializer` by default.

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `T` | `build​(ActorId actorId)` | Instantiates a new ActorProxy.
  `ActorProxyBuilder` | `withObjectSerializer​(DaprObjectSerializer objectSerializer)` | Instantiates a new builder for a given Actor type, using `DefaultObjectSerializer`.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ActorProxyBuilder

    public ActorProxyBuilder​(java.lang.Class<T> actorTypeClass)
    Instantiates a new builder for a given Actor type, using `DefaultObjectSerializer` by default. `DefaultObjectSerializer` is not recommended for production scenarios.
    Parameters:
      `actorTypeClass` - Actor's type class.

  - ### ActorProxyBuilder

    public ActorProxyBuilder​(java.lang.String actorType, java.lang.Class<T> actorTypeClass)
    Instantiates a new builder for a given Actor type, using `DefaultObjectSerializer` by default. `DefaultObjectSerializer` is not recommended for production scenarios.
    Parameters:
      `actorType` - Actor's type.
      `actorTypeClass` - Actor's type class.

- ## Method Details

  - ### withObjectSerializer

    public ActorProxyBuilder withObjectSerializer​(DaprObjectSerializer objectSerializer)
    Instantiates a new builder for a given Actor type, using `DefaultObjectSerializer`.
    Parameters:
      `objectSerializer` - Serializer for objects sent/received.
    Returns:
      This instance.

  - ### build

    public T build​(ActorId actorId)
    Instantiates a new ActorProxy.
    Parameters:
      `actorId` - Actor's identifier.
    Returns:
      New instance of ActorProxy.