Additional top-level classes in compilation unit: InResultProcessor, CleanExit.
When the database or server is shutdown, the signalClose() method is called for all current ServerConnection instances. This will call the private close() method. If the ServerConnection thread itself has caused the shutdown it returns the result of the operation to the client. (fredt@users)
ODBC support added for version 2.0.0 by Blaine Simpson.
ODBC support updated for version 2.5.x. (fredt@users)
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| pack-priv class | |
| pack-priv class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final int | |
| private CleanExit | |
| public static long | CLIENT_DATA_POLLING_PERIOD
Don't want this too high, or users may give up before seeing the banner. |
| private DataInputStream | |
| private DataOutputStream | |
| pack-priv int | |
| pack-priv int | |
| pack-priv static final int | |
| pack-priv boolean | |
| pack-priv final byte[] | |
| private static AtomicLong | |
| private long | |
| pack-priv static final int | |
| pack-priv int | |
| private OdbcPacketOutputStream | |
| pack-priv InResultProcessor | |
| pack-priv RowInputBinary | |
| pack-priv RowOutputInterface | |
| pack-priv Thread | |
| private Server | |
| private volatile Session | |
| private Map | |
| private Map | |
| private Socket | |
| private int | |
| protected static String | |
| protected static String | |
| pack-priv static final int | |
| private String |
| Access | Constructor and Description |
|---|---|
| pack-priv | ServerConnection(Socket
the network socket on which Server communication
takes place socket, Server the Server instance to which the object
represents a connection server)Creates a new ServerConnection to the specified Server on the specified socket. |
| Modifier and Type | Method and Description |
|---|---|
| private Result | |
| private void | |
| pack-priv String | Returns: the thread name to be used when this object is the Runnable object of a Thread.Retrieves the thread name to be used when this object is the Runnable object of a Thread. |
| public int | Returns: int read as first thing off of streamThe only known case where a connection attempt will get stuck is if client connects with hsqls to a https server; or hsql to a http server. |
| private void | |
| private void | |
| private void | |
| private static String | readNullTermdUTF(int
Required length reqLength, InputStream istream)Read String directly from dataInput. |
| private void | |
| private void | |
| public void | run()
Implements java. Initializes this connection and runs the request handling loop until closed. |
| private Result | |
| pack-priv void | signalClose()
Signals this object to close, including exiting the thread running the request handling loop |
| BUFFER_SIZE | back to summary |
|---|---|
| pack-priv static final int BUFFER_SIZE | |
| cleanExit | back to summary |
|---|---|
| private CleanExit cleanExit | |
| CLIENT_DATA_POLLING_PERIOD | back to summary |
|---|---|
| public static long CLIENT_DATA_POLLING_PERIOD Don't want this too high, or users may give up before seeing the banner. Can't be too low or we could close a valid but slow client connection. | |
| dataInput | back to summary |
|---|---|
| private DataInputStream dataInput | |
| dataOutput | back to summary |
|---|---|
| private DataOutputStream dataOutput | |
| dbID | back to summary |
|---|---|
| pack-priv int dbID | |
| dbIndex | back to summary |
|---|---|
| pack-priv int dbIndex | |
| HSQL_STREAM_PROTOCOL | back to summary |
|---|---|
| pack-priv static final int HSQL_STREAM_PROTOCOL | |
| keepAlive | back to summary |
|---|---|
| pack-priv boolean keepAlive | |
| mainBuffer | back to summary |
|---|---|
| pack-priv final byte[] mainBuffer | |
| mCurrentThread | back to summary |
|---|---|
| private static AtomicLong mCurrentThread | |
| mThread | back to summary |
|---|---|
| private long mThread | |
| ODBC_STREAM_PROTOCOL | back to summary |
|---|---|
| pack-priv static final int ODBC_STREAM_PROTOCOL | |
| odbcCommMode | back to summary |
|---|---|
| pack-priv int odbcCommMode | |
| outPacket | back to summary |
|---|---|
| private OdbcPacketOutputStream outPacket | |
| processor | back to summary |
|---|---|
| pack-priv InResultProcessor processor | |
| rowIn | back to summary |
|---|---|
| pack-priv RowInputBinary rowIn | |
| rowOut | back to summary |
|---|---|
| pack-priv RowOutputInterface rowOut | |
| runnerThread | back to summary |
|---|---|
| pack-priv Thread runnerThread | |
| server | back to summary |
|---|---|
| private Server server | |
| session | back to summary |
|---|---|
| private volatile Session session | |
| sessionOdbcPortalMap | back to summary |
|---|---|
| private Map<String, StatementPortal> sessionOdbcPortalMap | |
| sessionOdbcPsMap | back to summary |
|---|---|
| private Map<String, OdbcPreparedStatement> sessionOdbcPsMap | |
| socket | back to summary |
|---|---|
| private Socket socket | |
| streamProtocol | back to summary |
|---|---|
| private int streamProtocol | |
| TEXTBANNER_PART1 | back to summary |
|---|---|
| protected static String TEXTBANNER_PART1 | |
| TEXTBANNER_PART2 | back to summary |
|---|---|
| protected static String TEXTBANNER_PART2 | |
| UNDEFINED_STREAM_PROTOCOL | back to summary |
|---|---|
| pack-priv static final int UNDEFINED_STREAM_PROTOCOL | |
| user | back to summary |
|---|---|
| private String user | |
| ServerConnection | back to summary |
|---|---|
| pack-priv ServerConnection(Socket socket, Server server) Creates a new ServerConnection to the specified Server on the specified socket. | |
| cancelStatement | back to summary |
|---|---|
| private Result cancelStatement(Result resultIn) | |
| close | back to summary |
|---|---|
| private void close() Closes this connection. | |
| getConnectionThreadName | back to summary |
|---|---|
| pack-priv String getConnectionThreadName() Retrieves the thread name to be used when this object is the Runnable object of a Thread.
| |
| handshake | back to summary |
|---|---|
| public int handshake() throws IOException The only known case where a connection attempt will get stuck is if client connects with hsqls to a https server; or hsql to a http server. All other client X server combinations are handled gracefully. If returns (a.o.t. throws), then state variable streamProtocol will be set.
| |
| init | back to summary |
|---|---|
| private void init() Initializes this connection. Will return (not throw) if fail to initialize the connection. | |
| odbcConnect | back to summary |
|---|---|
| private void odbcConnect(int firstInt) throws IOException | |
| odbcExecDirect | back to summary |
|---|---|
| private void odbcExecDirect(String inStatement) throws RecoverableOdbcFailure, IOException | |
| readNullTermdUTF | back to summary |
|---|---|
| private static String readNullTermdUTF(int reqLength, InputStream istream) throws IOException Read String directly from dataInput.
| |
| receiveOdbcPacket | back to summary |
|---|---|
| private void receiveOdbcPacket(char inC) throws IOException, CleanExit | |
| receiveResult | back to summary |
|---|---|
| private void receiveResult(int resultMode) throws CleanExit, IOException | |
| run | back to summary |
|---|---|
| public void run() Implements java. Initializes this connection and runs the request handling loop until closed. | |
| setDatabase | back to summary |
|---|---|
| private Result setDatabase(Result resultIn) | |
| signalClose | back to summary |
|---|---|
| pack-priv void signalClose() Signals this object to close, including exiting the thread running the request handling loop | |
| Modifier and Type | Field and Description |
|---|---|
| private String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String |
| clientMessage | back to summary |
|---|---|
| private String clientMessage | |
| ClientFailure | back to summary |
|---|---|
| public ClientFailure(String ourMessage, String clientMessage) | |
| getClientMessage | back to summary |
|---|---|
| public String getClientMessage() | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void |
| HsqlInResultProcessor | back to summary |
|---|---|
| pack-priv HsqlInResultProcessor() | |
| receiveConnection | back to summary |
|---|---|
| public void receiveConnection(int type) throws CleanExit, IOException Implements org. | |
| receiveResult | back to summary |
|---|---|
| public void receiveResult(int type) throws CleanExit, IOException Implements org. | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void |
| OdbcInResultProcessor | back to summary |
|---|---|
| pack-priv OdbcInResultProcessor() | |
| receiveConnection | back to summary |
|---|---|
| public void receiveConnection(int type) throws IOException Implements org. | |
| receiveResult | back to summary |
|---|---|
| public void receiveResult(int type) throws CleanExit, IOException Implements org. | |