Skip to content
This repository was archived by the owner on Mar 13, 2021. It is now read-only.

Commit 2624cda

Browse files
committed
Move java samples to the java invoker
and update for new inovker model
1 parent 7e18ecf commit 2624cda

File tree

18 files changed

+1349
-0
lines changed

18 files changed

+1349
-0
lines changed

samples/greeter/.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/*
2+
!.gitignore
3+
!src
4+
!mvnw*
5+
!pom.xml
6+
!README.*

samples/greeter/README.adoc

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
= greeter
2+
3+
[horizontal]
4+
*Invoker*:: java
5+
*Function*:: link:src/main/java/functions/Greeter.java[Greeter.java]
6+
*Input*:: names
7+
8+
=== prerequisites
9+
10+
1. riff is deployed
11+
2. the `riff` CLI is on your PATH
12+
3. the java invoker is installed
13+
14+
riff invokers apply -f https://github.com/projectriff/java-function-invoker/raw/master/java-invoker.yaml
15+
16+
4. the working directory is `samples/greeter`
17+
18+
=== compile the Java code and build the JAR
19+
20+
```
21+
./mvnw clean package
22+
```
23+
24+
=== create the function and its input topic
25+
26+
```
27+
riff create java --input names --handler functions.Greeter
28+
```
29+
30+
=== publish a message and wait for a reply
31+
32+
```
33+
riff publish --input names --data World --reply
34+
```
35+
36+
=== delete the function and its input topic
37+
38+
```
39+
riff delete --all
40+
```

samples/greeter/mvnw

Lines changed: 225 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)