本文整理了Java中org.wso2.carbon.databridge.commons.Event.setPayloadData()
方法的一些代码示例,展示了Event.setPayloadData()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Event.setPayloadData()
方法的具体详情如下:
包路径:org.wso2.carbon.databridge.commons.Event
类名称:Event
方法名:setPayloadData
暂无
代码示例来源:origin: org.apache.stratos/org.apache.stratos.cartridge.agent
public void publish(DataContext dataContext) {
Event event = new Event();
event.setTimeStamp(new Date().getTime());
event.setMetaData(dataContext.getMetaData());
event.setPayloadData(dataContext.getPayloadData());
try {
dataPublisher.publish(streamDefinition.getName(), streamDefinition.getVersion(), event);
} catch (AgentException e) {
String errorMsg = "Error in publishing event";
log.error(errorMsg, e);
// no need to throw here
}
}
代码示例来源:origin: org.wso2.carbon.business-process/org.wso2.carbon.bpel.bam.publisher
private Event createEvent(String streamId, BAMStreamConfiguration stream,
ExtensionContext context, Element element)
throws FaultException {
Event e = new Event();
e.setStreamId(streamId);
e.setTimeStamp(System.currentTimeMillis());
e.setCorrelationData(createCorrelationData(stream, context, element));
e.setMetaData(createMetadata(stream, context, element));
e.setPayloadData(createPayloadData(stream, context, element));
return e;
}
代码示例来源:origin: org.wso2.extension.siddhi.map.wso2event/siddhi-map-wso2event
payloadArray[i] = eventData[this.payloadDataPositions[i]];
wso2event.setPayloadData(payloadArray);
代码示例来源:origin: org.wso2.carbon.analytics/org.wso2.carbon.analytics.datasink
private void updateEvent(Event oldEvent, Event newEvent) {
oldEvent.setArbitraryDataMap(newEvent.getArbitraryDataMap());
oldEvent.setCorrelationData(newEvent.getCorrelationData());
oldEvent.setMetaData(newEvent.getMetaData());
oldEvent.setPayloadData(newEvent.getPayloadData());
oldEvent.setStreamId(newEvent.getStreamId());
oldEvent.setTimeStamp(newEvent.getTimeStamp());
}
}
代码示例来源:origin: org.wso2.carbon.analytics-common/org.wso2.carbon.databridge.receiver.binary
public Event getEvent(ByteBuffer byteBuffer, StreamTypeHolder streamTypeHolder) throws MalformedEventException {
long timeStamp = byteBuffer.getLong();
int streamIdSize = byteBuffer.getInt();
String streamId = BinaryMessageConverterUtil.getString(byteBuffer, streamIdSize);
Event event = new Event();
event.setStreamId(streamId);
event.setTimeStamp(timeStamp);
AttributeType[][] attributeTypeOrder = streamTypeHolder.getDataType(event.getStreamId());
if (attributeTypeOrder == null) {
streamTypeHolder.reloadStreamTypeHolder();
attributeTypeOrder = streamTypeHolder.getDataType(event.getStreamId());
if (attributeTypeOrder == null) {
throw new EventConversionException("No StreamDefinition for streamId " + event.getStreamId()
+ " present in cache ");
}
}
event.setMetaData(this.toObjectArray(byteBuffer, attributeTypeOrder[0],
BinaryDataReceiverConstants.META_DATA_FIELD));
event.setCorrelationData(this.toObjectArray(byteBuffer, attributeTypeOrder[1],
BinaryDataReceiverConstants.CORRELATION_DATA_FIELD));
event.setPayloadData(this.toObjectArray(byteBuffer, attributeTypeOrder[2],
BinaryDataReceiverConstants.PAYLOAD_DATA_FIELD));
event.setArbitraryDataMap(this.toStringMap(byteBuffer));
return event;
}
代码示例来源:origin: org.wso2.carbon.analytics-common/org.wso2.carbon.databridge.receiver.thrift
event.setPayloadData(this.toObjectArray(thriftEventBundle, attributeTypeOrder[2], indexCounter));
if (thriftEventBundle.isSetArbitraryDataMapMap()) {
Map<String, String> arbitraryData = thriftEventBundle.getArbitraryDataMapMap().get(i);
代码示例来源:origin: org.wso2.carbon.analytics/org.wso2.carbon.databridge.receiver.thrift
event.setPayloadData(this.toObjectArray(thriftEventBundle, attributeTypeOrder[2], indexCounter));
if (thriftEventBundle.isSetArbitraryDataMapMap()) {
Map<String, String> arbitraryData = thriftEventBundle.getArbitraryDataMapMap().get(i);
代码示例来源:origin: org.wso2.carbon.commons/org.wso2.carbon.databridge.receiver.thrift
event.setPayloadData(this.toObjectArray(thriftEventBundle, attributeTypeOrder[2], indexCounter));
if (thriftEventBundle.isSetArbitraryDataMapMap()) {
Map<String, String> arbitraryData = thriftEventBundle.getArbitraryDataMapMap().get(i);
内容来源于网络,如有侵权,请联系作者删除!