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

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

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

/**
 * Context that provides client actions, which include failing and forwarding.
 *
 * 

These contexts are typically made available in response to commands. */ public interface ClientActionContext extends Context { /** * Fail the command with the given message. * * @param errorMessage The error message to send to the client. */ RuntimeException fail(String errorMessage); /** * Instruct the proxy to forward handling of this command to another entity served by this * stateful function. * *

The command will be forwarded after successful completion of handling this command, * including any persistence that this command does. * *

{@link ServiceCall} instances can be created using the {@link ServiceCallFactory} obtained * from any (including this) contexts {@link Context#serviceCallFactory()} method. * * @param to The service call to forward command processing to. */ void forward(ServiceCall to); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy