Application Structure
Java code generation
gx makes it easy to get started writing the application by generating classes for you, based on the configuration file. We can do this by running the following command.
Currently, gx gen all
only supports pure Java projects. For others, files will have to be created manually.
Optional: If you have the tree
utility installed on your machine, you can then visualize the application structure.
Along with the action handler classes; a constants class, a client class, and the project build file have also been generated.
Client.java
contains an example for pushing an event to a topic. For WordCount, you will modify this file to read sentences from a text file and push them as events into the line_topic
. Constants.java
contains variables for actions, subscriptions tables, and topics.
In the next step, you will modify these generated files with the business logic for WordCount.
Last updated