FabricActorReference Class

  • java.lang.Object
    • microsoft.servicefabric.actors.ActorReference
      • microsoft.servicefabric.actors.FabricActorReference

public class FabricActorReference

Encapsulation of a reference to an actor for serialization.

Constructor Summary

Constructor Description
FabricActorReference()

Initializes a new instance of the ActorReference class.

Method Summary

Modifier and Type Method and Description
Object bind(Class<?> actorInterfaceType)

Creates an ActorProxy using FabricActorProxyFactory#createActorProxy(Class, URI, ActorId, String) method.

FabricActorReference get(Object actor)

Gets ActorReference for the actor.

A null value is returned if actor is passed as null.

ActorId getActorId()

Gets the ActorId of the actor.

String getListenerName()

Gets the name of the listener in the actor service to use when communicating with the actor service.

URI getServiceUri()

Gets the Uri of the actor service that hosts the actor in service fabric cluster.

void setActorId(ActorId actorId)

Sets the ActorId of the actor.

void setListenerName(String listenerName)

Sets the name of the listener in the actor service to use when communicating with the actor service.

void setServiceUri(URI serviceUri)

Sets the Uri of the actor service that hosts the actor in service fabric cluster.

Constructor Details

FabricActorReference

public FabricActorReference()

Initializes a new instance of the ActorReference class.

Method Details

bind

public Object bind(Class actorInterfaceType)

Creates an ActorProxy using FabricActorProxyFactory#createActorProxy(Class, URI, ActorId, String) method.

Parameters:

actorInterfaceType - Interface type of actor.

Returns:

Object representing ActorProxy for the actor.

get

public static FabricActorReference get(Object actor)

Gets ActorReference for the actor.

A null value is returned if actor is passed as null.

Parameters:

actor - Actor object to get ActorReference for.

Returns:

ActorReference object for the actor.

getActorId

public ActorId getActorId()

Gets the ActorId of the actor.

Returns:

ActorId of the actor.

getListenerName

public String getListenerName()

Gets the name of the listener in the actor service to use when communicating with the actor service.

Returns:

The name of the listener.

getServiceUri

public URI getServiceUri()

Gets the Uri of the actor service that hosts the actor in service fabric cluster.

Returns:

Service Uri which hosts the actor in service fabric cluster.

setActorId

public void setActorId(ActorId actorId)

Sets the ActorId of the actor.

Parameters:

actorId - ActorId od the actor

setListenerName

public void setListenerName(String listenerName)

Sets the name of the listener in the actor service to use when communicating with the actor service.

Parameters:

listenerName - The name of the listener

setServiceUri

public void setServiceUri(URI serviceUri)

Sets the Uri of the actor service that hosts the actor in service fabric cluster.

Parameters:

serviceUri - Uri of the actor service that hosts the actor in service fabric cluster.

Applies to