-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handling file transfer progress (#39)
* Modifying how the sockets connections is processed * Adding factory changes * Excluding communication api dependency * Removing unnecesary files * Updating dhash layer * Adding dhash changes * Adding new transfer communication methods * Adding receive method * Integration tests worked * Defining MessageStream and resources classes * Changing resources approach, removing checksum * New classes and serialization is working, integration tests passes * Async operations. Integrations tests passed * Refactoring * Refactoring * Refactoring * Refactoring * Message refactoring * Changing log api * Refactoring. Integration tests working * Adding close to Resource interface * Adding unit tests * Adding unit tests * Using LocalFileResource * Defining versions and publishing * Updating readme
- Loading branch information
Showing
137 changed files
with
2,781 additions
and
2,843 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
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
21 changes: 21 additions & 0 deletions
21
...cation-api/src/main/java/co/edu/uniquindio/utils/communication/message/MessageStream.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,21 @@ | ||
package co.edu.uniquindio.utils.communication.message; | ||
|
||
import lombok.Builder; | ||
import lombok.Data; | ||
|
||
import java.io.Closeable; | ||
import java.io.IOException; | ||
import java.io.InputStream; | ||
|
||
@Builder | ||
@Data | ||
public class MessageStream implements Closeable{ | ||
private final Message message; | ||
private transient final InputStream inputStream; | ||
private final Long size; | ||
|
||
@Override | ||
public void close() throws IOException { | ||
this.inputStream.close(); | ||
} | ||
} |
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
7 changes: 7 additions & 0 deletions
7
...n-api/src/main/java/co/edu/uniquindio/utils/communication/transfer/ConnectionHandler.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,7 @@ | ||
package co.edu.uniquindio.utils.communication.transfer; | ||
|
||
import java.net.Socket; | ||
|
||
public interface ConnectionHandler { | ||
void handle(Socket socket); | ||
} |
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
5 changes: 5 additions & 0 deletions
5
.../src/main/java/co/edu/uniquindio/utils/communication/transfer/ProgressStatusTransfer.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,5 @@ | ||
package co.edu.uniquindio.utils.communication.transfer; | ||
|
||
public interface ProgressStatusTransfer { | ||
void status(String name, Long current, Long size); | ||
} |
10 changes: 10 additions & 0 deletions
10
...ation-api/src/main/java/co/edu/uniquindio/utils/communication/transfer/StreamManager.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,10 @@ | ||
package co.edu.uniquindio.utils.communication.transfer; | ||
|
||
import co.edu.uniquindio.utils.communication.message.Message; | ||
import co.edu.uniquindio.utils.communication.message.MessageStream; | ||
|
||
public interface StreamManager { | ||
MessageStream receive(Message message, ProgressStatusTransfer progressStatusTransfer); | ||
|
||
void send(MessageStream messageStream, ProgressStatusTransfer progressStatusTransfer); | ||
} |
Oops, something went wrong.