Class ClientSessionContainer


  • public class ClientSessionContainer
    extends java.lang.Object

    Title: FileCatalyst Direct Server API

    Description: Session container used by the Server-side API. Used to view sessions which are running on a FileCatalyst Server.

    Since:
    v3.1

    • Field Summary

      Fields 
      Modifier and Type Field Description
      long bytesSoFar
      Bytes sent so far in transfer
      java.lang.String clientType
      Client type connecting.
      int connectedTimeSec
      Time spend so far connected to the server, in seconds.
      long deliveryTime
      Non-zero value indicates that the server as been asked to elevate the bandwidth/priority of this file/session in order to ensure that the file arrives before the given timestamp.
      long elapsedTimeSec
      Time spend so far on transfer, in seconds.
      java.lang.String fileName
      Full path of the file being sent/received from the server's perspective.
      long fileSizeBytes
      Size of file (bytes) if known to the server.
      boolean isTransferring
      true/false value if client is currently transfering data.
      int overrideBandwidthKbps
      Non-zero value indicates that the server has been asked to override the bandwidth allocated to this transfer/session by an administrator.
      int overridePriority
      Non-zero value indicates that the server has been asked to override the priority allocated to this transfer/session by an administrator.
      int receiveRateKbps
      Receive rate in Kbps (kilo bits per second) non-zero value indicates someone is uploading.
      java.lang.String remoteIP
      Remote IP as presented to the server by the remote client.
      java.lang.String sessionID
      Unique identifier of a a single client connecting into the server.
      java.lang.String status
      Status of a connection.
      int transmitRateKbps
      Transmit rate in Kbps (kilo bits per second) non-zero value indicates someone is downloading.
      java.lang.String userName
      Username used when authenticating with the server.
    • Constructor Summary

      Constructors 
      Constructor Description
      ClientSessionContainer​(java.lang.String sessionID, java.lang.String userName, java.lang.String remoteIP, java.lang.String status, java.lang.String fileName, long fileSize, long bytesSoFar, long elapsedTime, java.lang.String clientType, int transmitRateKbps, int receiveRateKbps, int connectedTimeSec, boolean isTransferring, int overrideBandwidth, int overridePriority, long deliveryTime)
      Basic constructor.
    • Field Detail

      • sessionID

        public java.lang.String sessionID
        Unique identifier of a a single client connecting into the server.
      • userName

        public java.lang.String userName
        Username used when authenticating with the server.
      • remoteIP

        public java.lang.String remoteIP
        Remote IP as presented to the server by the remote client.
      • status

        public java.lang.String status
        Status of a connection. This is presented as a visible string that can be displayed to the user directly. Data direction is seen from the server's perspective: Examples: client downloading data: "14% - Sending (UDP)..." client uploading data: "28% - Receiving (FTP)..." client not transfering data: Idle Other commands are also made visible in the session status.
      • fileName

        public java.lang.String fileName
        Full path of the file being sent/received from the server's perspective. ie: if a file "bar.txt" is being sent to the user "foo"'s home directory, and their home directory is placed in "E:\ftpdata\foo", the value would be "E:\ftpdata\foo\bar.txt".
      • fileSizeBytes

        public long fileSizeBytes
        Size of file (bytes) if known to the server. If client is uploading using FTP protocol to the server, the size if the file is not known in advance.
      • bytesSoFar

        public long bytesSoFar
        Bytes sent so far in transfer
      • elapsedTimeSec

        public long elapsedTimeSec
        Time spend so far on transfer, in seconds.
      • clientType

        public java.lang.String clientType
        Client type connecting. Will contain the full client + version string when known. Example: "FileCatalyst HotFolder v3.0.1"
      • transmitRateKbps

        public int transmitRateKbps
        Transmit rate in Kbps (kilo bits per second) non-zero value indicates someone is downloading.
      • receiveRateKbps

        public int receiveRateKbps
        Receive rate in Kbps (kilo bits per second) non-zero value indicates someone is uploading.
      • connectedTimeSec

        public int connectedTimeSec
        Time spend so far connected to the server, in seconds.
      • isTransferring

        public boolean isTransferring
        true/false value if client is currently transfering data.
      • overrideBandwidthKbps

        public int overrideBandwidthKbps
        Non-zero value indicates that the server has been asked to override the bandwidth allocated to this transfer/session by an administrator. Bandwidth value in Kbps. Set to zero (0) to set bandwidth back to default.
      • overridePriority

        public int overridePriority
        Non-zero value indicates that the server has been asked to override the priority allocated to this transfer/session by an administrator. Priority values are from 1 (lowest) to 10 (highest). Example: Set to zero (0) to set priority back to default.
      • deliveryTime

        public long deliveryTime
        Non-zero value indicates that the server as been asked to elevate the bandwidth/priority of this file/session in order to ensure that the file arrives before the given timestamp. Date format used is standard JAVA timestamp, or MS since Jan 1, 1970. example: Timestamp of 1340810482381 indicates June 27, 11:21 AM
    • Constructor Detail

      • ClientSessionContainer

        public ClientSessionContainer​(java.lang.String sessionID,
                                      java.lang.String userName,
                                      java.lang.String remoteIP,
                                      java.lang.String status,
                                      java.lang.String fileName,
                                      long fileSize,
                                      long bytesSoFar,
                                      long elapsedTime,
                                      java.lang.String clientType,
                                      int transmitRateKbps,
                                      int receiveRateKbps,
                                      int connectedTimeSec,
                                      boolean isTransferring,
                                      int overrideBandwidth,
                                      int overridePriority,
                                      long deliveryTime)
        Basic constructor. Should be called by a factory method which has access to the real internal session objects.
        Parameters:
        sessionID - ID representing the session
        userName - Username of user within the client session
        remoteIP - Remote IP of the client session
        status - The current status of the client session
        fileName - The current file name of the client session
        fileSizeBytes - The current file size in bytes
        bytesSoFar - The bytes transfered so far
        elapsedTimeSec - The elapsed amount of time in seconds
        clientType - The type of client being used in this session
        transmitRateKbps - The transfer rate in kbps
        receiveRateKbps - The receive rate in kbps
        connectedTimeSec - Amount of seconds that will pass before a connection request times out
        isTransferring - Whether or not the session is still transferring
        overrideBandwidthKbps - The amount of bandwidth allotted to the session if it has been overridden
        overridePriority - The overridden priority allotted to the session
        deliveryTime - Expected delievery time of the client session
    • Method Detail

      • listHeaders

        public static java.lang.String listHeaders()
        ListHeaders() is used by FCServer in CLI mode to output the list of session data.
        Returns:
        Print out header information for ClientSessionContainer.
      • toString

        public java.lang.String toString()
        To String method, used by FCServer in CLI mode to output the list of session data.
        Overrides:
        toString in class java.lang.Object
        Returns:
      • convertSessionToClientSessionContainer

        public static ClientSessionContainer convertSessionToClientSessionContainer​(unlimited.fc.server.engine.session.Session a)