|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.lang.Thread
|
+--com.dalsemi.shell.server.Server
|
+--com.dalsemi.shell.server.serial.SerialServer
A server that uses a serial port to listen for user connections. For each connection made, a Serial session is created. All command processing is handled by the session, not this server.
| Fields inherited from class com.dalsemi.shell.server.Server |
sessions, shutdown |
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
SerialServer(java.lang.String portName,
int speed,
int dataBits,
int stopBits,
int parity)
Prepares the server to listen on an arbitrary port. |
|
| Method Summary | |
protected Session |
acceptNewSession()
Listens on the serial port for connection requests. |
void |
broadcast(java.lang.String sendThis)
Displays this message to all sessions initiated by this server. |
void |
closeAllPorts()
Closes and releases ownership of this server's serial port. |
| Methods inherited from class com.dalsemi.shell.server.Server |
checkForNewSessions, getConnectedUsers, run, sessionEnded, shutDown |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setDaemon, setName, setPriority, 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 |
| Constructor Detail |
public SerialServer(java.lang.String portName,
int speed,
int dataBits,
int stopBits,
int parity)
throws java.lang.Exception
run() method is executed.portName - the name of the serial portspeed - the baud rate for the serial port communicationsdataBits - the data bits used by the serial port communicationsstopBits - the stop bits used by the serial port communicationsparity - the parity of the serial port communicationsjava.lang.Exception - if the serial port could not be opened or any of the
specified parameters are invalid| Method Detail |
protected Session acceptNewSession()
acceptNewSession in class ServerSerialSession
public void closeAllPorts()
throws java.io.IOException
closeAllPorts in class Serverpublic void broadcast(java.lang.String sendThis)
broadcast in class ServersendThis - the message to display
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||