[jcifs] Can JCIFS subscribe to a file change modification from SMB?
Christopher R. Hertel
crh at ubiqx.mn.org
Wed Nov 14 10:29:49 MST 2012
The NT_TRANSACT_NOTIFY_CHANGE request is an SMB transaction, not an MS-RPC
call. It is carried within an SMB_COM_NT_TRANSACT exchange, and MS-RPC
messages are transported over SMB_COM_TRANSACTIONs which are a little bit
different.
The SMB and MS-RPC mechanisms are quite similar, however, and that may be
what Mike means here.
Note that any outstanding notification request counts against the
MaxMpxCount limit.
Chris -)-----
On 11/14/2012 10:51 AM, Michael B Allen wrote:
> On Thu, Oct 11, 2012 at 3:39 PM, rickbliss <rick.blss at gmail.com> 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
>
--
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
Samba Team -- http://www.samba.org/ -)----- Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/ -)----- ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/ -)----- crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/ -)----- crh at ubiqx.org
More information about the jCIFS
mailing list