Skip to content

Commit d41e735

Browse files
Add snip sync
1 parent bf1a405 commit d41e735

File tree

6 files changed

+15
-6
lines changed

6 files changed

+15
-6
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* express or implied. See the License for the specific language governing
1717
* permissions and limitations under the License.
1818
*/
19-
19+
// @@@SNIPSTART samples-java-nexus-caller-starter
2020
package io.temporal.samples.nexus.caller;
2121

2222
import io.temporal.client.WorkflowClient;
@@ -51,3 +51,4 @@ public static void main(String[] args) {
5151
WorkflowStub.fromTyped(helloWorkflow).getExecution().getRunId());
5252
}
5353
}
54+
// @@@SNIPEND

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* express or implied. See the License for the specific language governing
1717
* permissions and limitations under the License.
1818
*/
19-
19+
// @@@SNIPSTART samples-java-nexus-caller-worker
2020
package io.temporal.samples.nexus.caller;
2121

2222
import io.temporal.client.WorkflowClient;
@@ -49,3 +49,4 @@ public static void main(String[] args) {
4949
factory.start();
5050
}
5151
}
52+
// @@@SNIPEND

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* express or implied. See the License for the specific language governing
1717
* permissions and limitations under the License.
1818
*/
19-
19+
// @@@SNIPSTART samples-java-nexus-handler-worker
2020
package io.temporal.samples.nexus.handler;
2121

2222
import io.temporal.client.WorkflowClient;
@@ -39,3 +39,4 @@ public static void main(String[] args) {
3939
factory.start();
4040
}
4141
}
42+
// @@@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
@@ -26,6 +26,7 @@
2626
import io.temporal.nexus.WorkflowClientOperationHandlers;
2727
import io.temporal.samples.nexus.service.NexusService;
2828

29+
// @@@SNIPSTART samples-java-nexus-handler
2930
// To create a service implementation, annotate the class with @ServiceImpl and provide the
3031
// interface that the service implements. The service implementation class should have methods that
3132
// return OperationHandler that correspond to the operations defined in the service interface.
@@ -63,3 +64,4 @@ public OperationHandler<NexusService.HelloInput, NexusService.HelloOutput> hello
6364
::hello);
6465
}
6566
}
67+
// @@@SNIPEND

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* express or implied. See the License for the specific language governing
1717
* permissions and limitations under the License.
1818
*/
19-
19+
// @@@SNIPSTART samples-java-nexus-cli
2020
package io.temporal.samples.nexus.options;
2121

2222
import io.grpc.netty.shaded.io.netty.handler.ssl.SslContextBuilder;
@@ -25,11 +25,12 @@
2525
import io.temporal.client.WorkflowClientOptions;
2626
import io.temporal.serviceclient.WorkflowServiceStubs;
2727
import io.temporal.serviceclient.WorkflowServiceStubsOptions;
28+
import org.apache.commons.cli.*;
29+
30+
import javax.net.ssl.SSLException;
2831
import java.io.FileInputStream;
2932
import java.io.FileNotFoundException;
3033
import java.util.Arrays;
31-
import javax.net.ssl.SSLException;
32-
import org.apache.commons.cli.*;
3334

3435
public class ClientOptions {
3536
public static WorkflowClient getWorkflowClient(String[] args) {
@@ -123,3 +124,4 @@ public static WorkflowClient getWorkflowClient(String[] args) {
123124
service, WorkflowClientOptions.newBuilder().setNamespace(namespace).build());
124125
}
125126
}
127+
// @@@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
@@ -24,6 +24,7 @@
2424
import io.nexusrpc.Operation;
2525
import io.nexusrpc.Service;
2626

27+
// @@@SNIPSTART samples-java-nexus-service
2728
@Service
2829
public interface NexusService {
2930
enum Language {
@@ -104,3 +105,4 @@ public String getMessage() {
104105
@Operation
105106
EchoOutput echo(EchoInput input);
106107
}
108+
// @@@SNIPEND

0 commit comments

Comments
 (0)