1 24 25 package com.mckoi.database.jdbcserver; 26 27 import com.mckoi.database.jdbc.DatabaseInterface; 28 import com.mckoi.debug.DebugLogger; 29 30 import java.net.Socket ; 31 import java.io.*; 32 33 39 40 final class TCPJDBCServerConnection extends StreamJDBCServerConnection { 41 42 45 private Socket connection; 46 47 50 private boolean is_closed = false; 51 52 55 TCPJDBCServerConnection(DatabaseInterface db_interface, 56 Socket socket, DebugLogger logger) throws IOException { 57 super(db_interface, socket.getInputStream(), 58 socket.getOutputStream(), logger); 59 this.connection = socket; 60 } 61 62 65 public void close() throws IOException { 66 try { 67 dispose(); 69 } 70 catch (Throwable e) { e.printStackTrace(); } 71 connection.close(); 73 is_closed = true; 74 } 75 76 79 public boolean isClosed() throws IOException { 80 return is_closed; 81 } 82 83 } 84 | Popular Tags |