Re: Can JCIFS subscribe to a file change modification from SMB?
Michael B Allen <[email protected]> Wed, 14 Nov 2012 11:51:20 -0500
| Newsgroups | gmane.network.samba.java |
|---|---|
| Message-ID | <CAGMFw4g1UvFaCDDhrbmzdtk5d1DcU+r9t2d0ryxVX3y02Y64kQ@mail.gmail.com> |
On Thu, Oct 11, 2012 at 3:39 PM, rickbliss <[email protected]> wrote: > It looks as though SMB supports a notification event when a directory is > changed [http://msdn.microsoft.com/en-us/library/ee380523(prot.20).aspx] ; > however, i am having diffuculty implementing this with JCIFS. i dont want > to store an array and poll for changes, i would think that JCIFS could > subscribe , or recognize a change event? Please help. Hi Rick, JCIFS does not implement the file change event part of the protocol. But it does have a pretty good MS-RPC framework under the hood that users have been successful in using to implement new functionality. You could add a method like SmbFile.addNotifyHandler(FileChangeHandler) and then call-back if something changes and so on. Look at jcifs.smb.SID.getServerSid as a good self-contained starting point for making an MS-RPC call. If you do the work, please post a patch. Also look in the patches directory to make sure someone has not already submitted the work. Mike -- Michael B Allen Java Active Directory Integration http://www.ioplex.com/