rendsite.notice
Class FileNotice_ChangeFile

java.lang.Object
  extended by rendsite.notice.FileNotice
      extended by rendsite.notice.FileNotice_ChangeFile
All Implemented Interfaces:
things.thinger.io.conduits.PushDrain

public class FileNotice_ChangeFile
extends FileNotice
implements things.thinger.io.conduits.PushDrain

File notice sink for a change file.

Author:
erich Version History
 10NOV09 - EPG - First package release.
 

Field Summary
 
Fields inherited from class rendsite.notice.FileNotice
ATTR_FILE_PATH, conduit, FILE_CHANGE_CHANGE_DELETE, FILE_CHANGE_CHANGE_FAILED, FILE_CHANGE_CHANGED, fileChangeConduit
 
Constructor Summary
FileNotice_ChangeFile(things.thinger.io.conduits.ConduitController controller, things.common.WhoAmI id, java.io.File theFile)
          Set up a file notifier.
 
Method Summary
 void dispose()
          Dispose the notifier or sink.
protected  void finalize()
          Finalizer.
 void init(things.thinger.io.conduits.ConduitID yourId)
          Initialize the PushDrain.
 things.data.Receipt postListener(things.data.Data n)
          Listen for a post.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileNotice_ChangeFile

public FileNotice_ChangeFile(things.thinger.io.conduits.ConduitController controller,
                             things.common.WhoAmI id,
                             java.io.File theFile)
                      throws java.lang.Throwable
Set up a file notifier. It needs access to the conduit controller and a given ID.

Parameters:
controller - the conduit controller
id - the given ID.
theFile - where to write the changes.
Throws:
java.lang.Throwable
Method Detail

dispose

public void dispose()
             throws java.lang.Throwable
Dispose the notifier or sink. Generally, you'll have to do this yourself instead of relying on finalization, since the conduits will hold references to these objects. The implementation should deregister from the conduit controller.

Specified by:
dispose in class FileNotice
Throws:
java.lang.Throwable - for any problem. The should all be FAULTS.

init

public void init(things.thinger.io.conduits.ConduitID yourId)
          throws things.thinger.SystemException
Initialize the PushDrain. This will be called by it's controller. An subsequent calls may result in a PANIC SystemException. Don't do it!

Specified by:
init in interface things.thinger.io.conduits.PushDrain
Parameters:
yourId - The ConduitID for this PushDrain.
Throws:
things.thinger.SystemException
See Also:
ConduitID

postListener

public things.data.Receipt postListener(things.data.Data n)
                                 throws things.thinger.SystemException
Listen for a post. Consumers should implement this.

Specified by:
postListener in interface things.thinger.io.conduits.PushDrain
Parameters:
n - The data to post.
Returns:
a receipt
Throws:
things.thinger.SystemException

finalize

protected void finalize()
                 throws java.lang.Throwable
Finalizer. Note that this will not happen

Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable - for bugs.


rendsite.