A kiválasztott változat és az aktuális verzió közötti különbségek a következők.
Előző változat mindkét oldalon Előző változat Következő változat | Előző változat | ||
tanszek:oktatas:test [2023/05/14 16:36] knehez |
tanszek:oktatas:test [2023/05/14 16:42] (aktuális) knehez [Message queue] |
||
---|---|---|---|
Sor 1: | Sor 1: | ||
==== Prepaid Shop - Mobile Service Provider ==== | ==== Prepaid Shop - Mobile Service Provider ==== | ||
- | 1.) Create a simple HTML form where users are able to charge their mobile phones with a given amount of money. | + | Create a simple HTML form where users are able to charge their mobile phones with a given amount of money. |
Possible amounts: $10, $30, $50, $100 | Possible amounts: $10, $30, $50, $100 | ||
Sor 7: | Sor 7: | ||
Mobile phone number: 7 numbers. | Mobile phone number: 7 numbers. | ||
- | 2.) Create a servlet which gets the HTTP GET request from the HTML form and checks the validity of the messages. If the message is invalid, then returns an "Invalid data" text, else writes "Ok". | + | Create a servlet which gets the HTTP GET request from the HTML form and checks the validity of the messages. If the message is invalid, then returns an "Invalid data" text, else writes "Ok". |
* Create an inner class within servlet and store these payments in a java ArrayList. | * Create an inner class within servlet and store these payments in a java ArrayList. | ||
* Create an other method to list the number of payments (with a new HTTP get request). | * Create an other method to list the number of payments (with a new HTTP get request). | ||
+ | |||
+ | ==== Message queue ==== | ||
+ | |||
+ | Create an application consisting of three clients. The first client connects to the 'colorQueue' message queue using point-to-point connection and sends messages with randomly assigned parameters (RED, GREEN, and BLUE), every 2 seconds. Create a message processor that receive messages with the 'RED', 'GREEN', and 'BLUE' parameters exclusively. After receiving every 10 messages of the same color, the processor sends a message to the 'colorStatistics' queue indicating that they have processed 10 messages of a given color. | ||
+ | |||
+ | Create a third client that reads the statistics from the 'colorStatistics' queue and outputs to the console, for example, '10 'RED' messages have been processed'. | ||
+ | |||
+ | Create tests to validate the original functionality |