|
|
|||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
java.lang.Objectcom.lightysoft.logmx.mgr.ManagerSpecVersion
public class ManagerSpecVersion
Defines LogMX Manager Specifications versions.
Each Specification version matches a set of services that a LogMX LogFileManager
must provide (through implementation of abstract Java methods).
This Specification version helps LogMX to know if a Manager is too old to be used with the current LogMX version.
For example, a Manager written for Specification v1.0 will be ignored if current version of LogMX
requires a v1.1
Specification versions change log:
Version v1.1 (since LogMX v1.2.4)
LogFileManager.getCurrentOffset()
must not throw Exception anymoreLogFileManager.getCurrentFileSize()
must not return 0 if Manager can't get its size,
but -1 insteadLogFileManager.prepareForReading()
must not return a long, but a
LogFileInfo insteadLogFileManager.releaseResources(boolean)
now takes a boolean parameter (no parameter in previous versions).
This boolean is a flag indicating if the Manager should perform a soft release,
because the LogMX file tab remains open, or if the Manager should release all
allocated resources and close all sockets because the LogMX file tab was closed.
For example, a FTP Manager can close the current channel or file transfer on
a soft release, but should also close the entire FTP session on a full release.
LogFileManager.getCurrentFileInfo():
this method is not abstract or final, so that most Managers may
not have to override (i.e. redefine) it, but some others can.
The default implementation returns a LogFileInfo
containing the file size and date returned by LogFileManager.getCurrentFileSize()
and LogFileManager.getCurrentFileLastModifDate().
Manager must override this new method if getting the file size and file date are both
time-consuming and if they both need a same connection, transaction, context, ...
For example, if getting both file size/date can be performed via a single SFTP "STAT" command,
the Manager shall override LogFileManager.getCurrentFileInfo()
so that only one "STAT" command is performed. Note: this new method is called periodically
for file change detection and Auto-Refresh.LogFileManager.newEncodingDetected():
this method is not abstract or final, so that most Managers may
not have to override (i.e. redefine) it, but some others can. This method is
called by LogMX after LogFileManager.prepareForReading() and
before LogFileManager.readLine() if and only if the encoding
to use (to read bytes from the underlying resource) has changed.LogFileManager.getEncoding().prepareForReading(). If the encoding found during this auto-detection
is different from the one set while prepareForReading() was called, this method
newEncodingDetected() will be called so that the Manager can re-create its Input
Stream Reader before readLine() is called.LogFileManager.getEncoding() in LogFileManager.prepareForReading()
to initialize its Input Stream Reader, or if the Input Stream Reader used in LogFileManager.readFileHeader(int)
is also used in LogFileManager.readLine().
LogFileManager.READ_MUTEX:
mutex used by LogMX and the Manager to ensure that only one thread makes this Manager read from the underlying resource, at the same time.
Managers can synchronize with this Mutex if they don't want LogFileManager.getCurrentFileLastModifDate()
or LogFileManager.getCurrentFileSize() to be called by LogMX during a specific code execution.
LogFileManager.getSpecificationVersion()| Field Summary | |
|---|---|
static ManagerSpecVersion |
V1_0
Deprecated. Manager Specification v1.0 (supported from LogMX v1.2.2 to v1.2.3). Managers must be compliant with V1_1 since LogMX v1.2.4 |
static ManagerSpecVersion |
V1_1
Manager Specification v1.1 (supported since LogMX v1.2.4, see this class Javadoc for details) |
| Method Summary | |
|---|---|
String |
getVersion()
Returns the Specification version for this instance |
String |
toString()
Returns getVersion() |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
@Deprecated public static final ManagerSpecVersion V1_0
public static final ManagerSpecVersion V1_1
| Method Detail |
|---|
public String toString()
getVersion()
toString in class ObjectgetVersion()Object.toString()public String getVersion()
|
|
|||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||