Package io.cloudstate.javasupport
Interface EffectContext
-
- All Superinterfaces:
Context
- All Known Subinterfaces:
CommandContext,CommandContext,StreamCancelledContext,StreamedCommandContext<Output>,SubscriptionContext
public interface EffectContext extends Context
A context that allows instructing the proxy to perform a side effect.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voideffect(ServiceCall effect)Invoke the referenced service call as an effect once this action is completed.voideffect(ServiceCall effect, boolean synchronous)Invoke the referenced service call as an effect once this action is completed.-
Methods inherited from interface io.cloudstate.javasupport.Context
serviceCallFactory
-
-
-
-
Method Detail
-
effect
default void effect(ServiceCall effect)
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.
ServiceCallinstances can be created using theServiceCallFactoryobtained from any (including this) contextsContext.serviceCallFactory()method.- Parameters:
effect- The service call to make as an effect effect.
-
effect
void effect(ServiceCall effect, boolean synchronous)
Invoke the referenced service call as an effect once this action is completed.ServiceCallinstances can be created using theServiceCallFactoryobtained from any (including this) contextsContext.serviceCallFactory()method.- Parameters:
effect- The service call to make as an effect effect.synchronous- Whether the effect should be performed synchronously (ie, wait till it has finished before sending a reply) or asynchronously.
-
-