|
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.commons.PsdkCustomization
public final class PsdkCustomization
Platform SDK Core Functionality customization options modification interface.
Important note: PSDK Core options are supposed for experts usage. Do not use it if you have no clear vision what is the option is responsible for and how does the change affect PSDK and application behavior. Java System properties may be used for tuning of special Platform SDK options. Supported options are described in the enumerationPsdkCustomization.PsdkOption
.
The properties values may be defined in:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<entry key="com.genesyslab.platform.defaultcharset">windows-1251</entry>
</properties>
-Dcom.genesyslab.platform.defaultcharset=windows-1251
System.setProperty(String, String)
or
setOption(PsdkOption, String)
.
PsdkCustomization.setOption(PsdkOption.DefaultCharsetEncoding, "windows-1251");
PsdkCustomization.setOption(PsdkOption.DisableUnknownProtocolMessageDelivery, "true");
At the same time it is possible to make "branch" of the option for particular protocol and override it:
PsdkCustomization.setOption(PsdkOption.DisableUnknownProtocolMessageDelivery,
SolutionControlServerProtocolFactory.PROTOCOL_DESCRIPTION.toString(), "false");
From the jvm system properties point of view, "branching" means setting of property with specific name:
// Property PsdkOption.DisableUnknownProtocolMessageDelivery:
// system property is "com.genesyslab.platform.disable-unknown-incoming-messages" ("<option-namespace>.<option-name>")
// Then branching of the option will look like:
String optBranch = SolutionControlServerProtocolFactory.PROTOCOL_DESCRIPTION.toString();
PsdkCustomization.setOption(PsdkOption.DisableUnknownProtocolMessageDelivery, optBranch, "true");
// - It makes option branch for specific protocol: "<option-namespace>.<branch-name>.<option-name>"
// so, the system property will be "com.genesyslab.platform.Management.SolutionControlServer.disable-unknown-incoming-messages"
Each "brancheable" option has own range of "valid" branch names. Branch name is not been validated,
so, usage of wrong branch name leads to wrongly named option setting and has no effect on PSDK behavior.-D???
"), or with System.setProperty(String, String)
at initialization phase of the application (before creation or calling to Platform SDK
protocol connections or other components classes).
Nested Class Summary | |
---|---|
static class |
PsdkCustomization.PsdkOption
Enumeration with declarations of supported Platform SDK core properties names. |
Method Summary | |
---|---|
static java.lang.Boolean |
getBoolOption(PsdkCustomization.PsdkOption option,
java.lang.Boolean defaultValue)
Returns value of given Platform SDK Core Customization option. |
static java.lang.Boolean |
getBoolOption(PsdkCustomization.PsdkOption option,
java.lang.String branch,
java.lang.Boolean defaultValue)
Returns value of given Platform SDK Core Customization option. |
static java.lang.Integer |
getIntOption(PsdkCustomization.PsdkOption option,
java.lang.Integer defaultValue)
Returns value of given Platform SDK Core Customization option. |
static java.lang.Integer |
getIntOption(PsdkCustomization.PsdkOption option,
java.lang.String branch,
java.lang.Integer defaultValue)
Returns value of given Platform SDK Core Customization option. |
static java.lang.String |
getOption(PsdkCustomization.PsdkOption option)
Returns value of given Platform SDK Core Customization option. |
static java.lang.String |
getOption(PsdkCustomization.PsdkOption option,
java.lang.String branch,
java.lang.String defaultValue)
Returns value of given Platform SDK Core Customization option. |
static void |
setOption(PsdkCustomization.PsdkOption option,
java.lang.String optionValue)
Sets Platform SDK Core Customization option value. |
static void |
setOption(PsdkCustomization.PsdkOption option,
java.lang.String branch,
java.lang.String optionValue)
Sets Platform SDK Core Customization option value. |
static java.lang.String |
toStringDump()
Generates string representation of the customization options for logging purposes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String getOption(PsdkCustomization.PsdkOption option)
option
- customization option.
public static java.lang.String getOption(PsdkCustomization.PsdkOption option, java.lang.String branch, java.lang.String defaultValue)
option
- customization option.branch
- option branch name or null for default.defaultValue
- default value to be used if option is not defined.
public static java.lang.Integer getIntOption(PsdkCustomization.PsdkOption option, java.lang.Integer defaultValue)
option
- customization option.defaultValue
- default value to be used if option is not defined.
public static java.lang.Integer getIntOption(PsdkCustomization.PsdkOption option, java.lang.String branch, java.lang.Integer defaultValue)
option
- customization option.branch
- option branch name or null for default.defaultValue
- default value to be used if option is not defined.
public static java.lang.Boolean getBoolOption(PsdkCustomization.PsdkOption option, java.lang.Boolean defaultValue)
option
- customization option.defaultValue
- default value to be used if option is not defined.
public static java.lang.Boolean getBoolOption(PsdkCustomization.PsdkOption option, java.lang.String branch, java.lang.Boolean defaultValue)
option
- customization option.branch
- option branch name or null for default.defaultValue
- default value to be used if option is not defined.
public static void setOption(PsdkCustomization.PsdkOption option, java.lang.String optionValue)
option
- customization option.optionValue
- new value for the customization option or null
to clear this option.public static void setOption(PsdkCustomization.PsdkOption option, java.lang.String branch, java.lang.String optionValue)
option
- customization option.branch
- option branch name or null for default.optionValue
- new value for the customization option or null
to clear this option.public static java.lang.String toStringDump()
|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |