Question: Problem: Write the necessary code to implement the functionality as described below. The GUI may be implemented either in swing or in JavaFX. You need
Problem: Write the necessary code to implement the functionality as described below. The GUI may be implemented either in swing or in JavaFX.
You need to write two classes: Publisher and Subscriber.
A Subscriber object allows you to subscribe on a single topic: the user enters a topic name and clicks Subscribe. Any events that match this subscription will be displayed in the pane below the Subscribe button.
A specific Publisher object permits the user to publish events related to any topic. The user can specify a topic in the Topic field and describe the event in the Event field and then click Process. The event will be displayed in the pane of all Subject objects that have subscribed to this topic.
Remember: A specific Subject object can subscribe to only one topic. After the topic is selected, the Subscribe button is disabled. A Publisher object may publish any number of events, and each event can be assigned to exactly one topic.
Any number of Publisher and Subscriber objects may be instantiated. They should all be served via the JGroups package. Use JGroups version 4.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
