Version: Beta-4.1.1-r5927-b91
OmeroBlitz Api
omero::grid::monitors::MonitorServer
Overview
interface MonitorServer
Operation Index
- createMonitor
-
Create a monitor of events.
- startMonitor
-
Start an existing monitor.
- stopMonitor
-
Stop an existing monitor.
- destroyMonitor
-
Destroy an existing monitor.
- getMonitorState
-
Get the state of an existing monitor.
- getMonitorDirectory
-
Get the directory relative to an existing monitor on an OMERO.fs server.
- getDirectory
-
Get an absolute directory from an OMERO.fs server.
- fileExists
-
Query the existence of a file
An exception will be raised if the method fails to determine the existence.
- getBaseName
-
Get base name of a file, this is the name
stripped of any path, e.g.
- getStats
-
Get all FileStats of a file
An exception will be raised if the file no longer exists or is inaccessible.
- getSize
-
Get size of a file in bytes
An exception will be raised if the file no longer exists or is inaccessible.
- getOwner
-
Get owner of a file
An exception will be raised if the file no longer exists or is inaccessible.
- getCTime
-
Get ctime of a file
An exception will be raised if the file no longer exists or is inaccessible.
- getMTime
-
Get mtime of a file
An exception will be raised if the file no longer exists or is inaccessible.
- getATime
-
Get atime of a file
An exception will be raised if the file no longer exists or is inaccessible.
- isDir
-
Query whether file is a directory
An exception will be raised if the file no longer exists or is inaccessible.
- isFile
-
Query whether file is a file
An exception will be raised if the file no longer exists or is inaccessible.
- getSHA1
-
Get SHA1 of a file
An exception will be raised if the file no longer exists or is inaccessible.
- readBlock
-
readBlock should open, read size bytes from offset
and then close the file.
Operations
string createMonitor(MonitorType mType, WatchEventList eTypes, PathMode pMode, string pathString, ::Ice::StringSeq whitelist, ::Ice::StringSeq blacklist, float timeout, int blockSize, bool ignoreSysFiles, bool ignoreDirEvents, MonitorClient* proxy) throws OmeroFSError
Create a monitor of events.
A exception will be raised if the event type or path mode is not supported by
the Monitor implementation for a given OS. An exception will be raised if the
path does not exist or is inaccessible to the monitor. An exception will be raised
if a monitor cannot be created for any other reason.
Parameters
- mType,
-
type of monitor to create (MonitorType).
- eTypes,
-
a sequence of watch event type to monitor (WatchEventTypeList).
- pathString,
-
full path of directory of interest (string).
- whitelist,
-
list of files or extensions of interest (Ice::StringSeq).
- blacklist,
-
list of directories, files or extensions that are not of interest (Ice::StringSeq).
- pMode,
-
path mode of monitor (PathMode).
- proxy,
-
a proxy of the client to which notifications will be sent (MonitorClient*).
- timeout,
-
time in seconds fo monitor to time out (float).
- blockSize,
-
the number of events to pack into each notification (int).
- ignoreSysFiles,
-
ignore system files or not (bool).
- ignoreDirEvents,
-
ignore directory events (bool).
Return Value
monitorId, a uuid1 (string).
Exceptions
-
Start an existing monitor.
An exception will be raised if the id does not correspond to an existing monitor.
An exception will be raised if a monitor cannot be started for any other reason,
in this case the monitor's state cannot be assumed.
Parameters
- id,
-
monitor id (string).
Return Value
, no explicit return value.
Exceptions
-
Stop an existing monitor.
Attempting to stop a monitor that is not running raises no exception.
An exception will be raised if the id does not correspond to an existing monitor.
An exception will be raised if a monitor cannot be stopped for any other reason,
in this case the monitor's state cannot be assumed.
Parameters
- id,
-
monitor id (string).
Return Value
, no explicit return value.
Exceptions
-
Destroy an existing monitor.
Attempting to destroy a monitor that is running will try to first stop
the monitor and then destroy it.
An exception will be raised if the id does not correspond to an existing monitor.
An exception will be raised if a monitor cannot be destroyed (or stopped and destroyed)
for any other reason, in this case the monitor's state cannot be assumed.
Parameters
- id,
-
monitor id (string).
Return Value
, no explicit return value.
Exceptions
-
Get the state of an existing monitor.
An exception will be raised if the id does not correspond to an existing monitor.
Parameters
- id,
-
monitor id (string).
Return Value
, the monitor state (MonitorState).
Exceptions
-
::Ice::StringSeq getMonitorDirectory(string id, string relPath, string filter) throws OmeroFSError
Get the directory relative to an existing monitor on an OMERO.fs server.
An exception will be raised if the id does not correspond to an existing monitor.
An exception will be raised if the path does not exist or is inaccessible to the
OMERO.fs server. An exception will be raised if directory list cannot be
returned for any other reason.
Parameters
- id,
-
monitor id (string).
- relPath,
-
the relative path from the monitor's watch path (string).
- filter,
-
a filter to apply to the listing, cf. ls (string).
Return Value
, a directory listing (Ice::StringSeq).
Exceptions
-
::Ice::StringSeq getDirectory(string absPath, string filter) throws OmeroFSError
Get an absolute directory from an OMERO.fs server.
An exception will be raised if the path does not exist or is inaccessible to the
OMERO.fs server. An exception will be raised if directory list cannot be
returned for any other reason.
Parameters
- relPath,
-
an absolute path on the monitor's watch path (string).
- filter,
-
a filter to apply to the listing, cf. ls (string).
Return Value
, a directory listing (Ice::StringSeq).
Exceptions
-
Query the existence of a file
An exception will be raised if the method fails to determine the existence.
Parameters
- fileId,
-
see above.
Return Value
existence of file.
Exceptions
-
Get base name of a file, this is the name
stripped of any path, e.g. file.ext
An exception will be raised if the file no longer exists or is inaccessible.
Parameters
- fileId,
-
see above.
Return Value
base name.
Exceptions
-
Get all FileStats of a file
An exception will be raised if the file no longer exists or is inaccessible.
Parameters
- fileId,
-
see above.
Return Value
file stats (FileStats).
Exceptions
-
Get size of a file in bytes
An exception will be raised if the file no longer exists or is inaccessible.
Parameters
- fileId,
-
see above.
Return Value
byte size of file (long).
Exceptions
-
Get owner of a file
An exception will be raised if the file no longer exists or is inaccessible.
Parameters
- fileId,
-
see above.
Return Value
owner of file (string).
Exceptions
-
Get ctime of a file
An exception will be raised if the file no longer exists or is inaccessible.
Parameters
- fileId,
-
see above.
Return Value
ctime of file (float).
Exceptions
-
Get mtime of a file
An exception will be raised if the file no longer exists or is inaccessible.
Parameters
- fileId,
-
see above.
Return Value
mtime of file (float).
Exceptions
-
Get atime of a file
An exception will be raised if the file no longer exists or is inaccessible.
Parameters
- fileId,
-
see above.
Return Value
atime of file (float).
Exceptions
-
Query whether file is a directory
An exception will be raised if the file no longer exists or is inaccessible.
Parameters
- fileId,
-
see above.
Return Value
true is directory (bool).
Exceptions
-
Query whether file is a file
An exception will be raised if the file no longer exists or is inaccessible.
Parameters
- fileId,
-
see above.
Return Value
true if file (bool).
Exceptions
-
Get SHA1 of a file
An exception will be raised if the file no longer exists or is inaccessible.
An exception will be raised if the SHA1 cannot be generated for any reason.
Parameters
- fileId,
-
see above.
Return Value
SHA1 hex hash digest of file (string).
Exceptions
-
::Ice::ByteSeq readBlock(string fileId, long offset, int size) throws OmeroFSError
readBlock should open, read size bytes from offset
and then close the file.
An exception will be raised if the file no longer exists or is inaccessible.
An exception will be raised if the file read fails for any other reason.
Parameters
- fileId,
-
see above.
- offset,
-
byte offset into file from where read should begin (long).
- size,
-
number of bytes that should be read (int).
Return Value
byte sequence of upto size bytes.
Exceptions
-