de.esprit.netsuite.server.netch

## Class AbstractServerConnection

- 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

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

      public abstract class AbstractServerConnection
      extends AbstractServerObject<ServerContext>
      implements ServerMessageConnection, ServerRequestConnection, ServerTransferConnection

  This class contains the logic of each connection that the server opens for the client. By first reading the clients `NetChannelType` it decides which type of connection it actually will be - which is one of `ServerMessageConnection`, `ServerRequestConnection`, `ServerTransferConnection`). The specific type of connection is opened within the `ServerNetworkAdapter` where also the according service tasks are started and managed.
  Author:
    Rainer Buesch

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractServerConnection(ServerContext serverCtx)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `handleConnection()` Here the decision is made which type of connection this will be.
    `protected void` | `recordReadBytes(long byteCount)`
    `protected void` | `recordWrittenBytes(long byteCount)`
    `void` | `writeError(java.lang.Exception error)`

    - ### 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.netch.ServerMessageConnection

      `shutdownInput`

    - ### Methods inherited from interface de.esprit.netsuite.server.netch.ServerRequestConnection

      `shutdownOutput`

    - ### Methods inherited from interface de.esprit.netsuite.server.netch.ServerTransferConnection

      `getReceiveStream, getSendStream, readClientDoneConfirmation, shutdownInput, shutdownOutput`

    - ### Methods inherited from interface de.esprit.netsuite.server.netch.ServerConnection

      `getConnectionInfo, getHostAddress, getHostName, isClosed, isConnected, readObject, writeObject`

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

      `getServerContext`

    - ### Methods inherited from interface java.io.Closeable

      `close`

- - ### Constructor Detail

    - #### AbstractServerConnection

          public AbstractServerConnection(ServerContext serverCtx)

  - ### Method Detail

    - #### writeError

          public void writeError(java.lang.Exception error)

      Specified by:
        `writeError` in interface `ServerConnection`

    - #### handleConnection

          public void handleConnection()
                                throws java.lang.Exception

      Here the decision is made which type of connection this will be.
      Throws:
        `java.lang.Exception`

    - #### recordWrittenBytes

          protected final void recordWrittenBytes(long byteCount)

    - #### recordReadBytes

          protected final void recordReadBytes(long byteCount)

Copyright © 2014 EsprIT-Systems. All Rights Reserved.