Skip to content

Commit 1f67378

Browse files
Add snip sync
1 parent daaf8c4 commit 1f67378

File tree

6 files changed

+16
-0
lines changed

6 files changed

+16
-0
lines changed

core/src/main/java/io/temporal/samples/nexus/caller/CallerStarter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// @@@SNIPSTART samples-java-nexus-caller-starter
12
package io.temporal.samples.nexus.caller;
23

34
import io.temporal.api.common.v1.WorkflowExecution;
@@ -34,3 +35,4 @@ public static void main(String[] args) {
3435
logger.info("Workflow result: {}", helloWorkflow.hello("Nexus", NexusService.Language.ES));
3536
}
3637
}
38+
// @@@SNIPEND

core/src/main/java/io/temporal/samples/nexus/caller/CallerWorker.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// @@@SNIPSTART samples-java-nexus-caller-worker
12
package io.temporal.samples.nexus.caller;
23

34
import io.temporal.client.WorkflowClient;
@@ -30,3 +31,4 @@ public static void main(String[] args) {
3031
factory.start();
3132
}
3233
}
34+
// @@@SNIPEND

core/src/main/java/io/temporal/samples/nexus/handler/HandlerWorker.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// @@@SNIPSTART samples-java-nexus-handler-worker
12
package io.temporal.samples.nexus.handler;
23

34
import io.temporal.client.WorkflowClient;
@@ -20,3 +21,4 @@ public static void main(String[] args) {
2021
factory.start();
2122
}
2223
}
24+
// @@@SNIPEND

core/src/main/java/io/temporal/samples/nexus/handler/NexusServiceImpl.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import io.temporal.nexus.WorkflowRunOperation;
99
import io.temporal.samples.nexus.service.NexusService;
1010

11+
// @@@SNIPSTART samples-java-nexus-handler
1112
// To create a service implementation, annotate the class with @ServiceImpl and provide the
1213
// interface that the service implements. The service implementation class should have methods that
1314
// return OperationHandler that correspond to the operations defined in the service interface.
@@ -51,3 +52,4 @@ public OperationHandler<NexusService.HelloInput, NexusService.HelloOutput> hello
5152
::hello);
5253
}
5354
}
55+
// @@@SNIPEND

core/src/main/java/io/temporal/samples/nexus/options/ClientOptions.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// @@@SNIPSTART samples-java-nexus-cli
12
package io.temporal.samples.nexus.options;
23

34
import io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts;
@@ -7,10 +8,14 @@
78
import io.temporal.client.WorkflowClientOptions;
89
import io.temporal.serviceclient.WorkflowServiceStubs;
910
import io.temporal.serviceclient.WorkflowServiceStubsOptions;
11+
import org.apache.commons.cli.*;
12+
13+
import javax.net.ssl.SSLException;
1014
import java.io.FileInputStream;
1115
import java.io.FileNotFoundException;
1216
import javax.net.ssl.SSLException;
1317
import org.apache.commons.cli.*;
18+
import java.util.Arrays;
1419

1520
public class ClientOptions {
1621

@@ -129,3 +134,4 @@ public static WorkflowClient getWorkflowClient(
129134
return WorkflowClient.newInstance(service, clientOptions.setNamespace(namespace).build());
130135
}
131136
}
137+
// @@@SNIPEND

core/src/main/java/io/temporal/samples/nexus/service/NexusService.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import io.nexusrpc.Operation;
66
import io.nexusrpc.Service;
77

8+
// @@@SNIPSTART samples-java-nexus-service
89
@Service
910
public interface NexusService {
1011
enum Language {
@@ -85,3 +86,4 @@ public String getMessage() {
8586
@Operation
8687
EchoOutput echo(EchoInput input);
8788
}
89+
// @@@SNIPEND

0 commit comments

Comments
 (0)