Interface ReplicationContentFactory


  • public interface ReplicationContentFactory
    Implements a factory that creates replication content.
    • Method Detail

      • create

        ReplicationContent create​(java.lang.String mimeType,
                                  java.io.File file,
                                  boolean isTemp)
                           throws java.io.IOException
        Creates binary replication content for the given file. note we cannot use the last modified of the file, since it's low precision.
        Parameters:
        mimeType - the mime type of the content
        file - the file containing the data
        isTemp - if true file is temporary file and will be removed after this call.
        Returns:
        the replication content
        Throws:
        java.io.IOException - if an error occurs
      • create

        ReplicationContent create​(java.lang.String mimeType,
                                  java.io.File file,
                                  long lastModified,
                                  boolean isTemp)
                           throws java.io.IOException
        Creates binary replication content for the given file. note we cannot use the last modified of the file, since it's low precision.
        Parameters:
        mimeType - the mime type of the content
        file - the file containing the data
        lastModified - the last modified time in ms.
        isTemp - if true file is temporary file and will be removed after this call.
        Returns:
        the replication content
        Throws:
        java.io.IOException - if an error occurs
      • close

        void close()
        Closes this factory and releases all allocated resources.
        Since:
        5.4