public class CloudEventServiceKafkaImpl extends java.lang.Object implements CloudEventServicePlus, java.io.Closeable
构造器和说明 |
---|
CloudEventServiceKafkaImpl(CloudProps cloudProps) |
限定符和类型 | 方法和说明 |
---|---|
void |
attention(EventLevel level,
java.lang.String channel,
java.lang.String group,
java.lang.String topic,
java.lang.String tag,
int qos,
CloudEventHandler observer)
关注事件(相当于订阅)
|
void |
close() |
java.lang.String |
getChannel()
获取通道配置
|
java.lang.String |
getGroup()
获取默认分组配置(即给所有的发送和订阅加上分组)
|
boolean |
onReceive(Event event)
处理接收事件
|
boolean |
publish(Event event)
发布事件
|
void |
subscribe() |
public CloudEventServiceKafkaImpl(CloudProps cloudProps)
public boolean publish(Event event) throws CloudEventException
CloudEventService
publish
在接口中 CloudEventService
event
- 事件CloudEventException
public void attention(EventLevel level, java.lang.String channel, java.lang.String group, java.lang.String topic, java.lang.String tag, int qos, CloudEventHandler observer)
CloudEventService
attention
在接口中 CloudEventService
level
- 事件级别channel
- 通道group
- 分组topic
- 主题tag
- 标签qos
- 服务质量observer
- 观察者public void subscribe()
public boolean onReceive(Event event) throws java.lang.Throwable
java.lang.Throwable
public java.lang.String getChannel()
CloudEventServicePlus
getChannel
在接口中 CloudEventServicePlus
public java.lang.String getGroup()
CloudEventServicePlus
getGroup
在接口中 CloudEventServicePlus
public void close() throws java.io.IOException
close
在接口中 java.io.Closeable
close
在接口中 java.lang.AutoCloseable
java.io.IOException