Class ProxyModule

All Implemented Interfaces:
ECpdsProxy, Closeable, AutoCloseable
Direct Known Subclasses:
ECauthModule

public abstract class ProxyModule extends TransferModule implements ECpdsProxy
The Class ProxyModule.
  • Constructor Details

    • ProxyModule

      public ProxyModule()
  • Method Details

    • setOutputStream

      public void setOutputStream(OutputStream out)
      Sets the output stream. Sets the output stream.
      Specified by:
      setOutputStream in interface ECpdsProxy
      Parameters:
      out - the new output stream
    • setInputStream

      public void setInputStream(InputStream in)
      Sets the input stream. Sets the input stream.
      Specified by:
      setInputStream in interface ECpdsProxy
      Parameters:
      in - the new input stream
    • put

      public abstract void put(String name, long posn, long size, ProxySocket socket) throws Exception
      Puts the.
      Parameters:
      name - the name
      posn - the posn
      size - the size
      socket - the socket
      Throws:
      Exception - the exception
    • put

      public OutputStream put(String name, long posn, long size) throws IOException
      Provide an output stream to write the content of the file given by its name starting at position posn. Put.
      Specified by:
      put in class TransferModule
      Parameters:
      name - the name
      posn - the posn
      size - the size
      Returns:
      the output stream
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • get

      public abstract void get(String name, long posn, ProxySocket socket) throws Exception
      Gets the.
      Parameters:
      name - the name
      posn - the posn
      socket - the socket
      Throws:
      Exception - the exception
    • get

      public InputStream get(String name, long posn) throws IOException
      Gets the input stream to read the file given by name starting at posn. Gets the.
      Specified by:
      get in class TransferModule
      Parameters:
      name - the name
      posn - the posn
      Returns:
      the input stream
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • remove

      public abstract void remove(boolean closedOnError) throws IOException
      Removes the.
      Parameters:
      closedOnError - the closed on error
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • close

      public void close() throws IOException
      Close.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException
    • check

      public void check(long sent, String checksum) throws IOException
      Check if the last put was successful comparing the number of bytes sent and the checksum provided to the one calculated. By default, doing nothing. Check.
      Overrides:
      check in class TransferModule
      Parameters:
      sent - the sent
      checksum - the checksum
      Throws:
      IOException - Signals that an I/O exception has occurred.