com.javageeks.gjas.connection
Class JDBCTermConnection
java.lang.Object
|
+--com.javageeks.gjas.connection.JDBCTermConnection
- All Implemented Interfaces:
- Connection
- public class JDBCTermConnection
- extends java.lang.Object
- implements Connection
JDBCTermConnection
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JDBCTermConnection
public JDBCTermConnection()
serve
public void serve(java.net.Socket socket,
ConfigProperties configInfo)
throws java.lang.Exception
- Offer service on the given socket. Remain open until told to quit
by the user (via the @QUIT command).
TODO:
- Do something with ConfigProperties; driver, url, uid/pwd,
maybe startup script to run, and so on.
- Specified by:
serve
in interface Connection
quit
public void quit()
- Quit the connection (that is, close it down and return)
input
public java.io.BufferedReader input()
setInput
public void setInput(java.io.InputStream in)
getInputStream
public java.io.InputStream getInputStream()
prompt
public java.io.PrintWriter prompt()
output
public java.io.PrintWriter output()
setOutput
public void setOutput(java.io.OutputStream out)
setPrompt
public void setPrompt(java.io.OutputStream prompt)
getOutputStream
public java.io.OutputStream getOutputStream()
getPromptStream
public java.io.OutputStream getPromptStream()
getUserInput
public java.lang.String getUserInput()
- Obtain a line of input from the user. Will not return until a semicolon
is entered.
executeCommand
public void executeCommand(java.lang.String c)
- User-input execution facilities
getCommandArray
public com.javageeks.gjas.connection.Command[] getCommandArray()
getConnection
public java.sql.Connection getConnection()
setConnection
public void setConnection(java.sql.Connection conn)