Gridarta Editor
net.sf.gridarta.commands.Collector Class Reference

A Collector is capable of iterating over a collection of {Collectables} and collecting them in a separate. More...

+ Collaboration diagram for net.sf.gridarta.commands.Collector:

Public Member Functions

 Collector (@NotNull final Progress progress, @NotNull final AbstractResources<?, ?, ?> resources, @NotNull final File collectedDirectory)
 Creates a new instance. More...
 
void start ()
 Starts collecting. More...
 
void waitUntilFinished () throws InterruptedException, IOException
 Waits until collection has finished. More...
 

Private Member Functions

void run () throws IOException
 Collect the existing arches and create archive-files for editor use as well as the Crossfire or Daimonin server. More...
 

Private Attributes

final File collectedDirectory
 The destination directory to write files to. More...
 
IOException ioException
 The I/O error if collection fails or. More...
 
final Progress progress
 The Progress to use. More...
 
final AbstractResources<?, ?, ?> resources
 The Collectables. More...
 
Thread thread
 The worker thread. More...
 

Detailed Description

A Collector is capable of iterating over a collection of {Collectables} and collecting them in a separate.

Thread

with a nice GUI.

Author
Christian Hujer

Definition at line 35 of file Collector.java.

Constructor & Destructor Documentation

◆ Collector()

net.sf.gridarta.commands.Collector.Collector ( @NotNull final Progress  progress,
@NotNull final AbstractResources<?, ?, ?>  resources,
@NotNull final File  collectedDirectory 
)

Creates a new instance.

Parameters
progressthe progress to use
resourcesthe resources to collect
collectedDirectorythe destination directory to write files to

Definition at line 74 of file Collector.java.

References net.sf.gridarta.model.resource.AbstractResources< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.canWriteCollected(), net.sf.gridarta.commands.Collector.collectedDirectory, net.sf.gridarta.commands.Collector.progress, and net.sf.gridarta.commands.Collector.resources.

+ Here is the call graph for this function:

Member Function Documentation

◆ run()

void net.sf.gridarta.commands.Collector.run ( ) throws IOException
private

Collect the existing arches and create archive-files for editor use as well as the Crossfire or Daimonin server.

The arches also get a special path variable included which is used in the editor to categorize the arches.

Output is: "archetypes", "daimonin.0" / "crossfire.0", "animations", "bmaps"

Exceptions
IOExceptionif collection fails

Definition at line 120 of file Collector.java.

References net.sf.gridarta.commands.Collector.collectedDirectory, net.sf.gridarta.commands.Collector.progress, net.sf.gridarta.commands.Collector.resources, and net.sf.gridarta.model.resource.AbstractResources< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.writeCollected().

Referenced by net.sf.gridarta.commands.Collector.start().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ start()

◆ waitUntilFinished()

void net.sf.gridarta.commands.Collector.waitUntilFinished ( ) throws InterruptedException, IOException

Waits until collection has finished.

Exceptions
InterruptedExceptionif waiting was interrupted
IOExceptionif collection failed

Definition at line 102 of file Collector.java.

References net.sf.gridarta.commands.Collector.ioException, and net.sf.gridarta.commands.Collector.thread.

Referenced by net.sf.gridarta.commands.CollectArchesCommand.execute(), and net.sf.gridarta.action.CollectArchesAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.newExiterListener().

+ Here is the caller graph for this function:

Member Data Documentation

◆ collectedDirectory

final File net.sf.gridarta.commands.Collector.collectedDirectory
private

The destination directory to write files to.

Definition at line 47 of file Collector.java.

Referenced by net.sf.gridarta.commands.Collector.Collector(), and net.sf.gridarta.commands.Collector.run().

◆ ioException

IOException net.sf.gridarta.commands.Collector.ioException
private

The I/O error if collection fails or.

null

if no exception occurred.

Definition at line 66 of file Collector.java.

Referenced by net.sf.gridarta.commands.Collector.start(), and net.sf.gridarta.commands.Collector.waitUntilFinished().

◆ progress

final Progress net.sf.gridarta.commands.Collector.progress
private

The Progress to use.

Definition at line 53 of file Collector.java.

Referenced by net.sf.gridarta.commands.Collector.Collector(), and net.sf.gridarta.commands.Collector.run().

◆ resources

final AbstractResources<?, ?, ?> net.sf.gridarta.commands.Collector.resources
private

The Collectables.

Definition at line 41 of file Collector.java.

Referenced by net.sf.gridarta.commands.Collector.Collector(), and net.sf.gridarta.commands.Collector.run().

◆ thread

Thread net.sf.gridarta.commands.Collector.thread
private

The documentation for this class was generated from the following file: