Interface Supervisor


public interface Supervisor
A Supervisor handles the initiating side of a session with a remote agent. The methods defined in this interface are intended to be called by the remote agent, not the initiator. I.e. this is not the interface the initiator will use to control the session.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    An event sent from the agent.
    byte[]
    Return the contents of the file that has the given SHA-1.
    boolean
    Redirected standard error.
    boolean
    Redirected standard output
  • Method Details

    • event

      void event(Event e) throws Exception
      An event sent from the agent.
      Parameters:
      e - the event
      Throws:
      Exception
    • stdout

      boolean stdout(String out) throws Exception
      Redirected standard output
      Parameters:
      out - the text that was redirected
      Returns:
      ignored (to make sync)
      Throws:
      Exception
    • stderr

      boolean stderr(String out) throws Exception
      Redirected standard error.
      Parameters:
      out - the text that was redirected
      Returns:
      ignored (to make sync)
      Throws:
      Exception
    • getFile

      byte[] getFile(String sha) throws Exception
      Return the contents of the file that has the given SHA-1. The initiator of the connection should in general register the files it refers to in the communication to the agent. The agent then calls this method to retrieve the contents if it does not have it in its local cache.
      Parameters:
      sha - the SHA-1
      Returns:
      the contents of that file or null if no such file exists.
      Throws:
      Exception