org.openstreetmap.osmosis.core.merge.v0_5
Class ChangeDownloader

java.lang.Object
  extended by org.openstreetmap.osmosis.core.merge.v0_5.ChangeDownloader
All Implemented Interfaces:
java.lang.Runnable, Task, ChangeSource, RunnableChangeSource

public class ChangeDownloader
extends java.lang.Object
implements RunnableChangeSource

Downloads a set of change files from a HTTP server, and merges them into a single output stream. It tracks the intervals covered by the current files and stores the current timestamp between invocations forming the basis of a replication mechanism.

Author:
Brett Henderson

Constructor Summary
ChangeDownloader(java.lang.String taskId, java.io.File workingDirectory)
          Creates a new instance.
 
Method Summary
 void run()
          
 void setChangeSink(ChangeSink changeSink)
          Sets the change sink to send data to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChangeDownloader

public ChangeDownloader(java.lang.String taskId,
                        java.io.File workingDirectory)
Creates a new instance.

Parameters:
taskId - The identifier for the task, this is required because the names of threads created by this task will use this name as a prefix.
workingDirectory - The directory containing configuration and tracking files.
Method Detail

setChangeSink

public void setChangeSink(ChangeSink changeSink)
Sets the change sink to send data to.

Specified by:
setChangeSink in interface ChangeSource
Parameters:
changeSink - The sink for receiving all produced data.

run

public void run()

Specified by:
run in interface java.lang.Runnable