java.lang.Object
org.codelibs.jcifs.smb.internal.smb2.ServerMessageBlock2
org.codelibs.jcifs.smb.internal.smb2.ServerMessageBlock2Request<Smb2ChangeNotifyResponse>
org.codelibs.jcifs.smb.internal.smb2.notify.Smb2ChangeNotifyRequest
- All Implemented Interfaces:
CommonServerMessageBlock,CommonServerMessageBlockRequest,Request<Smb2ChangeNotifyResponse>,Message,Request
SMB2 Change Notify request message.
This command is used to monitor a directory for changes
and receive notifications when modifications occur.
- Author:
- mbechler
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intNotify when file attributes changestatic final intNotify when creation time changesstatic final intNotify when a directory name changesstatic final intNotify when extended attributes changestatic final intNotify when a file name changesstatic final intNotify when last access time changesstatic final intNotify when last write time changesstatic final intNotify when security descriptor changesstatic final intNotify when file size changesstatic final intNotify when alternate data stream name changesstatic final intNotify when alternate data stream size changesstatic final intNotify when alternate data stream is writtenstatic final intFlag to watch the directory tree recursivelyFields inherited from class org.codelibs.jcifs.smb.internal.smb2.ServerMessageBlock2
SMB2_CANCEL, SMB2_CHANGE_NOTIFY, SMB2_CLOSE, SMB2_CREATE, SMB2_ECHO, SMB2_FLAGS_ASYNC_COMMAND, SMB2_FLAGS_DFS_OPERATIONS, SMB2_FLAGS_PRIORITY_MASK, SMB2_FLAGS_RELATED_OPERATIONS, SMB2_FLAGS_REPLAY_OPERATION, SMB2_FLAGS_SERVER_TO_REDIR, SMB2_FLAGS_SIGNED, SMB2_FLUSH, SMB2_IOCTL, SMB2_LOCK, SMB2_LOGOFF, SMB2_NEGOTIATE, SMB2_OPLOCK_BREAK, SMB2_QUERY_DIRECTORY, SMB2_QUERY_INFO, SMB2_READ, SMB2_SESSION_SETUP, SMB2_SET_INFO, SMB2_TREE_CONNECT, SMB2_TREE_DISCONNECT, SMB2_WRITE -
Constructor Summary
ConstructorsConstructorDescriptionSmb2ChangeNotifyRequest(Configuration config, byte[] fileId) Constructs a change notify request -
Method Summary
Modifier and TypeMethodDescriptionprotected Smb2ChangeNotifyResponseCreate the response object for this requestprotected intreadBytesWireFormat(byte[] buffer, int bufferIndex) Reads the message body from the wire format.voidsetCompletionFilter(int completionFilter) Set the completion filter specifying which changes to monitorvoidsetNotifyFlags(int notifyFlags) Set the notification flagsintsize()Gets the size of this message.protected intwriteBytesWireFormat(byte[] dst, int dstIndex) Writes the message body to the wire format.Methods inherited from class org.codelibs.jcifs.smb.internal.smb2.ServerMessageBlock2Request
allowChain, createCancel, encode, getCreditCost, getNext, getOverrideTimeout, getResponse, ignoreDisconnect, initResponse, isCancel, isResponseAsync, setNext, setOverrideTimeout, setRequestCredits, setResponse, setTid, splitMethods inherited from class org.codelibs.jcifs.smb.internal.smb2.ServerMessageBlock2
addFlags, chain, clearFlags, decode, decode, equals, getAsyncId, getCommand, getConfig, getCredit, getCreditCharge, getDigest, getErrorContextCount, getErrorData, getFlags, getHeaderStart, getLength, getMid, getNextCommandOffset, getRawPayload, getSessionId, getStatus, getTreeId, hashCode, haveResponse, isAsync, isErrorResponseStatus, isRetainPayload, pad8, readErrorResponse, readHeaderWireFormat, reset, retainPayload, setAsyncId, setCommand, setCredit, setDigest, setExtendedSecurity, setMid, setNext, setRawPayload, setReadSize, setSessionId, setTreeId, setUid, size8, size8, toString, writeHeaderWireFormatMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.codelibs.jcifs.smb.internal.CommonServerMessageBlock
decode, getCommand, getDigest, getMid, reset, setCommand, setDigest, setExtendedSecurity, setMid, setSessionId, setUidMethods inherited from interface org.codelibs.jcifs.smb.util.transport.Message
getRawPayload, isRetainPayload, retainPayload, setRawPayload
-
Field Details
-
SMB2_WATCH_TREE
public static final int SMB2_WATCH_TREEFlag to watch the directory tree recursively- See Also:
-
FILE_NOTIFY_CHANGE_FILE_NAME
public static final int FILE_NOTIFY_CHANGE_FILE_NAMENotify when a file name changes- See Also:
-
FILE_NOTIFY_CHANGE_DIR_NAME
public static final int FILE_NOTIFY_CHANGE_DIR_NAMENotify when a directory name changes- See Also:
-
FILE_NOTIFY_CHANGE_ATTRIBUTES
public static final int FILE_NOTIFY_CHANGE_ATTRIBUTESNotify when file attributes change- See Also:
-
FILE_NOTIFY_CHANGE_SIZE
public static final int FILE_NOTIFY_CHANGE_SIZENotify when file size changes- See Also:
-
FILE_NOTIFY_CHANGE_LAST_WRITE
public static final int FILE_NOTIFY_CHANGE_LAST_WRITENotify when last write time changes- See Also:
-
FILE_NOTIFY_CHANGE_LAST_ACCESS
public static final int FILE_NOTIFY_CHANGE_LAST_ACCESSNotify when last access time changes- See Also:
-
FILE_NOTIFY_CHANGE_CREATION
public static final int FILE_NOTIFY_CHANGE_CREATIONNotify when creation time changes- See Also:
-
FILE_NOTIFY_CHANGE_EA
public static final int FILE_NOTIFY_CHANGE_EANotify when extended attributes change- See Also:
-
FILE_NOTIFY_CHANGE_SECURITY
public static final int FILE_NOTIFY_CHANGE_SECURITYNotify when security descriptor changes- See Also:
-
FILE_NOTIFY_CHANGE_STREAM_NAME
public static final int FILE_NOTIFY_CHANGE_STREAM_NAMENotify when alternate data stream name changes- See Also:
-
FILE_NOTIFY_CHANGE_STREAM_SIZE
public static final int FILE_NOTIFY_CHANGE_STREAM_SIZENotify when alternate data stream size changes- See Also:
-
FILE_NOTIFY_CHANGE_STREAM_WRITE
public static final int FILE_NOTIFY_CHANGE_STREAM_WRITENotify when alternate data stream is written- See Also:
-
-
Constructor Details
-
Smb2ChangeNotifyRequest
Constructs a change notify request- Parameters:
config- The configuration to usefileId- The file ID to monitor for changes
-
-
Method Details
-
setNotifyFlags
public void setNotifyFlags(int notifyFlags) Set the notification flags- Parameters:
notifyFlags- the notifyFlags to set
-
setCompletionFilter
public void setCompletionFilter(int completionFilter) Set the completion filter specifying which changes to monitor- Parameters:
completionFilter- the completionFilter to set
-
createResponse
protected Smb2ChangeNotifyResponse createResponse(CIFSContext tc, ServerMessageBlock2Request<Smb2ChangeNotifyResponse> req) Create the response object for this request- Specified by:
createResponsein classServerMessageBlock2Request<Smb2ChangeNotifyResponse>- Parameters:
tc- the CIFS contextreq- the request object- Returns:
- the response object
- See Also:
-
size
public int size()Gets the size of this message.- Returns:
- the size of this message
- See Also:
-
writeBytesWireFormat
protected int writeBytesWireFormat(byte[] dst, int dstIndex) Writes the message body to the wire format.- Specified by:
writeBytesWireFormatin classServerMessageBlock2- Parameters:
dst- the destination bufferdstIndex- the starting position in the buffer- Returns:
- number of bytes written
- See Also:
-
readBytesWireFormat
protected int readBytesWireFormat(byte[] buffer, int bufferIndex) Reads the message body from the wire format.- Specified by:
readBytesWireFormatin classServerMessageBlock2- Parameters:
buffer- the buffer to read frombufferIndex- the starting position in the buffer- Returns:
- number of bytes read
- See Also:
-