de.esprit.netsuite.server.netch.io

## Class IOServerConnection

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.appsuite.launch.AbstractApplicationObject<S>
    - - de.esprit.netsuite.server.AbstractServerObject<ServerContext>
      - - de.esprit.netsuite.server.netch.AbstractServerConnection
        - - de.esprit.netsuite.server.netch.io.IOServerConnection

- All Implemented Interfaces:
    ApplicationObject<ServerContext>, SimpleLogSupport, Dumpable, ServerConnection, ServerMessageConnection, ServerRequestConnection, ServerTransferConnection, ServerObject<ServerContext>, java.io.Closeable, java.lang.AutoCloseable

      public class IOServerConnection
      extends AbstractServerConnection

  This class encapsulates a connection socket as well as its input- and output-streams.
  Author:
    Rainer Buesch

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `IOServerConnection(ServerContext serverCtx, java.net.Socket socket, StreamWrapper streamWrapper)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `java.lang.String` | `getConnectionInfo()`
    `java.lang.String` | `getHostAddress()`
    `java.lang.String` | `getHostName()`
    `java.io.InputStream` | `getReceiveStream()`
    `java.io.OutputStream` | `getSendStream()`
    `boolean` | `isClosed()`
    `boolean` | `isConnected()`
    `void` | `readClientDoneConfirmation()` Receives a dummy byte from the client which indicates, that the client has received all data.
    `java.lang.Object` | `readObject()`
    `void` | `shutdownInput()`
    `void` | `shutdownOutput()`
    `void` | `writeObject(java.lang.Object obj)`

    - ### Methods inherited from class de.esprit.netsuite.server.netch.AbstractServerConnection

      `handleConnection, recordReadBytes, recordWrittenBytes, writeError`

    - ### Methods inherited from class de.esprit.netsuite.server.AbstractServerObject

      `checkPermission, getServerConfig, getServerContext, getStatisticManager, toString`

    - ### Methods inherited from class de.esprit.appsuite.launch.AbstractApplicationObject

      `getApplicationContext, getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannel`

    - ### Methods inherited from class de.esprit.common.util.DumpableObject

      `configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toDumpString, toString`

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

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

    - ### Methods inherited from interface de.esprit.netsuite.server.ServerObject

      `getServerContext`

- - ### Constructor Detail

    - #### IOServerConnection

          public IOServerConnection(ServerContext serverCtx,
                            java.net.Socket socket,
                            StreamWrapper streamWrapper)
                             throws java.lang.Exception

      Throws:
        `java.lang.Exception`

  - ### Method Detail

    - #### getConnectionInfo

          public java.lang.String getConnectionInfo()

    - #### isConnected

          public boolean isConnected()

    - #### getHostAddress

          public java.lang.String getHostAddress()

    - #### getHostName

          public java.lang.String getHostName()

    - #### readObject

          public java.lang.Object readObject()
                                      throws java.io.IOException,
                                             java.lang.ClassNotFoundException

      Throws:
        `java.io.IOException`
        `java.lang.ClassNotFoundException`

    - #### writeObject

          public void writeObject(java.lang.Object obj)
                           throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### getSendStream

          public java.io.OutputStream getSendStream()

    - #### getReceiveStream

          public java.io.InputStream getReceiveStream()

    - #### isClosed

          public boolean isClosed()

    - #### readClientDoneConfirmation

          public void readClientDoneConfirmation()
                                          throws java.io.IOException

      Receives a dummy byte from the client which indicates, that the client has received all data. If we would not block here, this socket would possibly be closed too early.
      Throws:
        `java.io.IOException`

    - #### shutdownInput

          public void shutdownInput()
                             throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### shutdownOutput

          public void shutdownOutput()
                              throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### close

          public void close()

Copyright © 2014 EsprIT-Systems. All Rights Reserved.