Package org.jumpmind.symmetric.integrate
Class AbstractXmlPublisherExtensionPoint
java.lang.Object
org.jumpmind.symmetric.integrate.AbstractXmlPublisherExtensionPoint
- All Implemented Interfaces:
IExtensionPoint
,INodeGroupExtensionPoint
,ISymmetricEngineAware
,org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanNameAware
- Direct Known Subclasses:
XmlPublisherDatabaseWriterFilter
,XmlPublisherDataRouter
@ManagedResource(description="The management interface for an xml publisher")
public abstract class AbstractXmlPublisherExtensionPoint
extends Object
implements IExtensionPoint, INodeGroupExtensionPoint, ISymmetricEngineAware, org.springframework.beans.factory.BeanNameAware
An abstract class that accumulates data to publish.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected long
protected ISymmetricEngine
protected long
protected final org.slf4j.Logger
protected String
protected long
protected IPublisher
protected long
protected final String
protected org.jdom2.output.Format
protected String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addFormattedExtraGroupAttributes
(Context context, org.jdom2.Element xml) Give the opportunity for the user of this publisher to add in additional attributes.protected boolean
doesXmlExistToPublish
(Context context) protected void
finalizeXmlAndPublish
(Context context) String[]
getXmlCache
(Context context) protected org.jdom2.Element
getXmlFromCache
(Context context, BinaryEncoding binaryEncoding, String[] columnNames, String[] data, String[] keyNames, String[] keys) protected static final org.jdom2.Namespace
boolean
void
setBeanName
(String name) void
setGroupByColumnNames
(List<String> groupByColumnNames) This attribute is required.void
setNodeGroup
(String nodeGroup) void
setNodeGroups
(String[] nodeGroups) void
setPublisher
(IPublisher publisher) void
setSymmetricEngine
(ISymmetricEngine engine) void
setTableNamesToPublishAsGroup
(Set<String> tableNamesToPublishAsGroup) void
setTableNameToPublish
(String tableName) void
setTimeBetweenStatisticsPrintTime
(long timeBetweenStatisticsPrintTime) void
setTimeStringGenerator
(AbstractXmlPublisherExtensionPoint.ITimeGenerator timeStringGenerator) Used to populate the time attribute of an XML message.void
setXmlFormat
(org.jdom2.output.Format xmlFormat) void
setXmlTagNameToUseForGroup
(String xmlTagNameToUseForGroup) protected void
toXmlElement
(DataEventType dml, org.jdom2.Element xml, String catalogName, String schemaName, String tableName, String[] columnNames, String[] data, String[] keyNames, String[] keys) protected String
toXmlGroupId
(String[] columnNames, String[] data, String[] keyNames, String[] keys)
-
Field Details
-
log
protected final org.slf4j.Logger log -
XML_CACHE
-
publisher
-
tableNamesToPublishAsGroup
-
xmlTagNameToUseForGroup
-
groupByColumnNames
-
xmlFormat
protected org.jdom2.output.Format xmlFormat -
name
-
engine
-
timeBetweenStatisticsPrintTime
protected long timeBetweenStatisticsPrintTime -
lastStatisticsPrintTime
protected transient long lastStatisticsPrintTime -
numberOfMessagesPublishedSinceLastPrintTime
protected transient long numberOfMessagesPublishedSinceLastPrintTime -
amountOfTimeToPublishMessagesSinceLastPrintTime
protected transient long amountOfTimeToPublishMessagesSinceLastPrintTime -
timeStringGenerator
-
-
Constructor Details
-
AbstractXmlPublisherExtensionPoint
public AbstractXmlPublisherExtensionPoint()
-
-
Method Details
-
setBeanName
- Specified by:
setBeanName
in interfaceorg.springframework.beans.factory.BeanNameAware
-
resend
@ManagedOperation(description="Looks up rows in the database and resends them to the publisher") @ManagedOperationParameters(@ManagedOperationParameter(name="args",description="A pipe deliminated list of key values to use to look up the tables to resend")) public boolean resend(String args) -
getKeyColumnNames
@ManagedAttribute(description="A comma separated list of columns that act as the key values for the tables that will be published") public String getKeyColumnNames() -
getTableNames
@ManagedAttribute(description="A comma separated list of tables that will be published") public String getTableNames() -
readData
-
getXmlNamespace
protected static final org.jdom2.Namespace getXmlNamespace() -
getXmlCache
-
doesXmlExistToPublish
-
finalizeXmlAndPublish
-
toXmlElement
-
replaceInvalidChars
-
addFormattedExtraGroupAttributes
Give the opportunity for the user of this publisher to add in additional attributes. The default implementation adds in the nodeId from theContext
.- Parameters:
context
-xml
- append XML attributes to this buffer
-
getXmlFromCache
-
toXmlGroupId
-
getNodeGroupIdsToApplyTo
- Specified by:
getNodeGroupIdsToApplyTo
in interfaceINodeGroupExtensionPoint
-
setNodeGroups
-
setNodeGroup
-
setPublisher
-
setTimeStringGenerator
public void setTimeStringGenerator(AbstractXmlPublisherExtensionPoint.ITimeGenerator timeStringGenerator) Used to populate the time attribute of an XML message. -
setXmlFormat
public void setXmlFormat(org.jdom2.output.Format xmlFormat) -
setTableNamesToPublishAsGroup
-
setTableNameToPublish
-
setXmlTagNameToUseForGroup
-
setTimeBetweenStatisticsPrintTime
public void setTimeBetweenStatisticsPrintTime(long timeBetweenStatisticsPrintTime) -
setGroupByColumnNames
This attribute is required. It needs to identify the columns that will be used to key on rows in the specified tables that need to be grouped together in an 'XML batch.' -
setSymmetricEngine
- Specified by:
setSymmetricEngine
in interfaceISymmetricEngineAware
-