CSJCurrent en:General Server Data

Aus Cryptshare Documentation
Wechseln zu:Navigation, Suche



With the Client's method requestServerData() you can request general server data from the Cryptshare Server. The method returns a ServerData object which contains the official base URL of the Cryptshare Server, the server's time zone, as well as the disk spaces in bytes that are available for future file transfers.

Example: Requesting General Server Data

// First create the Client instance
// Create a WebServiceUri for your Cryptshare Server 
WebServiceUri serviceUri = new WebServiceUri("https://cryptshare.server.com");
 
// Create a CryptshareConnection instance for your WebServiceUri
CryptshareConnection connection = new CryptshareConnection(serviceUri);
 
// Create the Client instance with the sender's email address, 
// the CryptshareConnection, and the path to the verification store.
Client client = new Client("sender_email@server.com", connection, Paths.get("C:\\\\temp"));

// Request general server data
ServerData serverData = client.requestServerData();

System.out.println("Official Cryptshare Server URL: " + serverData.getServerUrl());
System.out.println("Server time zone: " + serverData.getServerTimeZone());
System.out.println("Available disk space for uploaded transfers (retention folder) in bytes: " 
										+ serverData.getAvailableRetentionDiskSpace());                
System.out.println("Available disk space for transfers during upload (temporary folder) in bytes: " 
										+ serverData.getAvailableTempDiskSpace());