This project has retired. For details please refer to its Attic page.
ArchivaArtifactConsumer

org.apache.maven.archiva.database.updater
Interface ArchivaArtifactConsumer

Package class diagram package ArchivaArtifactConsumer
All Superinterfaces:
Consumer
All Known Subinterfaces:
DatabaseCleanupConsumer, DatabaseUnprocessedArtifactConsumer
All Known Implementing Classes:
DatabaseCleanupRemoveArtifactConsumer, DatabaseCleanupRemoveProjectConsumer, DuplicateArtifactsConsumer, LocationArtifactsConsumer, LuceneCleanupRemoveIndexedConsumer, ProjectModelToDatabaseConsumer

public interface ArchivaArtifactConsumer
extends Consumer

ArchivaArtifactConsumer - consumer for ArchivaArtifact objects.


Method Summary
 void beginScan()
           Event that triggers at the beginning of a scan.
 void completeScan()
           Event that triggers on the completion of a scan.
 java.util.List<java.lang.String> getIncludedTypes()
          Get the list of included file patterns for this consumer.
 void processArchivaArtifact(ArchivaArtifact artifact)
           Event indicating an ArchivaArtifact is to be processed by this consumer.
 
Methods inherited from interface org.apache.maven.archiva.consumers.Consumer
addConsumerMonitor, getDescription, getId, isPermanent, removeConsumerMonitor
 

Method Detail

getIncludedTypes

java.util.List<java.lang.String> getIncludedTypes()
Get the list of included file patterns for this consumer.

Returns:
the list of (String) artifact types to process.

beginScan

void beginScan()

Event that triggers at the beginning of a scan.

NOTE: This would be a good place to initialize the consumer, to lock any resources, and to generally start tracking the scan as a whole.


processArchivaArtifact

void processArchivaArtifact(ArchivaArtifact artifact)
                            throws ConsumerException

Event indicating an ArchivaArtifact is to be processed by this consumer.

NOTE: The consumer does not need to process the artifact immediately, can can opt to queue and/or track the artifact to be processed in batch. Just be sure to complete the processing by the completeScan() event.

Parameters:
file - the file to process.
Throws:
ConsumerException - if there was a problem processing this file.

completeScan

void completeScan()

Event that triggers on the completion of a scan.

NOTE: If the consumer opted to batch up processing requests in the processArchivaArtifact(ArchivaArtifact) event this would be the last opportunity to drain any processing queue's.