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


Constructor Summary
JDBCTermConnection()
           
 
Method Summary
 void executeCommand(java.lang.String c)
          User-input execution facilities
 com.javageeks.gjas.connection.Command[] getCommandArray()
           
 java.sql.Connection getConnection()
           
 java.io.InputStream getInputStream()
           
 java.io.OutputStream getOutputStream()
           
 java.io.OutputStream getPromptStream()
           
 java.lang.String getUserInput()
          Obtain a line of input from the user.
 java.io.BufferedReader input()
           
 java.io.PrintWriter output()
           
 java.io.PrintWriter prompt()
           
 void quit()
          Quit the connection (that is, close it down and return)
 void serve(java.net.Socket socket, ConfigProperties configInfo)
          Offer service on the given socket.
 void setConnection(java.sql.Connection conn)
           
 void setInput(java.io.InputStream in)
           
 void setOutput(java.io.OutputStream out)
           
 void setPrompt(java.io.OutputStream prompt)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCTermConnection

public JDBCTermConnection()
Method Detail

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:

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)