public class BlotterConfiguration
extends java.lang.Object
The type Blotter configuration, which can be used to create a BlotterProvider
instance.
Modifier and Type | Field and Description |
---|---|
Configuration |
internalConfiguration |
Constructor and Description |
---|
BlotterConfiguration(java.lang.String blotterIdentifier,
java.lang.String channelNamespace,
java.lang.String itemNamespace) |
BlotterConfiguration(java.lang.String blotterIdentifier,
java.lang.String channelNamespace,
java.lang.String itemNamespace,
java.lang.String subContainerNamespace)
Instantiates a new Blotter configuration.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBlotterIdentifier()
Gets the blotter identifier name.
|
java.lang.String |
getChannelNamespace()
Gets the channel namespace.
|
int |
getContainerThrottleMillis()
Get the current millisecond delay used for container throttling
|
java.lang.String |
getItemNamespace()
Gets the item namespace.
|
int |
getSubContainerMaxDepth()
Gets the max depth of the sub containers.
|
java.lang.String |
getSubContainerNamespace()
Gets the sub channel namespace.
|
boolean |
isAutoPermit()
Gets whether automatically permitted.
|
boolean |
isAutoSendEmptyContainer()
Gets whether an empty container should be send automatically as a response to a request
|
boolean |
isChannelUsingImageFlag()
Returns true if image flags are used in the channel for its initial message, or false otherwise.
|
boolean |
isItemUsingImageFlag()
Returns true if image flags are used on each channel item for their initial messages, or false otherwise.
|
boolean |
isMoveItemToTopWhenModified()
Gets whether items should be moved to the top of the container upon modification
|
boolean |
isPrefixIdWithIdentifier()
When true then the ID will be prefixed with the blotterIdentifier followed by a dash.
|
boolean |
isUseGenericObjects()
Gets whether generic objects should be used instead of Type1 Records
|
void |
setAutoPermit(boolean autoPermit)
Sets auto permit enabled/disabled.
|
void |
setAutoSendEmptyContainer()
Sets whether an empty container should automatically be sent or now when the channel opens
|
void |
setChannelUsingImageFlag(boolean isChannelUsingImageFlag)
Set to true and the channel container will use an image flag when sending the initial message
|
void |
setContainerThrottleMillis(int millis)
Specify the millisecond delay used to throttle subsequent operations to a single container.
|
void |
setItemUsingImageFlag(boolean isItemUsingImageFlag)
Set to true and the channel items will use image flags when sending their initial messages
|
void |
setMoveItemToTopWhenModified(boolean moveItemToTopWhenModified)
Sets whether to move an existing item to the top of the container when sendBlotterItem with an Item
with the same ID gets called again
|
void |
setPrefixIdWithIdentifier(boolean prefixIdWithIdentifier)
Set to false to turn off prefixing of ID's with the blotterIdentifier followed by a -.
|
void |
setSubcontainerMaxDepth(int subcontainerMaxDepth)
Sets the subcontainer maximum depth.
|
void |
setUseGenericObjects(boolean useGenericObjects)
Set whether the API should use generic objects instead of Type1 records.
|
java.lang.String |
toString() |
public BlotterConfiguration(java.lang.String blotterIdentifier, java.lang.String channelNamespace, java.lang.String itemNamespace, java.lang.String subContainerNamespace)
Instantiates a new Blotter configuration.
The blotter identifier can be anything but its recommended it is the name of your blotter, e.g. OrderBlotter, HistoricBlotter, ActivityBlotter. As this identifier will appear in the logging
The channel namespace must be a namespace subject which contains %u or %U. E.g. /BLOTTER/%u/CHANNEL
The item namespace must be a namespace subject which contains both %u or %U and %i. E.g. /BLOTTER/%u/ITEM/%i
%U = username with session that requested the subject. E.g. admin-0
%u = username that requested the subject. E.g. admin
%i = unique id relating to the blotter item requested, must be the last variable part of the namespace. E.g. 1234 and it will be prefixed with the BlotterIdentifier
blotterIdentifier
- the blotter identifierchannelNamespace
- the channel namespaceitemNamespace
- the item namespacesubContainerNamespace
- the sub channel namespacepublic BlotterConfiguration(java.lang.String blotterIdentifier, java.lang.String channelNamespace, java.lang.String itemNamespace)
public boolean isChannelUsingImageFlag()
Returns true if image flags are used in the channel for its initial message, or false otherwise.
public void setChannelUsingImageFlag(boolean isChannelUsingImageFlag)
Set to true and the channel container will use an image flag when sending the initial message
The default, recommended setting is true. The use case for setting to false is to prevent blotter channel contents being overwritten when two providers provide to the same channel
isChannelUsingImageFlag
- boolean used to set the channel image flagpublic boolean isItemUsingImageFlag()
Returns true if image flags are used on each channel item for their initial messages, or false otherwise.
public void setItemUsingImageFlag(boolean isItemUsingImageFlag)
Set to true and the channel items will use image flags when sending their initial messages
The default, recommended setting is true. The use case for setting to false is to prevent items being overwritten when two providers provide for the same channel
isItemUsingImageFlag
- boolean used to set the channel items image flagspublic java.lang.String getChannelNamespace()
Gets the channel namespace.
public java.lang.String getItemNamespace()
Gets the item namespace.
public java.lang.String getSubContainerNamespace()
Gets the sub channel namespace.
public void setSubcontainerMaxDepth(int subcontainerMaxDepth)
Sets the subcontainer maximum depth.
Specify at which level in the tree to start using materialised path representation of subcontainers rather than separate containers. A subscription to a container at the level of maximum depth will return all items below it in the tree. Each item's location in the tree will be represented Address field as if in actual subcontainers.
public int getSubContainerMaxDepth()
Gets the max depth of the sub containers.
public void setAutoPermit(boolean autoPermit)
Sets auto permit enabled/disabled.
Configures whether Liberator should automatically allow subscriptions to every Blotter item within a BlotterChannel or it should check the permissions for every BlotterItem. If the DataSource is trusted, it should only send out updates that that user is permissioned for so checking isn't strictly necessary.
autoPermit
- whether to automatically permit BlotterItems or not.public boolean isAutoPermit()
Gets whether automatically permitted.
public java.lang.String getBlotterIdentifier()
Gets the blotter identifier name.
public void setAutoSendEmptyContainer()
Sets whether an empty container should automatically be sent or now when the channel opens
public boolean isAutoSendEmptyContainer()
Gets whether an empty container should be send automatically as a response to a request
Default: true
public void setUseGenericObjects(boolean useGenericObjects)
Set whether the API should use generic objects instead of Type1 records.
Default: false
useGenericObjects
- true for generic objectspublic boolean isUseGenericObjects()
Gets whether generic objects should be used instead of Type1 Records
public void setMoveItemToTopWhenModified(boolean moveItemToTopWhenModified)
Sets whether to move an existing item to the top of the container when sendBlotterItem with an Item with the same ID gets called again
Default: false
moveItemToTopWhenModified
- true to move item to the top, false to leave existing items where they arepublic boolean isMoveItemToTopWhenModified()
Gets whether items should be moved to the top of the container upon modification
public boolean isPrefixIdWithIdentifier()
When true then the ID will be prefixed with the blotterIdentifier followed by a dash. Default is true.
Changing this to false breaks setups where two providers supply different rows of the same blotter!
public void setPrefixIdWithIdentifier(boolean prefixIdWithIdentifier)
Set to false to turn off prefixing of ID's with the blotterIdentifier followed by a -.
Changing this to false breaks setups where two providers supply different rows of the same blotter
prefixIdWithIdentifier
- default: truepublic void setContainerThrottleMillis(int millis)
Specify the millisecond delay used to throttle subsequent operations to a single container. This essentially combines multiple addElement calls into one single container update if all the adds happen within the throttle millisecond period
millis
- millisecond delay used for throttlingpublic int getContainerThrottleMillis()
Get the current millisecond delay used for container throttling
public java.lang.String toString()
toString
in class java.lang.Object
Please send bug reports and comments to Caplin support