Package com.lariflix.jemm.reports
Class JellyfinReportEngine
java.lang.Object
com.lariflix.jemm.reports.JellyfinReportEngine
The JellyfinReportEngine class extends the Thread class and is used to generate reports from a Jellyfin server.
This class runs in its own thread to prevent blocking the main application thread.
extends Thread
- Author:
- Cesar Bianchi
-
Constructor Summary
ConstructorsConstructorDescriptionJellyfinReportEngine
(JellyfinReportTypes rpType, JellyfinInstanceDetails instData) Constructor for the JellyfinReportEngine class. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the instanceData property of this JellyfinReportEngine.Retrieves the reportType property of this JellyfinReportEngine.boolean
isDone()
Checks if the report generation is done.void
run()
The main execution method for the JellyfinReportEngine thread.void
setInstanceData
(JellyfinInstanceDetails instanceData) Sets the instanceData property of this JellyfinReportEngine.void
setReportType
(JellyfinReportTypes reportType) Sets the reportType property of this JellyfinReportEngine.void
start()
-
Constructor Details
-
JellyfinReportEngine
Constructor for the JellyfinReportEngine class.- Parameters:
rpType
- A JellyfinReportTypes object representing the type of report to generate. This could be any of the types defined in the JellyfinReportTypes class.instData
- A JellyfinInstanceDetails object containing the details of the Jellyfin instance from which to generate the report. This includes the URL, API token, and other necessary details.- Since:
- 1.1
-
-
Method Details
-
start
public void start() -
run
public void run()The main execution method for the JellyfinReportEngine thread. This method is called when the thread is started. It generates a report based on the report type set in the JellyfinReportEngine object. The report is generated by calling the appropriate print method for the report type. Once the report is generated, the method sets the isDone flag to true and notifies any threads that are waiting on this object's monitor.- Since:
- 1.1
-
getReportType
Retrieves the reportType property of this JellyfinReportEngine.- Returns:
- A JellyfinReportTypes object representing the reportType of this JellyfinReportEngine. This could be any of the types defined in the JellyfinReportTypes class.
- Since:
- 1.1
-
setReportType
Sets the reportType property of this JellyfinReportEngine.- Parameters:
reportType
- A JellyfinReportTypes object that should be used as the new reportType for this JellyfinReportEngine. This could be any of the types defined in the JellyfinReportTypes class.- Since:
- 1.1
-
getInstanceData
Retrieves the instanceData property of this JellyfinReportEngine.- Returns:
- A JellyfinInstanceDetails object representing the instanceData of this JellyfinReportEngine. This includes the URL, API token, and other necessary details.
- Since:
- 1.1
-
setInstanceData
Sets the instanceData property of this JellyfinReportEngine.- Parameters:
instanceData
- A JellyfinInstanceDetails object that should be used as the new instanceData for this JellyfinReportEngine. This includes the URL, API token, and other necessary details.- Since:
- 1.1
-
isDone
public boolean isDone()Checks if the report generation is done.- Returns:
- A boolean value indicating whether the report generation is done. Returns true if the report generation is done, false otherwise.
- Since:
- 1.1
-