public abstract class PublisherBase extends Object
Modifier and Type | Field and Description |
---|---|
protected StreamConfigContext |
configContext |
protected org.wso2.carbon.databridge.agent.DataPublisher |
publisher |
Constructor and Description |
---|
PublisherBase() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
addMetaDataAttributes(org.wso2.carbon.databridge.commons.StreamDefinition definition)
Adds meta data attributes to the stream definition.
|
protected abstract void |
addPayloadDataAttributes(org.wso2.carbon.databridge.commons.StreamDefinition definition)
Adds the Payload data attributes to the stream definition.
|
protected org.wso2.carbon.databridge.commons.StreamDefinition |
createStreamDefinition() |
protected abstract String |
getDataStreamName()
get the data stream name for data stream.
|
boolean |
isPublishable()
This method indicates whether this Publisher is in a publishable situation.
|
protected Integer |
mapNull(Integer value)
Maps null Integers to zero
|
protected Long |
mapNull(Long value)
Maps null Long values to zero
|
protected String |
mapNull(String value)
Map null String to -
|
protected void |
publish(org.wso2.carbon.databridge.commons.Event event)
Publish the given event to the data stream.
|
protected StreamConfigContext configContext
protected volatile org.wso2.carbon.databridge.agent.DataPublisher publisher
public PublisherBase() throws BAMPublisherConfigurationException
public boolean isPublishable()
protected abstract void addPayloadDataAttributes(org.wso2.carbon.databridge.commons.StreamDefinition definition)
definition
- the Stream definitionprotected abstract void addMetaDataAttributes(org.wso2.carbon.databridge.commons.StreamDefinition definition)
definition
- the Stream definitionprotected abstract String getDataStreamName()
protected org.wso2.carbon.databridge.commons.StreamDefinition createStreamDefinition() throws BAMPublisherConfigurationException
protected void publish(org.wso2.carbon.databridge.commons.Event event) throws MonitoringPublisherException
event
- the event to be published.MonitoringPublisherException
protected Integer mapNull(Integer value)
value
- protected Long mapNull(Long value)
value
- @param value The value that should be mapped.Copyright © 2019 WSO2. All rights reserved.