Skip to content

Commit

Permalink
Add snip sync
Browse files Browse the repository at this point in the history
  • Loading branch information
Quinn-With-Two-Ns committed Oct 16, 2024
1 parent bf1a405 commit d41e735
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.client.WorkflowClient;
Expand Down Expand Up @@ -51,3 +51,4 @@ public static void main(String[] args) {
WorkflowStub.fromTyped(helloWorkflow).getExecution().getRunId());
}
}
// @@@SNIPEND
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -49,3 +49,4 @@ public static void main(String[] args) {
factory.start();
}
}
// @@@SNIPEND
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -39,3 +39,4 @@ public static void main(String[] args) {
factory.start();
}
}
// @@@SNIPEND
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import io.temporal.nexus.WorkflowClientOperationHandlers;
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.
Expand Down Expand Up @@ -63,3 +64,4 @@ public OperationHandler<NexusService.HelloInput, NexusService.HelloOutput> hello
::hello);
}
}
// @@@SNIPEND
Original file line number Diff line number Diff line change
Expand Up @@ -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.netty.shaded.io.netty.handler.ssl.SslContextBuilder;
Expand All @@ -25,11 +25,12 @@
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 java.util.Arrays;
import javax.net.ssl.SSLException;
import org.apache.commons.cli.*;

public class ClientOptions {
public static WorkflowClient getWorkflowClient(String[] args) {
Expand Down Expand Up @@ -123,3 +124,4 @@ public static WorkflowClient getWorkflowClient(String[] args) {
service, WorkflowClientOptions.newBuilder().setNamespace(namespace).build());
}
}
// @@@SNIPEND
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import io.nexusrpc.Operation;
import io.nexusrpc.Service;

// @@@SNIPSTART samples-java-nexus-service
@Service
public interface NexusService {
enum Language {
Expand Down Expand Up @@ -104,3 +105,4 @@ public String getMessage() {
@Operation
EchoOutput echo(EchoInput input);
}
// @@@SNIPEND

0 comments on commit d41e735

Please sign in to comment.