SharedLocalNamedPipe (jTDS API)
Date: 2013-06-08

net.sourceforge.jtds.jdbc

## Class SharedLocalNamedPipe

- java.lang.Object
- - net.sourceforge.jtds.jdbc.SharedSocket
  - - net.sourceforge.jtds.jdbc.SharedLocalNamedPipe

-     public class SharedLocalNamedPipe
      extends SharedSocket

  This class implements inter-process communication (IPC) to the database server using local named pipes (will only work on Windows).
  Version:
    $Id: SharedLocalNamedPipe.java,v 1.12 2007-07-08 21:38:13 bheineman Exp $
  Author:
    Adam Etheredge

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class net.sourceforge.jtds.jdbc.SharedSocket

      `SharedSocket.VirtualSocket`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `(package private) java.io.RandomAccessFile` | `pipe` The named pipe as a file.

    - ### Fields inherited from class net.sourceforge.jtds.jdbc.SharedSocket

      `serverType`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SharedLocalNamedPipe(JtdsConnection connection)` Creates a new instance of `SharedLocalNamedPipe`.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `(package private) void` | `close()` Close the named pipe and virtual sockets and release any resources.
    `(package private) void` | `forceClose()` Force close the socket causing any pending reads/writes to fail.
    `(package private) java.lang.String` | `getMAC()`
    `(package private) boolean` | `isConnected()` Get the connected status of this socket.
    `(package private) byte[]` | `sendNetPacket(SharedSocket.VirtualSocket vsock, byte[] buffer)` Send an network packet.
    `protected void` | `setTimeout(int timeout)` Set the socket timeout.

    - ### Methods inherited from class net.sourceforge.jtds.jdbc.SharedSocket

      `cancel, closeStream, disableEncryption, enableEncryption, finalize, getCharset, getCharsetInfo, getHost, getIn, getMemoryBudget, getMinMemPkts, getNetPacket, getOut, getPktLen, getPort, getRequestStream, getResponseStream, getTdsVersion, setCharsetInfo, setIn, setKeepAlive, setMemoryBudget, setMinMemPkts, setOut, setTdsVersion`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### pipe

          java.io.RandomAccessFile pipe

      The named pipe as a file.

  - ### Constructor Detail

    - #### SharedLocalNamedPipe

          public SharedLocalNamedPipe(JtdsConnection connection)
                               throws java.io.IOException

      Creates a new instance of `SharedLocalNamedPipe`.
      Parameters:
        `connection` - the connection object
      Throws:
        `java.io.IOException` - if an I/O error occurs

  - ### Method Detail

    - #### getMAC

          java.lang.String getMAC()

      Overrides:
        `getMAC` in class `SharedSocket`

    - #### isConnected

          boolean isConnected()

      Get the connected status of this socket.
      Overrides:
        `isConnected` in class `SharedSocket`
      Returns:
        `true` if the underlying named pipe is connected

    - #### sendNetPacket

          byte[] sendNetPacket(SharedSocket.VirtualSocket vsock,
                             byte[] buffer)
                         throws java.io.IOException

      Send an network packet. If output for another virtual socket is in progress this packet will be sent later.
      Overrides:
        `sendNetPacket` in class `SharedSocket`
      Parameters:
        `vsock` - the `VirtualSocket` used by the originating `RequestStream`
        `buffer` - the data to send
      Returns:
        the same buffer received if emptied or another buffer w/ the same size if the incoming buffer is cached (to avoid copying)
      Throws:
        `java.io.IOException` - if an I/O error occurs

    - #### close

          void close()
               throws java.io.IOException

      Close the named pipe and virtual sockets and release any resources.
      Overrides:
        `close` in class `SharedSocket`
      Throws:
        `java.io.IOException` - if the socket close fails

    - #### forceClose

          void forceClose()

      Force close the socket causing any pending reads/writes to fail.

      Used by the login timer to abort a login attempt.

      Overrides:
        `forceClose` in class `SharedSocket`

    - #### setTimeout

          protected void setTimeout(int timeout)

      Set the socket timeout.
      Overrides:
        `setTimeout` in class `SharedSocket`
      Parameters:
        `timeout` - the timeout value in milliseconds

Generated on June 8 2013