All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.cloudstate.javasupport.EffectContext Maven / Gradle / Ivy

There is a newer version: 0.6.0
Show newest version
package io.cloudstate.javasupport;

/** A context that allows instructing the proxy to perform a side effect. */
public interface EffectContext extends Context {

  /**
   * Invoke the referenced service call as an effect once this action is completed.
   *
   * 

The effect will be performed asynchronously, ie, the proxy won't wait for the effect to * finish before sending the reply. * *

{@link ServiceCall} instances can be created using the {@link ServiceCallFactory} obtained * from any (including this) contexts {@link Context#serviceCallFactory()} method. * * @param effect The service call to make as an effect effect. */ default void effect(ServiceCall effect) { this.effect(effect, false); } /** * Invoke the referenced service call as an effect once this action is completed. * *

{@link ServiceCall} instances can be created using the {@link ServiceCallFactory} obtained * from any (including this) contexts {@link Context#serviceCallFactory()} method. * * @param effect The service call to make as an effect effect. * @param synchronous Whether the effect should be performed synchronously (ie, wait till it has * finished before sending a reply) or asynchronously. */ void effect(ServiceCall effect, boolean synchronous); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy