aspose file tools*
The moose likes OO, Patterns, UML and Refactoring and the fly likes controllers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "controllers" Watch "controllers" New topic
Author

controllers

nitin kumar
Ranch Hand

Joined: May 14, 2002
Posts: 105
hi

In my project I have a 3 tier architecture. One is the client,server and the firewall.
1)My task is to monitor data from the firewall that is every say 30 seconds
2)So the data from the firewall is dynamic
3)The actor clicks a button which then it should contact server which in turn contacts firewall to get data
4)now im actually modelling sequence diagrams
5)here my actor is administrator
6)boundary object is my gui client
7)business object or entity object is in the server
8)Now I im maintaing a thread in the server which collects data from the firewall
9)Im making a socket object and a log object to hold the transient data from firewall
10)client first makes a socket connection to server
11server makes a connection to firewall
12)Now the thread runs and collects data
13)Can i put the objects thread,socket and log in one class
14)the thread and socket shud close when actor clicks stop on the GUI

here is there a necessity of controller.
bye
nitin
nitin kumar
Ranch Hand

Joined: May 14, 2002
Posts: 105
hi
can anyone give me the solution for this
bye
nitin
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
I'd love to help, but I'm not sure what you are asking. You have give some of the steps and components in some sort of design, but I can't work out what you are asking about it.
Would it be possible for you to expand on what you are asking from us?


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
nitin kumar
Ranch Hand

Joined: May 14, 2002
Posts: 105
hi frank
I have defined the communication diagram.I would like to if we at all need a controller for this.
Im going for a sequence diagram
bye
nitin
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
I'm afraid I still don't understand. In particular I still don't understand what sort of answer you want.
I have defined the communication diagram
So are you just drawing pictures of this system at the moment, or are you involved in some other sort of design as well. Do you want help with drawing pictures, or are you happy with your pictures and want help with some other aspect of the design ?
I would like to if we at all need a controller for this.
Can you clarify which part of the design you are looking at when you consider a "controller"? For example, are you talking about some sort of low-level routing system (hardware or software) to connect the "server" and "firewall"? Or are you talking about some sort of architecture or pattern for building one or other of these systems ? Or something else entirely.
Perhaps it would help if you described the sort of answer you would like to receive from us.
nitin kumar
Ranch Hand

Joined: May 14, 2002
Posts: 105
yeah
Im actually talking at the server side .Do we need a controller to create a thread to get the data etc.And connection to firewall.Hope u get me
bye
nitin
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

Hi Nitin,
I will try to help here
13)Can i put the objects thread,socket and log in one class

Yes you can, but here's the question. You are using Sockets to connect, so can mutliple threads contact the Firewall each with their own sockets? or is there just one client contacting the Firewall to get the data and log it?
If the latter, then yes again to 13, except you would want your actual logger information running from the client. You would pass the Firewall object back to the client to interpret that data and log it.
You would need a controller for just the Buttons of the GUI, if you really wnat to spereate it out correctly. Know you really only have mabe just two buttons but the controller needs to work with the Sockets, so that is were the bulk of your code will be, and therefore better to have one.
I hope that is what you are looking for and asking.
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
nitin kumar
Ranch Hand

Joined: May 14, 2002
Posts: 105
hi mark
There is little modification.
Here there is one client, one server but many firewalls
2)the server has a thread to each firewall .In this thread the server reads data from a particular firewall
3)The server manages to get data from the firewall
4)now Im taking a class putting the thread socket .In server there are actually 2 threads one main thread to run ServerSocket as soon as it accepts connection from firewall dynamically a child thread is created which handles the communication between the management server and firewall
5)now a controller should be between boundary object and entity here what could be my boundary and what could be my entity objects
bye
nitin
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: controllers