Modifier and Type | Method and Description |
---|---|
PropertyConfig |
addProperty(String name,
String value)
Add a publisher property.
|
PropertyConfig |
addProperty(String name,
String type,
String value)
Add a publisher property.
|
RemoteServerConfig |
addRemoteServer(String name,
String host,
int port)
Deprecated.
since 5.9 - See
PublisherServerConnection |
SubscriptionValidationPolicyConfig |
addSubscriptionValidationPolicy(String name)
Add a new subscription validation policy for the publisher.
|
long |
getAckTimeout()
Gets the ack timeout.
|
String |
getClassName()
Gets the publisher class name.
|
LogDescription.LogLevel |
getLogLevel()
Gets the log level for this publisher.
|
String |
getName()
Returns the Publisher name.
|
List<PropertyConfig> |
getProperties()
Gets list of Publisher properties.
|
PropertyConfig |
getProperty(String name)
Get a named property.
|
String |
getPropertyValue(String name)
Gets the value of a named property as a String.
|
RemoteServerConfig |
getRemoteServer(String name)
Deprecated.
since 5.9 - See
PublisherServerConnection |
List<RemoteServerConfig> |
getRemoteServers()
Deprecated.
since 5.9 - See
PublisherServerConnection |
List<SubscriptionValidationPolicyConfig> |
getSubscriptionValidationPolicies()
Get the subscription validation policies defined for the publisher.
|
SubscriptionValidationPolicyConfig |
getSubscriptionValidationPolicy(String name)
Get a named subscription validation policy that belongs to the publisher.
|
String |
getTopics()
Gets the list of Topics to automatically register.
|
boolean |
isAutoAck()
Gets the value of the autoAck property.
|
boolean |
isAutoStart()
Is auto start set?
|
boolean |
isEnabled()
Is the Publisher enabled?
|
boolean |
isStopServerIfNotLoaded()
Indicates whether to stop server if publisher does not load.
|
boolean |
isTopicAliasing()
Indicates whether topic aliasing.
|
SubscriptionValidationPolicyConfig |
removeSubscriptionValidationPolicy(String name)
Remove a subscription validation policy.
|
void |
setAckTimeout(long timeout)
Sets ack timeout.
|
void |
setAutoAck(boolean autoAck)
Sets the value of the autoAck property.
|
void |
setAutoStart(boolean autoStart)
Sets the publisher start property.
|
void |
setEnabled(boolean enabled)
Sets the publisher enabled property.
|
void |
setLogLevel(LogDescription.LogLevel level)
Sets the log level for the publisher.
|
void |
setStopServerIfNotLoaded(boolean stopIfNotLoaded)
Sets whether to stop the server if publisher does not load.
|
void |
setTopicAliasing(boolean topicAliasing)
Sets the value of the topicAliasing property.
|
void |
setTopics(String topics)
Sets Topics to automatically create.
|
String getName()
String getClassName()
void setTopics(String topics) throws ConfigException
Initial Topics would normally be created in the Publisher initialLoad method but this facility also exists, mainly for backwards compatibility.
By default no automatic Topic creation will occur and it will be up to the Publisher class itself to create the Topics required.
topics
- A comma separated list of topic names specifying the Topics
that are automatically to be created for the Publisher as it
starts.ConfigException
- if unable to set propertyString getTopics()
void setEnabled(boolean enabled) throws ConfigException
By setting enabled to false, the publisher will not be loaded.
By default this is true.
enabled
- true to enable, false to disableConfigException
- if unable to set propertyboolean isEnabled()
void setAutoStart(boolean autoStart) throws ConfigException
Specifies whether the Publisher should automatically start when the Diffusion Server starts.
By default this is true.
autoStart
- true to automatically startConfigException
- if unable to set propertyboolean isAutoStart()
void setTopicAliasing(boolean topicAliasing) throws ConfigException
Specifies whether Topic Aliasing should be turned on for the Publisher. If true then a short Topic alias will be transmitted in delta Messages instead of the full Topic name.
By default this is set to true.
topicAliasing
- true to turn aliasing onConfigException
- if unable to set propertyboolean isTopicAliasing()
void setAckTimeout(long timeout) throws ConfigException
The default ACK timeout value (in milliseconds) to use for messages sent from the Publisher that require acknowledgment and do not have a timeout explicitly specified.
By default this is set to 1 second.
timeout
- ack timeout in millisecondsConfigException
- if unable to set propertylong getAckTimeout()
void setAutoAck(boolean autoAck) throws ConfigException
Indicates whether Messages sent from Clients to the Publisher requiring acknowledgment should be automatically acknowledged.
By default this is set to false.
autoAck
- true to auto acknowledgeConfigException
- if unable to set propertyboolean isAutoAck()
void setStopServerIfNotLoaded(boolean stopIfNotLoaded) throws ConfigException
If set and the publisher fails to load, then the Diffusion Server will be stopped.
By default this is set to false.
stopIfNotLoaded
- true if the server is to stop if publisher does
not load.ConfigException
- if unable to set propertyboolean isStopServerIfNotLoaded()
void setLogLevel(LogDescription.LogLevel level) throws ConfigException
If not specified then the log level will be the default.
level
- the log levelConfigException
- if unable to set propertyLogDescription.LogLevel getLogLevel()
@Deprecated List<RemoteServerConfig> getRemoteServers()
PublisherServerConnection
@Deprecated RemoteServerConfig getRemoteServer(String name)
PublisherServerConnection
name
- the Remote Server name@Deprecated RemoteServerConfig addRemoteServer(String name, String host, int port) throws ConfigException
PublisherServerConnection
Note that it is possible to manually connect to remote servers within the Publisher. Configuring Remote Servers in this way is only to cause automatic connections when the Publisher is started and as such can only be performed before the server is started.
name
- a unique name for the remote serverhost
- the Remote Server host - this must represent a location where
the target Diffusion Server is hosted.port
- the port on which the remote server is listening for Client
connections (i.e. the port of a Client connector).ConfigException
- if unable to add a remote serverList<PropertyConfig> getProperties()
PropertyConfig getProperty(String name)
name
- property nameString getPropertyValue(String name)
name
- the property namePropertyConfig addProperty(String name, String value) throws ConfigException
name
- the property namevalue
- the property valueConfigException
- if unable to add propertyPropertyConfig addProperty(String name, String type, String value) throws ConfigException
name
- the property nametype
- the property typevalue
- the property valueConfigException
- if unable to add propertyList<SubscriptionValidationPolicyConfig> getSubscriptionValidationPolicies()
SubscriptionValidationPolicyConfig getSubscriptionValidationPolicy(String name)
name
- the policy nameSubscriptionValidationPolicyConfig addSubscriptionValidationPolicy(String name) throws ConfigException
A new policy may be added even if the server has started.
name
- the policy nameConfigException
- if unable to add policy with given nameSubscriptionValidationPolicyConfig removeSubscriptionValidationPolicy(String name)
name
- the policy nameCopyright © 2016 Push Technology Ltd. All Rights Reserved.