org.apache.ace.gateway.log.task
Class LogSyncTask

java.lang.Object
  extended by org.apache.ace.gateway.log.task.LogSyncTask
All Implemented Interfaces:
Runnable

public class LogSyncTask
extends Object
implements Runnable


Constructor Summary
LogSyncTask(String endpoint)
           
 
Method Summary
protected  org.apache.ace.log.LogDescriptor getDescriptor(InputStream queryInput)
          Retrieves a LogDescriptor object from the specified stream.
 void run()
          Synchronize the log events available remote with the events available locally.
protected  void synchronizeLog(long logID, InputStream queryInput, Connection sendConnection)
          Synchronizes a single log (there can be multiple log/logid's per gateway).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogSyncTask

public LogSyncTask(String endpoint)
Method Detail

run

public void run()
Synchronize the log events available remote with the events available locally.

Specified by:
run in interface Runnable

synchronizeLog

protected void synchronizeLog(long logID,
                              InputStream queryInput,
                              Connection sendConnection)
                       throws IOException
Synchronizes a single log (there can be multiple log/logid's per gateway).

Parameters:
logID - ID of the log to synchronize.
queryInput - Stream pointing to a query result for the events available remotely for this log id
sendConnection - .getOutputStream() Stream to write the events to that are missing on the remote side.
Throws:
IOException - If synchronization could not be completed due to an I/O failure.

getDescriptor

protected org.apache.ace.log.LogDescriptor getDescriptor(InputStream queryInput)
                                                  throws IOException
Retrieves a LogDescriptor object from the specified stream.

Parameters:
queryInput - Stream containing a LogDescriptor object.
Returns:
LogDescriptor object reflecting the range contained in the stream.
Throws:
IOException - If no range could be determined due to an I/O failure.


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.