de.esprit.netsuite.server.chxfer

## Class ParallelStreamsList

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.appsuite.launch.AbstractApplicationObject<S>
    - - de.esprit.netsuite.server.AbstractServerObject<ServerContext>
      - - de.esprit.netsuite.server.chxfer.ParallelStreamsList

- All Implemented Interfaces:
    ApplicationObject<ServerContext>, SimpleLogSupport, Dumpable, ServerObject<ServerContext>

      public class ParallelStreamsList
      extends AbstractServerObject<ServerContext>

  This list contains the stream jobs that are currently running on the server. It also ensures that the max number of allowed parallel transfers cannot be exceeded.

  Note that each file transfer is a stateless connection just for transferring one particular file. The entries of this list are `FileStreamJob` objects. If the stream is successfully transferred then the entry is removed and the waiting `FileStreamDownloadAgent` is released.

  Author:
    Rainer Buesch

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ParallelStreamsList(ServerContext serverCtx)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `FileStreamEntry` | `addJob(FileStreamJob job)`
    `JobId[]` | `getRunningJobIds()`
    `void` | `removeJob(FileStreamEntry entry)`
    `FileStreamEntry` | `setStreamRunning(AsyncTask task, JobId jobId)`

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

    - #### ParallelStreamsList

          public ParallelStreamsList(ServerContext serverCtx)

  - ### Method Detail

    - #### addJob

          public FileStreamEntry addJob(FileStreamJob job)
                                 throws TooManyTransfersException

      Throws:
        `TooManyTransfersException`

    - #### removeJob

          public void removeJob(FileStreamEntry entry)

    - #### setStreamRunning

          public FileStreamEntry setStreamRunning(AsyncTask task,
                                         JobId jobId)
                                           throws NoSuchStreamJobException

      Throws:
        `NoSuchStreamJobException`

    - #### getRunningJobIds

          public JobId[] getRunningJobIds()

Copyright © 2014 EsprIT-Systems. All Rights Reserved.