de.esprit.netsuite.server.netch

## Class ServerConnector<S extends ServerContext>

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

- All Implemented Interfaces:
    ApplicationObject<S>, CloseableComponent, SimpleLogSupport, Dumpable, ServerObject<S>, java.lang.AutoCloseable
  Direct Known Subclasses:
    IOServerConnector

      public abstract class ServerConnector<S extends ServerContext>
      extends AbstractServerObject<S>
      implements CloseableComponent

  This class is the servers interface to networking. It provides all standard network functionality like `Session` management and message queuing. All IO specific things are implemented in subclasses.
  Author:
    Rainer Buesch

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ServerConnector(S serverCtx, StreamWrapper streamWrapper)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Stops all the network services.
    `protected abstract ServerConnectionService` | `createConnectionService(S serverCtx, StreamWrapper streamWrapper)` Create the IO specific connection server that knows how to establish the server connections defined in `NetChannelType`.
    `ServerMessageDispatcher` | `getMessageDispatcher()`
    `ServerMessageQueue` | `getServerMessageQueue()`
    `SessionManager` | `getSessionManager()`
    `EspritWebServer` | `getWebServer()`
    `void` | `setMessageDispatcher(ServerMessageDispatcher dispatcher)` Allows for setting a custom ServerMessageDispatcher instance
    `void` | `startServices()` Must be called after construction and after initialization in order to start the network services.

    - ### 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`

- - ### Constructor Detail

    - #### ServerConnector

          public ServerConnector(S serverCtx,
                         StreamWrapper streamWrapper)
                          throws java.lang.Exception

      Throws:
        `java.lang.Exception`

  - ### Method Detail

    - #### createConnectionService

          protected abstract ServerConnectionService createConnectionService(S serverCtx,
                                                        StreamWrapper streamWrapper)
                                                                      throws java.lang.Exception

      Create the IO specific connection server that knows how to establish the server connections defined in `NetChannelType`.
      Parameters:
        `streamWrapper` -
      Throws:
        `java.lang.Exception`

    - #### getServerMessageQueue

          public ServerMessageQueue getServerMessageQueue()

    - #### getSessionManager

          public SessionManager getSessionManager()

    - #### startServices

          public final void startServices()
                                   throws java.lang.Exception

      Must be called after construction and after initialization in order to start the network services.
      Throws:
        `java.lang.Exception`

    - #### getWebServer

          public EspritWebServer getWebServer()

    - #### setMessageDispatcher

          public void setMessageDispatcher(ServerMessageDispatcher dispatcher)

      Allows for setting a custom ServerMessageDispatcher instance

    - #### getMessageDispatcher

          public ServerMessageDispatcher getMessageDispatcher()

    - #### close

          public final void close()

      Stops all the network services.
      Specified by:
        `close` in interface `java.lang.AutoCloseable`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.