3.2.2. Responsibility Assignment of the Application

This section describes the classes to be implemented and their responsibilities when creating HTTP messaging.

Classes and their responsibilities

../../../../_images/http_messaging_design.png
Action class

The action class executes the business logic based on the request message (RequestMessage), and creates and returns the response message (ResponseMessage).

For example, the following process is performed as business logic in the case of a request message capture process.

  • Creates a form class from the request message and performs validation.
  • Creates an entity class from the form class and adds data to the database.
  • Creates and returns a response message.
Form class

Class to map request messages (RequestMessage).

Has the annotation configuration for validation and logic for correlation validation.

All the form class properties must be defined by a String .
See Bean Validation for the reason why the property must be a String . However, in the case of a binary item, it is defined by a byte array.
Entity class
A class with a one-to-one correspondence with a table. Has the property corresponding to columns.