bee.api
Loader
org.eclipse.aether.AbstractRepositoryListener
org.eclipse.aether.RepositoryListener
org.eclipse.aether.transfer.TransferListener
Manages data transfers (downloading and uploading) and reports progress to the user interface. This class listens to Maven repository events (via AbstractRepositoryListener) and transfer events (via TransferListener) to provide real-time feedback on artifact resolution and deployment, as well as handling direct downloads via HTTP.
artifactInstalled
(org.eclipse.aether.RepositoryEvent
event
)
void
org.eclipse.aether.RepositoryEvent
event
)org.eclipse.aether.RepositoryEvent event |
Logs information about an artifact being installed into the local repository.
transferInitiated
(org.eclipse.aether.transfer.TransferEvent
event
)
void
org.eclipse.aether.transfer.TransferEvent
event
)org.eclipse.aether.transfer.TransferEvent event |
Called when a transfer is initiated (e.g., a download or upload is requested). Registers the transfer item with the appropriate manager.
transferStarted
(org.eclipse.aether.transfer.TransferEvent
event
)
void
org.eclipse.aether.transfer.TransferEvent
event
)org.eclipse.aether.transfer.TransferEvent event |
|
org.eclipse.aether.transfer.TransferCancelledException |
Called when the transfer actually starts after initiation. Currently, no specific action is taken here.
transferProgressed
(org.eclipse.aether.transfer.TransferEvent
event
)
void
org.eclipse.aether.transfer.TransferEvent
event
)org.eclipse.aether.transfer.TransferEvent event |
Called periodically as data is transferred. Updates the progress display in the UI, throttled by the defined interval.
transferSucceeded
(org.eclipse.aether.transfer.TransferEvent
event
)
void
org.eclipse.aether.transfer.TransferEvent
event
)org.eclipse.aether.transfer.TransferEvent event |
Called when a transfer completes successfully. Logs the completion message and removes the item from the corresponding manager.
transferFailed
(org.eclipse.aether.transfer.TransferEvent
event
)
void
org.eclipse.aether.transfer.TransferEvent
event
)org.eclipse.aether.transfer.TransferEvent event |
Called when a transfer fails (e.g., network error, file not found), excluding corruption. Removes the item from the manager and logs an error.
transferCorrupted
(org.eclipse.aether.transfer.TransferEvent
event
)
void
org.eclipse.aether.transfer.TransferEvent
event
)org.eclipse.aether.transfer.TransferEvent event |
Called when a transfer fails specifically due to data corruption (e.g., checksum mismatch). Removes the item from the manager and logs a corruption error.
download
(String
uri
)
psychopath.File
String
uri
)String uri |
The string representation of the URI to download from. |
psychopath.File |
A File object representing the downloaded content in a temporary location. |
Downloads a file from the specified URI to a temporary file location.
This method blocks until the download is complete or fails.
Progress is reported using the singleton Loader
instance.
download
(String
uri
, psychopath.File
file
)
void
String
uri
, psychopath.File
file
)String uri |
The string representation of the URI to download from. |
psychopath.File file |
The destination File to save the downloaded content to. |
Downloads a file from the specified URI and saves it to the provided File
destination.
This method blocks until the download is complete or fails.
Progress is reported using the singleton Loader
instance.
Note: The method name "donwload" contains a typo (should be "download"). It is kept here for compatibility with existing code that might call it.