aspose file tools*
The moose likes OO, Patterns, UML and Refactoring and the fly likes Monitoring System + Command Pattern + UML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Monitoring System + Command Pattern + UML" Watch "Monitoring System + Command Pattern + UML" New topic
Author

Monitoring System + Command Pattern + UML

Jean Marcel Bacan
Greenhorn

Joined: Dec 04, 2012
Posts: 15
Hi guys, i'm starting with OO Design and I would like to add the command pattern to the UML design attached.

It's a very simple project to monitoring servers and data. I'm going to schedule three lists of commands (high, mid, low priority):
One command to execute query in different tables and databases.
One command to check many Webservices.
One command to check many URLS.
One command to check some data from external access.
Maybe Generic Command in the future to do another kind of verification.

I need to grow this databases sqls, urls, webservices dynamically without change the application. (Using database or properties).
If I need other kind of verification is acceptable that i do programmatically.
In the future some developer easy creates another command.
I'm trying to solve the old system problem: Many URLS or queries = Many Tasks = Thread concurrency problem.

Does Command pattern fits here?
Do I have to change some class?
My UML diagram looks correctly? (external developer needs to understand).

Thanks, any opinion will be nice. (good or not).



[Thumbnail for command.png]


OCPJP 6
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4462
    
    6

Yes, parallel processing is one of the problems that can be addressed with the Command Pattern.


Junilu - [How to Ask Questions] [How to Answer Questions]
Sunderam Goplalan
Ranch Hand

Joined: Oct 10, 2011
Posts: 75
The FileManager class is just to use to store the commands, correct? I believe the "execute" methods of the commands will read the File Manager, get the commands and execute the appropriate
action?

Is there a reason you are using a "LinkedHashSet"? Did you want to maintain the order in which commands are added?


SCJP 5.0 , SCEA Java EE 5, TOGAF Certified
Jean Marcel Bacan
Greenhorn

Joined: Dec 04, 2012
Posts: 15
Yes, just to store, some TimerTask class will read the list in FileManager over time.

Good point, the commands aren't related each other, so I don't need the know who came first.

Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Monitoring System + Command Pattern + UML