diff --git a/core/src/main/java/io/temporal/samples/nexus/caller/CallerStarter.java b/core/src/main/java/io/temporal/samples/nexus/caller/CallerStarter.java index 5c65df94..bf32f9f3 100644 --- a/core/src/main/java/io/temporal/samples/nexus/caller/CallerStarter.java +++ b/core/src/main/java/io/temporal/samples/nexus/caller/CallerStarter.java @@ -16,7 +16,7 @@ * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ - +// @@@SNIPSTART samples-java-nexus-caller-starter package io.temporal.samples.nexus.caller; import io.temporal.api.common.v1.WorkflowExecution; @@ -53,3 +53,4 @@ public static void main(String[] args) { logger.info("Workflow result: {}", helloWorkflow.hello("Nexus", NexusService.Language.ES)); } } +// @@@SNIPEND \ No newline at end of file diff --git a/core/src/main/java/io/temporal/samples/nexus/caller/CallerWorker.java b/core/src/main/java/io/temporal/samples/nexus/caller/CallerWorker.java index e7be0ae4..2d9ad92c 100644 --- a/core/src/main/java/io/temporal/samples/nexus/caller/CallerWorker.java +++ b/core/src/main/java/io/temporal/samples/nexus/caller/CallerWorker.java @@ -16,7 +16,7 @@ * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ - +// @@@SNIPSTART samples-java-nexus-caller-worker package io.temporal.samples.nexus.caller; import io.temporal.client.WorkflowClient; @@ -49,3 +49,4 @@ public static void main(String[] args) { factory.start(); } } +// @@@SNIPEND \ No newline at end of file diff --git a/core/src/main/java/io/temporal/samples/nexus/caller/EchoCallerWorkflowImpl.java b/core/src/main/java/io/temporal/samples/nexus/caller/EchoCallerWorkflowImpl.java index 7c5d5f78..942664e7 100644 --- a/core/src/main/java/io/temporal/samples/nexus/caller/EchoCallerWorkflowImpl.java +++ b/core/src/main/java/io/temporal/samples/nexus/caller/EchoCallerWorkflowImpl.java @@ -16,7 +16,7 @@ * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ - +// @@@SNIPSTART samples-java-nexus-caller-echo-workflow package io.temporal.samples.nexus.caller; import io.temporal.samples.nexus.service.NexusService; @@ -41,3 +41,4 @@ public String echo(String message) { return nexusService.echo(new NexusService.EchoInput(message)).getMessage(); } } +// @@@SNIPEND diff --git a/core/src/main/java/io/temporal/samples/nexus/caller/HelloCallerWorkflowImpl.java b/core/src/main/java/io/temporal/samples/nexus/caller/HelloCallerWorkflowImpl.java index 5b9048d6..bef930b4 100644 --- a/core/src/main/java/io/temporal/samples/nexus/caller/HelloCallerWorkflowImpl.java +++ b/core/src/main/java/io/temporal/samples/nexus/caller/HelloCallerWorkflowImpl.java @@ -16,7 +16,7 @@ * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ - +// @@@SNIPSTART samples-java-nexus-caller-hello-workflow package io.temporal.samples.nexus.caller; import io.temporal.samples.nexus.service.NexusService; @@ -48,3 +48,4 @@ public String hello(String message, NexusService.Language language) { return handle.getResult().get().getMessage(); } } +// @@@SNIPEND diff --git a/core/src/main/java/io/temporal/samples/nexus/handler/HandlerWorker.java b/core/src/main/java/io/temporal/samples/nexus/handler/HandlerWorker.java index 71a78f91..efe7b892 100644 --- a/core/src/main/java/io/temporal/samples/nexus/handler/HandlerWorker.java +++ b/core/src/main/java/io/temporal/samples/nexus/handler/HandlerWorker.java @@ -16,7 +16,7 @@ * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ - +// @@@SNIPSTART samples-java-nexus-handler-worker package io.temporal.samples.nexus.handler; import io.temporal.client.WorkflowClient; @@ -39,3 +39,4 @@ public static void main(String[] args) { factory.start(); } } +// @@@SNIPEND diff --git a/core/src/main/java/io/temporal/samples/nexus/handler/NexusServiceImpl.java b/core/src/main/java/io/temporal/samples/nexus/handler/NexusServiceImpl.java index d7fda2fd..bb4dd8df 100644 --- a/core/src/main/java/io/temporal/samples/nexus/handler/NexusServiceImpl.java +++ b/core/src/main/java/io/temporal/samples/nexus/handler/NexusServiceImpl.java @@ -27,6 +27,7 @@ import io.temporal.nexus.WorkflowRunOperation; import io.temporal.samples.nexus.service.NexusService; +// @@@SNIPSTART samples-java-nexus-handler // To create a service implementation, annotate the class with @ServiceImpl and provide the // interface that the service implements. The service implementation class should have methods that // return OperationHandler that correspond to the operations defined in the service interface. @@ -67,3 +68,4 @@ public OperationHandler hello ::hello); } } +// @@@SNIPEND diff --git a/core/src/main/java/io/temporal/samples/nexus/options/ClientOptions.java b/core/src/main/java/io/temporal/samples/nexus/options/ClientOptions.java index 7ba69930..fb998041 100644 --- a/core/src/main/java/io/temporal/samples/nexus/options/ClientOptions.java +++ b/core/src/main/java/io/temporal/samples/nexus/options/ClientOptions.java @@ -16,7 +16,7 @@ * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ - +// @@@SNIPSTART samples-java-nexus-cli package io.temporal.samples.nexus.options; import io.grpc.Metadata; @@ -28,10 +28,14 @@ import io.temporal.client.WorkflowClientOptions; import io.temporal.serviceclient.WorkflowServiceStubs; import io.temporal.serviceclient.WorkflowServiceStubsOptions; +import org.apache.commons.cli.*; + +import javax.net.ssl.SSLException; import java.io.FileInputStream; import java.io.FileNotFoundException; import javax.net.ssl.SSLException; import org.apache.commons.cli.*; +import java.util.Arrays; public class ClientOptions { public static WorkflowClient getWorkflowClient(String[] args) { @@ -153,3 +157,4 @@ public static WorkflowClient getWorkflowClient(String[] args) { service, WorkflowClientOptions.newBuilder().setNamespace(namespace).build()); } } +// @@@SNIPEND \ No newline at end of file diff --git a/core/src/main/java/io/temporal/samples/nexus/service/NexusService.java b/core/src/main/java/io/temporal/samples/nexus/service/NexusService.java index e12dcbe9..3ca90da0 100644 --- a/core/src/main/java/io/temporal/samples/nexus/service/NexusService.java +++ b/core/src/main/java/io/temporal/samples/nexus/service/NexusService.java @@ -24,6 +24,7 @@ import io.nexusrpc.Operation; import io.nexusrpc.Service; +// @@@SNIPSTART samples-java-nexus-service @Service public interface NexusService { enum Language { @@ -104,3 +105,4 @@ public String getMessage() { @Operation EchoOutput echo(EchoInput input); } +// @@@SNIPEND