Class TdsTlsSocket

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    class TdsTlsSocket
    extends java.net.Socket
    A socket that mediates between JSSE and the DB server.
    Version:
    $Id: TdsTlsSocket.java,v 1.3.2.1 2009/08/07 14:02:11 ickzon Exp $
    Author:
    Rob Worsnop, Mike Hutchinson
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.net.Socket delegate  
      private java.io.InputStream istm  
      private java.io.OutputStream ostm  
    • Constructor Summary

      Constructors 
      Constructor Description
      TdsTlsSocket​(java.net.Socket delegate)
      Constructs a TdsTlsSocket around an underlying socket.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      java.io.InputStream getInputStream()  
      java.io.OutputStream getOutputStream()  
      boolean isConnected()  
      void setKeepAlive​(boolean keepAlive)  
      void setSoTimeout​(int timeout)  
      void setTcpNoDelay​(boolean on)  
      • Methods inherited from class java.net.Socket

        bind, connect, connect, getChannel, getInetAddress, getKeepAlive, getLocalAddress, getLocalPort, getLocalSocketAddress, getOOBInline, getOption, getPort, getReceiveBufferSize, getRemoteSocketAddress, getReuseAddress, getSendBufferSize, getSoLinger, getSoTimeout, getTcpNoDelay, getTrafficClass, isBound, isClosed, isInputShutdown, isOutputShutdown, sendUrgentData, setOOBInline, setOption, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSocketImplFactory, setSoLinger, setTrafficClass, shutdownInput, shutdownOutput, supportedOptions, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • delegate

        private final java.net.Socket delegate
      • istm

        private final java.io.InputStream istm
      • ostm

        private final java.io.OutputStream ostm
    • Constructor Detail

      • TdsTlsSocket

        TdsTlsSocket​(java.net.Socket delegate)
              throws java.io.IOException
        Constructs a TdsTlsSocket around an underlying socket.
        Parameters:
        delegate - the underlying socket
        Throws:
        java.io.IOException
    • Method Detail

      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class java.net.Socket
        Throws:
        java.io.IOException
      • getInputStream

        public java.io.InputStream getInputStream()
                                           throws java.io.IOException
        Overrides:
        getInputStream in class java.net.Socket
        Throws:
        java.io.IOException
      • getOutputStream

        public java.io.OutputStream getOutputStream()
                                             throws java.io.IOException
        Overrides:
        getOutputStream in class java.net.Socket
        Throws:
        java.io.IOException
      • isConnected

        public boolean isConnected()
        Overrides:
        isConnected in class java.net.Socket
      • setSoTimeout

        public void setSoTimeout​(int timeout)
                          throws java.net.SocketException
        Overrides:
        setSoTimeout in class java.net.Socket
        Throws:
        java.net.SocketException
      • setKeepAlive

        public void setKeepAlive​(boolean keepAlive)
                          throws java.net.SocketException
        Overrides:
        setKeepAlive in class java.net.Socket
        Throws:
        java.net.SocketException
      • setTcpNoDelay

        public void setTcpNoDelay​(boolean on)
                           throws java.net.SocketException
        Overrides:
        setTcpNoDelay in class java.net.Socket
        Throws:
        java.net.SocketException