public abstract class ReplicationNetworkConfig
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CHANNEL_FACTORY_CLASS |
static java.lang.String |
CHANNEL_FACTORY_PARAMS |
static java.lang.String |
CHANNEL_LOG_NAME
A string providing a logging context identification string.
|
static java.lang.String |
CHANNEL_TYPE
Configures the type of communication channel to use.
|
protected java.util.Properties |
props |
protected boolean |
validateParams |
Constructor and Description |
---|
ReplicationNetworkConfig()
Constructs a basic ReplicationNetworkConfig initialized with the system
default settings.
|
ReplicationNetworkConfig(java.util.Properties properties)
Constructs a basic ReplicationNetworkConfig initialized with the
provided propeties.
|
Modifier and Type | Method and Description |
---|---|
static void |
applyRepNetProperties(java.util.Properties sourceProps,
java.util.Properties updateProps) |
ReplicationNetworkConfig |
clone()
Returns a copy of this configuration object.
|
static ReplicationNetworkConfig |
create(java.io.File propFile)
Creates an ReplicationNetworkConfig which includes the properties
specified in the named properties file.
|
static ReplicationNetworkConfig |
create(java.util.Properties properties)
Creates an ReplicationNetworkConfig which includes the properties
specified in the properties parameter.
|
static ReplicationNetworkConfig |
createDefault()
Creates a default ReplicationNetworkConfig instance.
|
java.lang.String |
getChannelFactoryClass() |
java.lang.String |
getChannelFactoryParams() |
abstract java.lang.String |
getChannelType()
Get the channel type setting for the replication service.
|
java.lang.String |
getLogName()
Get the channel logging name setting for the replication service.
|
static java.util.Set<java.lang.String> |
getRepNetPropertySet() |
protected boolean |
isValidConfigParam(java.lang.String paramName)
Checks whether the named parameter is valid for this configuration type.
|
static void |
registerParams() |
ReplicationNetworkConfig |
setChannelFactoryClass(java.lang.String factoryClass) |
void |
setChannelFactoryClassVoid(java.lang.String factoryClass) |
ReplicationNetworkConfig |
setChannelFactoryParams(java.lang.String factoryParams) |
void |
setChannelFactoryParamsVoid(java.lang.String factoryParams) |
ReplicationNetworkConfig |
setConfigParam(java.lang.String paramName,
java.lang.String value)
Set this configuration parameter with this value.
|
ReplicationNetworkConfig |
setLogName(java.lang.String logName)
Sets the channel logging name to be used for replication service access.
|
void |
setLogNameVoid(java.lang.String logName) |
public static final java.lang.String CHANNEL_TYPE
basic
ssl
basic
is the standard implementation, which uses ordinary,
unencrypted communication, and is represented by this the
ReplicationBasicConfig
class.
ssl
indicates that SSL is to be used for service
communication. When using SSL, an instance of
ReplicationSSLConfig
must be used.
Name | Type | Mutable | Default |
"je.rep.channelType" | String | No | "basic" |
public static final java.lang.String CHANNEL_FACTORY_CLASS
public static final java.lang.String CHANNEL_FACTORY_PARAMS
public static final java.lang.String CHANNEL_LOG_NAME
Name | Type | Mutable | Default |
"je.rep.channelLogName" | String | No | "" |
protected final java.util.Properties props
protected final boolean validateParams
public ReplicationNetworkConfig()
public ReplicationNetworkConfig(java.util.Properties properties)
properties
- a set of properties which which to initialize the
instance propertiespublic static ReplicationNetworkConfig create(java.io.File propFile) throws java.lang.IllegalArgumentException, java.io.FileNotFoundException
propFile
- a File from which the configuration properties will
be read.java.io.FileNotFoundException
- If the property file cannot be foundjava.lang.IllegalArgumentException
- If any properties read from the
properties parameter are invalid.public static ReplicationNetworkConfig create(java.util.Properties properties) throws java.lang.IllegalArgumentException
properties
- Supported properties are described as the string
constants in this class.java.lang.IllegalArgumentException
- If any properties read from the
properties parameter are invalid.public static ReplicationNetworkConfig createDefault()
public abstract java.lang.String getChannelType()
public java.lang.String getLogName()
public ReplicationNetworkConfig setLogName(java.lang.String logName) throws java.lang.IllegalArgumentException
logName
- the channel logging name to be used.java.lang.IllegalArgumentException
- If the value of logName is invalid.public void setLogNameVoid(java.lang.String logName) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public java.lang.String getChannelFactoryClass()
public ReplicationNetworkConfig setChannelFactoryClass(java.lang.String factoryClass)
factoryClass
- the class name to usepublic void setChannelFactoryClassVoid(java.lang.String factoryClass)
public java.lang.String getChannelFactoryParams()
public ReplicationNetworkConfig setChannelFactoryParams(java.lang.String factoryParams)
factoryParams
- a string encoding any parameters to be passed to
the class constructor.public void setChannelFactoryParamsVoid(java.lang.String factoryParams)
public ReplicationNetworkConfig setConfigParam(java.lang.String paramName, java.lang.String value) throws java.lang.IllegalArgumentException
paramName
- the configuration parameter name, one of the String
constants in this classvalue
- the configuration value.java.lang.IllegalArgumentException
- if the paramName or value is invalid, or
if paramName is not a parameter that applies to ReplicationNetworkConfig.public ReplicationNetworkConfig clone()
clone
in class java.lang.Object
public static java.util.Set<java.lang.String> getRepNetPropertySet()
public static void registerParams()
public static void applyRepNetProperties(java.util.Properties sourceProps, java.util.Properties updateProps) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
- if any of the contained property
entries have invalid valuesprotected boolean isValidConfigParam(java.lang.String paramName)
paramName
- the configuration parameter name, one of the String
constants in this classCopyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.