Package org.h2.server

Class TcpServerThread

  • All Implemented Interfaces:
    java.lang.Runnable

    public class TcpServerThread
    extends java.lang.Object
    implements java.lang.Runnable
    One server thread is opened per client connection.
    • Field Detail

      • transfer

        protected final Transfer transfer
      • stop

        private boolean stop
      • thread

        private java.lang.Thread thread
      • threadId

        private final int threadId
      • clientVersion

        private int clientVersion
      • sessionId

        private java.lang.String sessionId
      • lastRemoteSettingsId

        private long lastRemoteSettingsId
    • Constructor Detail

      • TcpServerThread

        TcpServerThread​(java.net.Socket socket,
                        TcpServer server,
                        int id)
    • Method Detail

      • trace

        private void trace​(java.lang.String s)
      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
      • closeSession

        private void closeSession()
      • close

        void close()
        Close a connection.
      • sendError

        private void sendError​(java.lang.Throwable t,
                               boolean withStatus)
      • setParameters

        private void setParameters​(Command command)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • process

        private void process()
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • getState

        private int getState​(int oldModificationId)
      • sendRows

        private void sendRows​(ResultInterface result,
                              long count)
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • setThread

        void setThread​(java.lang.Thread thread)
      • getThread

        java.lang.Thread getThread()
      • cancelStatement

        void cancelStatement​(java.lang.String targetSessionId,
                             int statementId)
        Cancel a running statement.
        Parameters:
        targetSessionId - the session id
        statementId - the statement to cancel