Class RemoteResponseManager

  • All Implemented Interfaces:
    ResponseManager

    public class RemoteResponseManager
    extends Object
    implements ResponseManager
    This class is responsible for handling the Remote Server response. Note that an unusul paradigm is used here. Success is signaled by throwing a "success" exception. This breaks the overarching rule about Exceptions but is very useful in CLI. CLI has the pattern of: Error: Throw an Exception Success: Don't throw an Exception The logic becomes difficult. The command itself has to know how to print a success message properly instead of just putting such a message inside an Exception object and throwing it. In such a system it is cleaner to do this: Error: throw failure exception Success: throw success exception
    Author:
    bnevins