java.lang.Cloneable
public class LmsMessageConveyor
extends java.lang.Object
implements java.lang.Cloneable
LmsMessageConveyor
.LmsLoggerFactory
instance with LmsLoggerFactory.createInstance(LmsMessageConveyor)
.
It is possible to reconfigure active LmsMessageConveyor
in runtime, or
create new instance and reinitialize static LmsLoggerFactory
with it.Modifier and Type | Class | Description |
---|---|---|
static class |
LmsMessageConveyor.Builder |
Builder for LmsMessageConveyor component.
|
protected static class |
LmsMessageConveyor.UnknownLmsEvent |
Internal class to represent "unknown" LMS log events.
|
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
DEFAULT_MESSAGEFILE_VALUE |
|
static java.lang.String |
LEVEL_REASSIGN_DISABLE_EXT_OPT |
Deprecated.
|
static java.lang.String |
LEVEL_REASSIGN_OPT_PREFIX |
Deprecated.
|
static java.lang.String |
MESSAGEFILE_PROPERTY_NAME |
Modifier | Constructor | Description |
---|---|---|
|
LmsMessageConveyor() |
Default constructor of LMS events conveyor.
It loads common LMS events templates enumeration CommonLmsEnum ,
and available generated users' enumerations handled with the AppTemplate annotations processor. |
|
LmsMessageConveyor(java.lang.Class<E1> enum1) |
Creates LMS messages conveyor by specified templates enumeration.
|
|
LmsMessageConveyor(java.lang.Class<E1> enum1,
java.lang.Class<E2> enum2) |
Creates LMS messages conveyor by specified templates enumerations.
|
protected |
LmsMessageConveyor(java.util.List<java.lang.Class<?>> lmsEnums,
java.lang.Boolean allowUnknownEvents) |
Internal constructor for the conveyor builder.
|
Modifier and Type | Method | Description |
---|---|---|
LmsMessageConveyor |
clone() |
|
protected LmsMessageTemplate |
getDefaultEvent(int key,
LmsLogLevel level,
java.lang.Object... args) |
Internal method to handle "unknown" LMS log event.
|
LmsMessageTemplate |
getLmsEvent(LmsMessageTemplate key) |
Returns LMS event definition (template) from the conveyor configuration.
|
LmsMessageTemplate |
getLmsEvent(java.lang.Integer key,
java.lang.Object... args) |
Returns LMS event definition (template) from the conveyor configuration.
|
LmsMessageConveyor |
loadConfiguration(IGApplicationConfiguration appConfig) |
Loads and initializes conveyor configuration based on
"log" and
"log-extended" sections of configuration server application object options. |
LmsMessageConveyor |
loadConfiguration(GAppLoggingOptions logOptions) |
Loads and initializes conveyor configuration based on
"log" and
"log-extended" sections of configuration server application object options. |
LmsMessageConveyor |
loadConfiguration(KeyValueCollection optsLog,
KeyValueCollection optsLogExt) |
Loads and initializes conveyor configuration based on
"log" and
"log-extended" sections of configuration server application object options. |
LmsMessageConveyor |
loadConfiguration(java.lang.String messagefiles) |
Loads content and initializes messages IDs mapping of given LMS files.
|
LmsMessageConveyor |
loadConfiguration(java.lang.String messagefiles,
java.util.Map<java.lang.Integer,LmsLogLevel> levelsReassign) |
Loads content and initializes messages IDs mapping of given LMS files.
|
static LmsMessageConveyor.Builder |
newBuilder() |
Creates and returns new instance of
LmsMessageConveyor builder. |
protected LmsFileData |
readLmsFile(java.lang.String lmsfile) |
Reads single LMS file.
|
protected java.util.List<LmsFileData> |
readLmsFiles(java.lang.String messagefile) |
Reads application LMS file(s).
|
public static final java.lang.String MESSAGEFILE_PROPERTY_NAME
public static final java.lang.String DEFAULT_MESSAGEFILE_VALUE
@Deprecated public static final java.lang.String LEVEL_REASSIGN_OPT_PREFIX
@Deprecated public static final java.lang.String LEVEL_REASSIGN_DISABLE_EXT_OPT
public LmsMessageConveyor()
CommonLmsEnum
,
and available generated users' enumerations handled with the AppTemplate annotations processor.newBuilder()
public LmsMessageConveyor(java.lang.Class<E1> enum1)
CommonLmsEnum
as well, it is required to create conveyor specifying
all of the enumerations classes including CommonLmsEnum.class
.LmsMessageConveyor lmsEvents =
new LmsMessageConveyor(MyAppLmsEnum.class, CommonLmsEnum.class);
enum1
- class of LmsMessageTemplate based enumeration.newBuilder()
public LmsMessageConveyor(java.lang.Class<E1> enum1, java.lang.Class<E2> enum2)
CommonLmsEnum
as well, it is required to create conveyor specifying
all of the enumerations classes including CommonLmsEnum.class
.LmsMessageConveyor lmsEvents =
new LmsMessageConveyor(MyAppLmsEnum.class, CommonLmsEnum.class);
enum1
- class of generated LmsMessageTemplate based enumeration.enum2
- other class of generated LmsMessageTemplate based enumeration.newBuilder()
protected LmsMessageConveyor(java.util.List<java.lang.Class<?>> lmsEnums, java.lang.Boolean allowUnknownEvents)
newBuilder()
public static LmsMessageConveyor.Builder newBuilder()
LmsMessageConveyor
builder.LmsMessageConveyor.Builder
public LmsMessageConveyor clone()
clone
in class java.lang.Object
public LmsMessageConveyor loadConfiguration(IGApplicationConfiguration appConfig)
"log"
and
"log-extended"
sections of configuration server application object options.appConfig
- the application configuration.java.lang.NullPointerException
- if given application configuration is null,
or it does not contain "log" section.public LmsMessageConveyor loadConfiguration(KeyValueCollection optsLog, KeyValueCollection optsLogExt)
"log"
and
"log-extended"
sections of configuration server application object options.optsLog
- "log" section of the application options.optsLogExt
- "log-extended" section of the application options.public LmsMessageConveyor loadConfiguration(GAppLoggingOptions logOptions)
"log"
and
"log-extended"
sections of configuration server application object options.logOptions
- the logging configuration options of the application options.java.lang.NullPointerException
- if given logging options parameter is null
.public LmsMessageConveyor loadConfiguration(java.lang.String messagefiles)
messagefiles
- LMS files names separated with semicolon, empty string; or null.loadConfiguration(String, Map)
public LmsMessageConveyor loadConfiguration(java.lang.String messagefiles, java.util.Map<java.lang.Integer,LmsLogLevel> levelsReassign)
messagefiles
- LMS file names separated with semicolon, empty string or null.levelsReassign
- map with events levels reassignments or null.protected java.util.List<LmsFileData> readLmsFiles(java.lang.String messagefile)
messagefile
- name(s) of LMS files to read (comma separated list).protected LmsFileData readLmsFile(java.lang.String lmsfile)
lmsfile
- the name of LMS file.public LmsMessageTemplate getLmsEvent(LmsMessageTemplate key)
key
- the LMS event ID.java.lang.NullPointerException
- if given key
parameter value is null.public LmsMessageTemplate getLmsEvent(java.lang.Integer key, java.lang.Object... args)
key
- the LMS event ID.args
- the LMS event parameters.java.lang.NullPointerException
- if given key
parameter value is null.java.lang.IllegalArgumentException
- if no such event declared and unknown events are disallowed.LmsMessageConveyor.Builder.allowUnknownMessages(Boolean)
protected LmsMessageTemplate getDefaultEvent(int key, LmsLogLevel level, java.lang.Object... args)
key
- the event ID which was not found in the conveyor configuration.level
- the LMS event level of the message.args
- the parameters of the LMS log event.java.lang.IllegalArgumentException
- if unknown events are disallowed.LmsMessageConveyor.Builder.allowUnknownMessages(Boolean)
Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 9.0.006.00
Copyright © 2006–2019 Genesys Telecommunications Laboratories, Inc. All rights reserved.