Package unlimited.fc.server.api
Class ClientSessionContainer
- java.lang.Object
-
- unlimited.fc.server.api.ClientSessionContainer
-
public class ClientSessionContainer extends java.lang.ObjectTitle: 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 longbytesSoFarBytes sent so far in transferjava.lang.StringclientTypeClient type connecting.intconnectedTimeSecTime spend so far connected to the server, in seconds.longdeliveryTimeNon-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.longelapsedTimeSecTime spend so far on transfer, in seconds.java.lang.StringfileNameFull path of the file being sent/received from the server's perspective.longfileSizeBytesSize of file (bytes) if known to the server.booleanisTransferringtrue/false value if client is currently transfering data.intoverrideBandwidthKbpsNon-zero value indicates that the server has been asked to override the bandwidth allocated to this transfer/session by an administrator.intoverridePriorityNon-zero value indicates that the server has been asked to override the priority allocated to this transfer/session by an administrator.intreceiveRateKbpsReceive rate in Kbps (kilo bits per second) non-zero value indicates someone is uploading.java.lang.StringremoteIPRemote IP as presented to the server by the remote client.java.lang.StringsessionIDUnique identifier of a a single client connecting into the server.java.lang.StringstatusStatus of a connection.inttransmitRateKbpsTransmit rate in Kbps (kilo bits per second) non-zero value indicates someone is downloading.java.lang.StringuserNameUsername 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.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ClientSessionContainerconvertSessionToClientSessionContainer(unlimited.fc.server.engine.session.Session a)static java.lang.StringlistHeaders()ListHeaders() is used by FCServer in CLI mode to output the list of session data.java.lang.StringtoString()To String method, used by FCServer in CLI mode to output the list of session data.
-
-
-
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 sessionuserName- Username of user within the client sessionremoteIP- Remote IP of the client sessionstatus- The current status of the client sessionfileName- The current file name of the client sessionfileSizeBytes- The current file size in bytesbytesSoFar- The bytes transfered so farelapsedTimeSec- The elapsed amount of time in secondsclientType- The type of client being used in this sessiontransmitRateKbps- The transfer rate in kbpsreceiveRateKbps- The receive rate in kbpsconnectedTimeSec- Amount of seconds that will pass before a connection request times outisTransferring- Whether or not the session is still transferringoverrideBandwidthKbps- The amount of bandwidth allotted to the session if it has been overriddenoverridePriority- The overridden priority allotted to the sessiondeliveryTime- 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:
toStringin classjava.lang.Object- Returns:
-
convertSessionToClientSessionContainer
public static ClientSessionContainer convertSessionToClientSessionContainer(unlimited.fc.server.engine.session.Session a)
-
-