Refractor packages

This commit is contained in:
Andrea Cavalli 2020-09-24 11:59:46 +02:00
parent 463b0ccf35
commit 91b33a2baa
14 changed files with 20 additions and 12 deletions

View File

@ -1,5 +1,6 @@
module org.warp.filesponge {
exports org.warp.filesponge.api;
exports org.warp.filesponge.value;
requires lombok;
requires org.jetbrains.annotations;
}

View File

@ -21,7 +21,7 @@ package org.warp.filesponge;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import org.warp.filesponge.api.FileSource;
import org.warp.filesponge.api.MirrorURI;
import org.warp.filesponge.value.MirrorURI;
@AllArgsConstructor(access = AccessLevel.PRIVATE)
public abstract class BaseMirrorFileSource implements FileSource {

View File

@ -25,9 +25,9 @@ import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.jetbrains.annotations.NotNull;
import org.warp.filesponge.api.FileAccessor;
import org.warp.filesponge.api.FileContent;
import org.warp.filesponge.api.FileStatus;
import org.warp.filesponge.api.FileURI;
import org.warp.filesponge.value.FileContent;
import org.warp.filesponge.value.FileStatus;
import org.warp.filesponge.value.FileURI;
/**
* Prevent access to other methods via casting

View File

@ -21,6 +21,9 @@ package org.warp.filesponge.api;
import java.util.Optional;
import java.util.concurrent.CompletableFuture;
import org.jetbrains.annotations.NotNull;
import org.warp.filesponge.value.FileContent;
import org.warp.filesponge.value.FileStatus;
import org.warp.filesponge.value.FileURI;
/**
* FileAccessor can be used to access files from the client side

View File

@ -21,6 +21,7 @@ package org.warp.filesponge.api;
import java.time.Duration;
import java.util.Optional;
import org.jetbrains.annotations.Nullable;
import org.warp.filesponge.value.FileURI;
/**
* FileActor sends signals to a mirror

View File

@ -20,6 +20,9 @@ package org.warp.filesponge.api;
import java.nio.ByteBuffer;
import org.jetbrains.annotations.NotNull;
import org.warp.filesponge.value.FileSourceAvailability;
import org.warp.filesponge.value.FileType;
import org.warp.filesponge.value.FileURI;
/**
* FileSource receives responses from a mirror

View File

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.warp.filesponge.api;
package org.warp.filesponge.value;
public enum FileAvailability {
UNKNOWN,

View File

@ -16,6 +16,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.warp.filesponge.api;
package org.warp.filesponge.value;
public interface FileContent {}

View File

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.warp.filesponge.api;
package org.warp.filesponge.value;
public enum FileDataAvailability {
UNAVAILABLE,

View File

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.warp.filesponge.api;
package org.warp.filesponge.value;
public enum FileSourceAvailability {
DOWNLOADABLE,

View File

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.warp.filesponge.api;
package org.warp.filesponge.value;
import java.util.Optional;
import lombok.Value;

View File

@ -16,6 +16,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.warp.filesponge.api;
package org.warp.filesponge.value;
public interface FileType {}

View File

@ -16,6 +16,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.warp.filesponge.api;
package org.warp.filesponge.value;
public interface FileURI {}

View File

@ -16,6 +16,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.warp.filesponge.api;
package org.warp.filesponge.value;
public interface MirrorURI {}