|
CS4B Spring 2007 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectInventoryController
public class InventoryController
The controller portion of the MVC
the controller listens for input and drives the model and viewer
Used to add data to inventory and also to monitor the current inventory.
current system has three select query buttons that send three different queries to Server
system also has buttons for getting thread information, resetting databases and quitting.
System enhances SelectController by adding the ability to update the database quantity, however updating is
processed in the InventoryViewer. All buttons that implement ActionPerformed in here, but have getActionCommand
set to an appropriate FruitThreadServer command.
SelectController
,
InventoryViewer
Constructor Summary | |
---|---|
InventoryController(InventoryViewer v,
java.lang.String url)
Creates a socket connection to the intended Server url is the IP/URL address of the serverSocket |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
send all getActionCommand strings to the model-server |
java.lang.String |
query(java.lang.String str)
Send query to FruitServer Query can be a data manipulation or select query it can actuall be any command of FruitThreadServer |
java.util.Vector |
queryVector(java.lang.String str)
Send query to FruitServer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InventoryController(InventoryViewer v, java.lang.String url)
v
- viewMethod Detail |
---|
public java.util.Vector queryVector(java.lang.String str)
Vector
public java.lang.String query(java.lang.String str)
str
- query string to send to server
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
|
CS4B Spring 2007 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |