Interface RepoRemoteTransport

All Known Implementing Classes:
RepoRemoteTransportService

public interface RepoRemoteTransport
Over the wire, and authentication safe flavor of RepoRemote interface.
Author:
britt
  • Method Details

    • getRoot

      NodeRef getRoot(String ticket)
      Get the root node of the SpacesStore repo.
      Returns:
      The root node ref.
    • getListing

      Map<String,Pair<NodeRef,Boolean>> getListing(String ticket, NodeRef dir)
      Get a listing of a directory.
      Parameters:
      dir - The node ref of the directory.
      Returns:
      A Map of names to node refs.
    • lookup

      Pair<NodeRef,Boolean> lookup(String ticket, NodeRef base, String path)
      Lookup a node by path relative to a node.
      Parameters:
      base - The base node ref.
      path - The relative path.
      Returns:
      The node ref or null.
    • createFile

      String createFile(String ticket, NodeRef base, String path)
      Create a file relative to a base node.
      Parameters:
      base - The base node ref.
      path - The relative path.
      Returns:
      A handle.
    • writeFile

      String writeFile(String ticket, NodeRef base, String path)
      Write to an already existing file.
      Parameters:
      base - The base node ref.
      path - The relative path.
      Returns:
      A handle.
    • createDirectory

      NodeRef createDirectory(String ticket, NodeRef base, String path)
      Create a new directory.
      Parameters:
      base - The base node ref.
      path - The relative path.
      Returns:
      The node ref to the newly created directory.
    • removeNode

      void removeNode(String ticket, NodeRef toRemove)
      Remove a node directly.
      Parameters:
      toRemove - The node ref to remove.
    • removeNode

      void removeNode(String ticket, NodeRef base, String path)
      Remove a node via a relative path.
      Parameters:
      base - The base node ref.
      path - The relative path.
    • rename

      void rename(String ticket, NodeRef base, String src, String dst)
      Rename a node
      Parameters:
      base - The base node ref.
      src - The relative source path.
      dst - The relative target path.
    • readFile

      String readFile(String ticket, NodeRef fileRef)
      Read a file directly.
      Parameters:
      fileRef - The node ref of the file.
      Returns:
      A handle.
    • readFile

      String readFile(String ticket, NodeRef base, String path)
      Read a file from a relative path.
      Parameters:
      base - The base node ref.
      path - The relative path to the file.
      Returns:
      A handle.
    • readInput

      byte[] readInput(String ticket, String handle, int count)
      Read a block of bytes over the wire.
      Parameters:
      ticket - The authentication ticket.
      handle - The remote handle.
      count - The number of bytes to try to read.
      Returns:
      A buffer of the bytes read. Length is 0 at EOF.
    • writeOutput

      void writeOutput(String ticket, String handle, byte[] buff, int count)
      Write a portion of a block of bytes over the wire.
      Parameters:
      ticket - The authentication ticket.
      handle - The remote handle.
      buff - The buffer with data.
      count - The number of bytes to write.
    • closeInputHandle

      void closeInputHandle(String ticket, String handle)
      Close a remote InputStream.
      Parameters:
      ticket - The authentication ticket.
      handle - The handle.
    • closeOutputHandle

      void closeOutputHandle(String ticket, String handle)
      Close a remote OutputStream.
      Parameters:
      ticket - The authentication ticket.
      handle - The handle.