public abstract class FXBlotter extends Object
Base class for blotter subject data. An instance of this class contains the blotter container and item subject regex. It is also able to create blotter container and item subjects for a given username.
You only need to create your own subclass of FXBlotter if your application has departed from the subjects used for the standard four blotters in the FX Motif, or if you want to add your own blotter. If you are using the standard FX Motif blotters, rather than creating your own subclass of FXBlotter you can simply use one of the four existing subclasses:
Modifier and Type | Field and Description |
---|---|
static FXBlotter |
ACTIVITY
The
FXBlotter for the Activity blotter, which holds the regex
for the Activity blotter container subject and its constituents. |
static FXBlotter |
EXECUTION
The
FXBlotter for the Execution blotter, which holds the regex
for the Execution blotter container subject and its constituents. |
static FXBlotter |
HISTORIC
The
FXBlotter for the Historic blotter, which holds the regex
for the Historic blotter container subject and its constituents. |
static FXBlotter |
ORDER
The
FXBlotter for the Order blotter, which holds the regex
for the Order blotter container subject and its constituents. |
Constructor and Description |
---|
FXBlotter(String containerRegex,
String itemRegex,
String containerSuffix,
String itemSuffix)
Constructs the FXBlotter with the given regex's and subject
suffixes.
|
Modifier and Type | Method and Description |
---|---|
String |
decodeItemId(String id)
Decodes the item ID using UTF-8 URL encoding.
|
protected String |
encodeItemId(String id)
Applies UTF-8 URL encoding to the provided ID.
|
String |
getBlotterContainerRegex()
Returns the blotter container regex, used in parsing/recognising blotter container requests.
|
String |
getBlotterItemRegex()
Returns the blotter record item regex, used in parsing/recognising blotter record item requests.
|
String |
getBlotterItemSubject(String username,
String itemId)
Returns the string representing the blotter record item subject with the given username,
and id.
|
String |
getBlotterSubject(String username)
Returns the string representing the blotter container subject with the given user name.
|
abstract BlotterMessageBuilder |
newItemBuilder(String username,
String itemId,
com.caplin.datasource.messaging.record.GenericMessage record)
Deprecated.
|
public static final FXBlotter ACTIVITY
FXBlotter
for the Activity blotter, which holds the regex
for the Activity blotter container subject and its constituents.public static final FXBlotter EXECUTION
FXBlotter
for the Execution blotter, which holds the regex
for the Execution blotter container subject and its constituents.public static final FXBlotter HISTORIC
FXBlotter
for the Historic blotter, which holds the regex
for the Historic blotter container subject and its constituents.public FXBlotter(String containerRegex, String itemRegex, String containerSuffix, String itemSuffix)
containerRegex
- The Container subject regexitemRegex
- The regex for the Record constituents of the ContainercontainerSuffix
- The suffix to be used when constructing a container subjectitemSuffix
- The suffix to be used when constructing a constituent record item subjectpublic String getBlotterContainerRegex()
public String getBlotterItemRegex()
public String getBlotterSubject(String username)
username
- The username to be used as part of the container subject.public String getBlotterItemSubject(String username, String itemId)
username
- The username to be used as part of the record item subject.itemId
- The id to be used as part of the record item subjectprotected String encodeItemId(String id)
id
- The ID to encode.RuntimeException
- If your JVM does not support the UTF-8 encoding.public String decodeItemId(String id)
id
- The ID to be decoded.RuntimeException
- If your JVM does not support the UTF-8 encoding.@Deprecated public abstract BlotterMessageBuilder newItemBuilder(String username, String itemId, com.caplin.datasource.messaging.record.GenericMessage record)
FXBlotterItemMessageFactory.newItemBuilder(String, String)
or FXCachedBlotterMessage.newItemBuilder(String)
instead.username
- The username that the message relates to.itemId
- The ID of the blotter item.record
- The record that the message should be sent on.Copyright © 2015 Caplin Systems.