Class Client

java.lang.Object
Client

public class Client
extends java.lang.Object
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    class  Client.FileAlreadyExistsException  
    class  Client.FileDoesNotExistException  
    class  Client.NotEnoughDstoresException  
  • Constructor Summary

    Constructors 
    Constructor Description
    Client​(int cport, int timeout, Logger.LoggingType loggintType)
    This also initialises ClientLogger
  • Method Summary

    Modifier and Type Method Description
    void connect()
    Establishes a TCP connection with the Controller.
    void disconnect()  
    java.lang.String[] list()
    Executes the List operation
    byte[] load​(java.lang.String filename)
    Executes the Load operation
    void load​(java.lang.String filename, java.io.File fileFolder)
    Convenience method that calls load(String) method and stores the data received from the Dstore in a new filename file in fileFolder folder.
    void remove​(java.lang.String filename)
    Executes the Remove operation
    void send​(java.lang.String message)
    This is for debug/test purposes.
    void store​(java.io.File file)
    Convenience method that loads the content of the given file and then calls the store(String, byte[]) method
    void store​(java.lang.String filename, byte[] data)
    Executes the Store operation

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait