ActorProxyEventUtility Class

  • java.lang.Object
    • microsoft.servicefabric.actors.client.ActorProxyEventUtility

public class ActorProxyEventUtility

Contains extension methods related to actor events.

Method Summary

Modifier and Type Method and Description
static<TEvent extends ActorEvents> CompletableFuture<?> subscribeAsync(ActorEventPublisher actorProxy, TEvent subscriber)

Subscribe to a published actor event.

When actorProxy is not of type ActorProxy

When TEvent doesn't implement ActorEvents

static<TEvent extends ActorEvents> CompletableFuture<?> subscribeAsync(ActorEventPublisher actorProxy, TEvent subscriber, Duration resubscriptionInterval)

Subscribe to a published actor event.

When actorProxy is not of type ActorProxy

When TEvent doesn't implement ActorEvents

static<TEvent extends ActorEvents> CompletableFuture<?> unsubscribeAsync(ActorEventPublisher actorProxy, TEvent subscriber)

Unsubscribe from a published actor event.

When actorProxy is not of type ActorProxy

When TEvent doesn't implement ActorEvents

Method Details

subscribeAsync

public static static CompletableFuture subscribeAsync(ActorEventPublisher actorProxy, TEvent subscriber)

Subscribe to a published actor event.

When actorProxy is not of type ActorProxy

When TEvent doesn't implement ActorEvents

Parameters:

actorProxy - The actor that publishes the event.
subscriber - The subscriber that receives the event.

Returns:

A task that represents the asynchronous operation of subscribing to a published actor event..

Throws:

java.lang.IllegalArgumentException

subscribeAsync

public static static CompletableFuture subscribeAsync(ActorEventPublisher actorProxy, TEvent subscriber, Duration resubscriptionInterval)

Subscribe to a published actor event.

When actorProxy is not of type ActorProxy

When TEvent doesn't implement ActorEvents

Parameters:

actorProxy - The actor that publishes the event.
subscriber - The subscriber that receives the event.
resubscriptionInterval - The time between re-subscription attempts.

Returns:

A task that represents the asynchronous operation of subscribing to a published actor event..

Throws:

java.lang.IllegalArgumentException

unsubscribeAsync

public static static CompletableFuture unsubscribeAsync(ActorEventPublisher actorProxy, TEvent subscriber)

Unsubscribe from a published actor event.

When actorProxy is not of type ActorProxy

When TEvent doesn't implement ActorEvents

Parameters:

actorProxy - The actor that publishes the event.
subscriber - The subscriber that receives the event.

Returns:

A task that represents the asynchronous operation of un-subscribing from a published actor event.

Throws:

java.lang.IllegalArgumentException

Applies to