-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: introduce
RemoteResource<T>
interface (#712)
* chore: move DownloadException and DownloadUtils to `remote` package * feat: add `RemoteResource` interface * feat: make GameRelease a RemoteResource * chore: implement GameManager#download with DownloadUtils * inline use of (deprecated) GameManager::getFileNameFor * chore: remove unused import --------- Co-authored-by: jdrueckert <[email protected]>
- Loading branch information
1 parent
8237b1e
commit 13f4108
Showing
6 changed files
with
104 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...logy/launcher/util/DownloadException.java → ...gy/launcher/remote/DownloadException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/main/java/org/terasology/launcher/remote/RemoteResource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright 2023 The Terasology Foundation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package org.terasology.launcher.remote; | ||
|
||
import java.net.URL; | ||
|
||
public interface RemoteResource<T> { | ||
|
||
URL getUrl(); | ||
|
||
String getFilename(); | ||
|
||
T getInfo(); | ||
|
||
//TODO: String getChecksum(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters