Class RemoteSink

  • All Implemented Interfaces:
    Sink

    public class RemoteSink
    extends java.lang.Object
    implements Sink
    • Field Summary

      • Fields inherited from interface aQute.libg.remote.Sink

        version
    • Constructor Summary

      Constructors 
      Constructor Description
      RemoteSink​(java.io.File root, Source... s)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void cancel​(java.lang.String areaId)  
      boolean clearCache()  
      AreaImpl createArea​(java.lang.String areaId)
      Create a new area
      void exit()  
      int exit​(java.lang.String areaId)  
      AreaImpl getArea​(java.lang.String areaId)
      Get a specific area
      java.util.Collection<? extends Area> getAreas()
      Return a list of areas
      Welcome getWelcome​(int highest)
      Return the protocol version that must be used.
      void input​(java.lang.String areaId, java.lang.String text)  
      boolean launch​(java.lang.String areaId, java.util.Map<java.lang.String,​java.lang.String> env, java.util.List<java.lang.String> args)
      Launch
      protected AreaImpl read​(java.io.File areaDir)  
      boolean removeArea​(java.lang.String areaId)
      Remove an area
      void setSources​(Source... sources)  
      boolean sync​(java.lang.String areaId, java.util.Collection<Delta> deltas)  
      byte[] view​(java.lang.String areaId, java.lang.String path)
      View a file or dir
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RemoteSink

        public RemoteSink​(java.io.File root,
                          Source... s)
                   throws java.lang.Exception
        Throws:
        java.lang.Exception
    • Method Detail

      • getArea

        public AreaImpl getArea​(java.lang.String areaId)
                         throws java.lang.Exception
        Description copied from interface: Sink
        Get a specific area
        Specified by:
        getArea in interface Sink
        Throws:
        java.lang.Exception
      • removeArea

        public boolean removeArea​(java.lang.String areaId)
                           throws java.lang.Exception
        Description copied from interface: Sink
        Remove an area
        Specified by:
        removeArea in interface Sink
        Throws:
        java.lang.Exception
      • launch

        public boolean launch​(java.lang.String areaId,
                              java.util.Map<java.lang.String,​java.lang.String> env,
                              java.util.List<java.lang.String> args)
                       throws java.lang.Exception
        Description copied from interface: Sink
        Launch
        Specified by:
        launch in interface Sink
        Throws:
        java.lang.Exception
      • cancel

        public void cancel​(java.lang.String areaId)
                    throws java.lang.Exception
        Specified by:
        cancel in interface Sink
        Throws:
        java.lang.Exception
      • input

        public void input​(java.lang.String areaId,
                          java.lang.String text)
                   throws java.lang.Exception
        Specified by:
        input in interface Sink
        Throws:
        java.lang.Exception
      • exit

        public int exit​(java.lang.String areaId)
                 throws java.lang.Exception
        Specified by:
        exit in interface Sink
        Throws:
        java.lang.Exception
      • view

        public byte[] view​(java.lang.String areaId,
                           java.lang.String path)
                    throws java.lang.Exception
        Description copied from interface: Sink
        View a file or dir
        Specified by:
        view in interface Sink
        Throws:
        java.lang.Exception
      • exit

        public void exit()
                  throws java.lang.Exception
        Specified by:
        exit in interface Sink
        Throws:
        java.lang.Exception
      • getWelcome

        public Welcome getWelcome​(int highest)
        Description copied from interface: Sink
        Return the protocol version that must be used. The parameter passed specifies the highest supported by the caller.
        Specified by:
        getWelcome in interface Sink
      • createArea

        public AreaImpl createArea​(java.lang.String areaId)
                            throws java.lang.Exception
        Description copied from interface: Sink
        Create a new area
        Specified by:
        createArea in interface Sink
        Parameters:
        areaId - area id, or null for a new area
        Throws:
        java.lang.Exception
      • getAreas

        public java.util.Collection<? extends Area> getAreas()
        Description copied from interface: Sink
        Return a list of areas
        Specified by:
        getAreas in interface Sink
      • read

        protected AreaImpl read​(java.io.File areaDir)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • setSources

        public void setSources​(Source... sources)
      • sync

        public boolean sync​(java.lang.String areaId,
                            java.util.Collection<Delta> deltas)
                     throws java.lang.Exception
        Specified by:
        sync in interface Sink
        Throws:
        java.lang.Exception
      • clearCache

        public boolean clearCache()
        Specified by:
        clearCache in interface Sink