|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.genesyslab.platform.apptemplate.lmslogger.LmsMessageConveyor.Builder
public static class LmsMessageConveyor.Builder
Builder for LmsMessageConveyor component.
Common use cases are following:CommonLmsEnum
and without support of unknown LMS events:
LmsMessageConveyor lms = LmsMessageConveyor.newBuilder().build();
LmsMessageConveyor lms = LmsMessageConveyor.newBuilder()
.addLmsEnum(CommonLmsEnum.class)
.addLmsEnum(MyAppLmsEnum.class)
.build();
LmsMessageConveyor lms = LmsMessageConveyor.newBuilder()
.addLmsEnum(CommonLmsEnum.class)
.addLmsEnum(MyAppLmsEnum.class)
.allowUnknownMessages(true)
.build();
CommonLmsEnum
. If this enumeration
is not included in the list, and given custom enumeration(s) does not contain its
declarations, then "common LMS events" may be treated by this conveyor as unknown.
LmsMessageConveyor.newBuilder()
Field Summary | |
---|---|
protected java.lang.Boolean |
allowUnknownEvents
|
protected java.util.List<java.lang.Class<?>> |
lmsEnums
|
Constructor Summary | |
---|---|
LmsMessageConveyor.Builder()
|
Method Summary | ||
---|---|---|
|
addLmsEnum(java.lang.Class<E> lmsEnum)
Adds LMS enumeration to the list of declarations for the conveyor. It may be called several times to include several enums. Order of this method calls may be important in case, when enumerations may contain own declarations for a same event ID. In such a case, last declarations will override previously declared ones. |
|
LmsMessageConveyor.Builder |
allowUnknownMessages(java.lang.Boolean allowUnknownEvents)
Enables or disables support of "unknown" messages. This is about the case, when application tries to log event with unsupported ID. |
|
LmsMessageConveyor |
build()
Creates new instance of LmsMessageConveyor with given parameters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.List<java.lang.Class<?>> lmsEnums
protected java.lang.Boolean allowUnknownEvents
Constructor Detail |
---|
public LmsMessageConveyor.Builder()
Method Detail |
---|
public <E extends java.lang.Enum<E> & LmsMessageTemplate> LmsMessageConveyor.Builder addLmsEnum(java.lang.Class<E> lmsEnum)
lmsEnum
- the LMS enumeration class.public LmsMessageConveyor.Builder allowUnknownMessages(java.lang.Boolean allowUnknownEvents)
lmsLogger.log(43210, "internal error");
when no message ID 43210
defined in the conveyor enumeration(s) and LMS file(s).
There are following supported values for this option:FALSE
(the default value) - to throw IllegalArgumentException
on undefined events logging;TRUE
- to allow undefined events logging;null
- to skip undefined events;
allowUnknownEvents
- enabling option value for the unknown events support feature.public LmsMessageConveyor build()
LmsMessageConveyor
with given parameters.
|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |