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 longprotected ISymmetricEngineprotected longprotected final org.slf4j.Loggerprotected Stringprotected longprotected IPublisherprotected longprotected final Stringprotected org.jdom2.output.Formatprotected String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddFormattedExtraGroupAttributes(Context context, org.jdom2.Element xml) Give the opportunity for the user of this publisher to add in additional attributes.protected booleandoesXmlExistToPublish(Context context) protected voidfinalizeXmlAndPublish(Context context) String[]getXmlCache(Context context) protected org.jdom2.ElementgetXmlFromCache(Context context, BinaryEncoding binaryEncoding, String[] columnNames, String[] data, String[] keyNames, String[] keys) protected static final org.jdom2.NamespacebooleanvoidsetBeanName(String name) voidsetGroupByColumnNames(List<String> groupByColumnNames) This attribute is required.voidsetNodeGroup(String nodeGroup) voidsetNodeGroups(String[] nodeGroups) voidsetPublisher(IPublisher publisher) voidsetSymmetricEngine(ISymmetricEngine engine) voidsetTableNamesToPublishAsGroup(Set<String> tableNamesToPublishAsGroup) voidsetTableNameToPublish(String tableName) voidsetTimeBetweenStatisticsPrintTime(long timeBetweenStatisticsPrintTime) voidsetTimeStringGenerator(AbstractXmlPublisherExtensionPoint.ITimeGenerator timeStringGenerator) Used to populate the time attribute of an XML message.voidsetXmlFormat(org.jdom2.output.Format xmlFormat) voidsetXmlTagNameToUseForGroup(String xmlTagNameToUseForGroup) protected voidtoXmlElement(DataEventType dml, org.jdom2.Element xml, String catalogName, String schemaName, String tableName, String[] columnNames, String[] data, String[] keyNames, String[] keys) protected StringtoXmlGroupId(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:
setBeanNamein 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:
getNodeGroupIdsToApplyToin 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:
setSymmetricEnginein interfaceISymmetricEngineAware
-