|
CS4B Spring 2007 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread FruitThreadServer
public class FruitThreadServer
Create a ServerSocket wait for someone to connect on port 56789 start up a client thread in threadGroup FruitClients and wait for request. System parse first word of request to determine what to call, any request may be sent, but here is a list of supported first word requests...
Select
,
SelectController
,
InventoryController
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Method Summary | |
---|---|
static void |
main(java.lang.String[] args)
Load database driver, create connection, create ServerSocket wait for client, when client connects start up thread using FruitThreadServer constructor |
void |
run()
Just connect to the IP/Port and then send requests Constructor creates socket and SQL statement, thread run creates server I/O for socket, and then waits for Client request |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public static void main(java.lang.String[] args)
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
|
CS4B Spring 2007 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |