Class FileLogServiceDescriptor
- java.lang.Object
-
- com.jscape.inet.mft.management.descriptors.Configuration
-
- com.jscape.inet.mft.management.descriptors.ServiceDescriptor
-
- com.jscape.inet.mft.management.descriptors.LogServiceDescriptor
-
- com.jscape.inet.mft.management.descriptors.FileLogServiceDescriptor
-
- All Implemented Interfaces:
com.jscape.util.db.IntVersioned,java.io.Serializable
public class FileLogServiceDescriptor extends LogServiceDescriptor
File log service descriptor. The service described by this descriptor takes responsibility for logging system events in file.- Version:
- 1.0
- Author:
- Alex
- See Also:
- Source code, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String[]ALL_STRATEGIESstatic java.lang.StringDAILY_STRATEGYDaily log rotation strategy.static longDEFAULT_FILE_SIZEstatic java.lang.StringDEFAULT_STRATEGYstatic java.lang.StringFILE_SIZE_STRATEGYFile size related log rotation strategy.static java.lang.StringMONTHLY_STRATEGYMonthly log rotation strategy.static java.lang.StringWEEKLY_STRATEGYWeekly log rotation strategy.
-
Constructor Summary
Constructors Constructor Description FileLogServiceDescriptor()This constructor is used by serialization sub-system and is not intended to use directly in client code.FileLogServiceDescriptor(FileLogServiceDescriptor that)FileLogServiceDescriptor(java.lang.String directory, java.lang.String strategyName, long fileSize)Creates a new descriptor instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Configurationcopy()booleanequals(java.lang.Object o)java.lang.StringgetDirectory()Returns log directory.longgetFileSize()Returns max file size for the "FileSize" log rotation strategy.java.lang.StringgetStrategyName()Returns log rotation strategy name.inthashCode()voidsetDirectory(java.lang.String value)Sets log directory.voidsetFileSize(long value)Sets max file size for the "FileSize" log rotation strategy.voidsetStrategyName(java.lang.String value)Sets log rotation strategy name.java.lang.StringtoString()-
Methods inherited from class com.jscape.inet.mft.management.descriptors.Configuration
getVersion, setVersion
-
-
-
-
Field Detail
-
DAILY_STRATEGY
public static final java.lang.String DAILY_STRATEGY
Daily log rotation strategy.- See Also:
- Constant Field Values
-
WEEKLY_STRATEGY
public static final java.lang.String WEEKLY_STRATEGY
Weekly log rotation strategy.- See Also:
- Constant Field Values
-
MONTHLY_STRATEGY
public static final java.lang.String MONTHLY_STRATEGY
Monthly log rotation strategy.- See Also:
- Constant Field Values
-
FILE_SIZE_STRATEGY
public static final java.lang.String FILE_SIZE_STRATEGY
File size related log rotation strategy.- See Also:
- Constant Field Values
-
DEFAULT_STRATEGY
public static final java.lang.String DEFAULT_STRATEGY
- See Also:
- Constant Field Values
-
DEFAULT_FILE_SIZE
public static final long DEFAULT_FILE_SIZE
- See Also:
- Constant Field Values
-
ALL_STRATEGIES
public static final java.lang.String[] ALL_STRATEGIES
-
-
Constructor Detail
-
FileLogServiceDescriptor
public FileLogServiceDescriptor(java.lang.String directory, java.lang.String strategyName, long fileSize)Creates a new descriptor instance.- Parameters:
directory- log directorystrategyName- log rotation strategyfileSize- file size in bytes
-
FileLogServiceDescriptor
public FileLogServiceDescriptor(FileLogServiceDescriptor that)
-
FileLogServiceDescriptor
public FileLogServiceDescriptor()
This constructor is used by serialization sub-system and is not intended to use directly in client code.
-
-
Method Detail
-
getDirectory
public java.lang.String getDirectory()
Returns log directory.- Returns:
- log directory
-
setDirectory
public void setDirectory(java.lang.String value)
Sets log directory.- Parameters:
value- the log directory
-
getStrategyName
public java.lang.String getStrategyName()
Returns log rotation strategy name.- Returns:
- log rotation strategy name
-
setStrategyName
public void setStrategyName(java.lang.String value)
Sets log rotation strategy name. Allowed names include: "Daily", "Weekly", "Monthly" and "FileSize".- Parameters:
value- the log rotation strategy name
-
getFileSize
public long getFileSize()
Returns max file size for the "FileSize" log rotation strategy.- Returns:
- max file size in bytes
-
setFileSize
public void setFileSize(long value)
Sets max file size for the "FileSize" log rotation strategy.- Parameters:
value- the max file size in bytes
-
copy
public Configuration copy()
- Specified by:
copyin classConfiguration
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-