A Behavior in GreenLighting is an actor in the actor model. It has a clearly defined and limited responsibility in the bigger scope of a project and can listen and respond to messages. Unlike traditional models, behaviors communicate through these messages with each other.
For our tutorial, we need two behaviors that can listen to HTTP Requests and respond with HTTP content. Let's focus on our GET request first.
Hello Behavior
Create a new package inside your project named behaviors . Add a new class named HelloBehavior to the package. Use the code below to get started: