public class NotifyRequest
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static long |
DefaultRequestTimeout |
Constructor and Description |
---|
NotifyRequest(int filter,
boolean watchTree,
SMBSrvSession sess,
NetworkFile dir,
int mid,
int tid,
int pid,
int uid,
int qlen)
Class constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addEvent(NotifyChangeEvent evt)
Add a buffered notification event, to be sent when the notify request is reset by the client
|
void |
clearBufferedEvents()
Clear the buffered event list, do not destroy the list
|
NotifyChangeEventList |
getBufferedEventList()
Return the buffered notification event list
|
NetworkFile |
getDirectory()
Get the directory being watched
|
DiskDeviceContext |
getDiskContext()
Get the associated disk context
|
long |
getExpiryTime()
Return the expiry time that a completed request must be reset by before being removed from
the queue.
|
int |
getFilter()
Get the notify change filter
|
int |
getMaximumQueueLength()
Return the maximum number of notifications to buffer whilst waiting for the request to be reset
|
int |
getMultiplexId()
Get the multiplex-id of the request
|
int |
getProcessId()
Get the process id of the request
|
SMBSrvSession |
getSession()
Get the session that posted the notify request
|
int |
getTreeId()
Get the tree id of the request
|
int |
getUserId()
Get the user id of the request
|
java.lang.String |
getWatchPath()
Get the normalised watch path
|
boolean |
hasAttributeChange()
Determine if the filter has attribute change notification
|
boolean |
hasBufferedEvents()
Determine if there are buffered events
|
boolean |
hasDirectoryNameChange()
Determine if the filter has directory name change notification, triggered if a directory is created or deleted.
|
boolean |
hasExpired(long curTime)
Determine if the request has expired
|
boolean |
hasFileAccessTimeChange()
Determine if the filter has last access time change notification
|
boolean |
hasFileCreateTimeChange()
Determine if the filter has creation time change notification
|
boolean |
hasFileNameChange()
Determine if the filter has file name change notification, triggered if a file is created, renamed or deleted
|
boolean |
hasFileSizeChange()
Determine if the filter has file size change notification
|
boolean |
hasFileWriteTimeChange()
Determine if the filter has last write time change notification
|
boolean |
hasFilter(int flag)
Check if the change filter has the specified flag enabled
|
boolean |
hasNotifyEnum()
Check if the notify enum flag is set
|
boolean |
hasSecurityDescriptorChange()
Determine if the filter has the security descriptor change notification
|
boolean |
hasWatchTree()
Determine if sub-directories of the directory being watched should also trigger notifications
|
boolean |
isCompleted()
Determine if the request has completed
|
void |
removeAllEvents()
Remove all buffered events from the request
|
void |
setCompleted(boolean comp)
Set the request completed flag
|
void |
setCompleted(boolean comp,
long expires)
Set the request completed flag and set an expiry time when the request expires
|
protected void |
setDiskContext(DiskDeviceContext ctx)
Set the associated disk device context
|
void |
setMultiplexId(int mid)
Set the multiplex id for the notification
|
void |
setNotifyEnum(boolean ena)
Set/clear the notify enum flag that indicates if there have been many file changes
|
java.lang.String |
toString()
Return the notify request as a string
|
public static final long DefaultRequestTimeout
public NotifyRequest(int filter, boolean watchTree, SMBSrvSession sess, NetworkFile dir, int mid, int tid, int pid, int uid, int qlen)
filter
- intwatchTree
- booleansess
- SMBSrvSessiondir
- NetworkFilemid
- inttid
- intpid
- intuid
- intqlen
- intpublic final int getFilter()
public final boolean isCompleted()
public final boolean hasExpired(long curTime)
curTime
- longpublic final boolean hasFileNameChange()
public final boolean hasDirectoryNameChange()
public final boolean hasAttributeChange()
public final boolean hasFileSizeChange()
public final boolean hasFileWriteTimeChange()
public final boolean hasFileAccessTimeChange()
public final boolean hasFileCreateTimeChange()
public final boolean hasSecurityDescriptorChange()
public final boolean hasFilter(int flag)
flag
- public final boolean hasNotifyEnum()
public final boolean hasWatchTree()
public final SMBSrvSession getSession()
public final NetworkFile getDirectory()
public final java.lang.String getWatchPath()
public final int getMultiplexId()
public final int getTreeId()
public final int getProcessId()
public final int getUserId()
public final long getExpiryTime()
public final DiskDeviceContext getDiskContext()
public final int getMaximumQueueLength()
public final boolean hasBufferedEvents()
public final NotifyChangeEventList getBufferedEventList()
public final void addEvent(NotifyChangeEvent evt)
evt
- NotifyChangeEventpublic final void removeAllEvents()
public final void clearBufferedEvents()
public final void setNotifyEnum(boolean ena)
ena
- booleanprotected final void setDiskContext(DiskDeviceContext ctx)
ctx
- DiskDeviceContextpublic final void setMultiplexId(int mid)
mid
- intpublic final void setCompleted(boolean comp)
comp
- booleanpublic final void setCompleted(boolean comp, long expires)
comp
- booleanexpires
- longpublic java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.