本文整理汇总了Java中sx.blah.discord.api.events.Event类的典型用法代码示例。如果您正苦于以下问题:Java Event类的具体用法?Java Event怎么用?Java Event使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Event类属于sx.blah.discord.api.events包,在下文中一共展示了Event类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: IListenerAdaptor
import sx.blah.discord.api.events.Event; //导入依赖的package包/类
IListenerAdaptor(EventDispatcher dispatcher) {
this.dispatcher = dispatcher;
dispatcher.registerListener(new IListener() {
@Override
public void handle(Event event) {
emitters.forEach(emitter -> emitter.onNext(event));
}
});
}
开发者ID:Discord4J-Addons,项目名称:D4J-Rx,代码行数:10,代码来源:RxJavaEventAdapter.java
示例2: IListenerAdaptor
import sx.blah.discord.api.events.Event; //导入依赖的package包/类
IListenerAdaptor(EventDispatcher dispatcher) {
this.dispatcher = dispatcher;
dispatcher.registerListener(new IListener() {
@Override
public void handle(Event event) {
sinks.forEach(sink -> sink.next(event));
}
});
}
开发者ID:Discord4J-Addons,项目名称:D4J-Rx,代码行数:10,代码来源:ReactorEventAdapter.java
示例3: getEventType
import sx.blah.discord.api.events.Event; //导入依赖的package包/类
@NotNull
Class<? extends Event> getEventType();
开发者ID:ViniciusArnhold,项目名称:ProjectAltaria,代码行数:3,代码来源:IReceiver.java
示例4: registerListener
import sx.blah.discord.api.events.Event; //导入依赖的package包/类
private <T extends IReceiver & IListener<? extends Event>> void registerListener(@NotNull T eventListener) {
discordClient.getDispatcher().registerListener(eventListener);
eventListeners.add(eventListener);
}
开发者ID:ViniciusArnhold,项目名称:ProjectAltaria,代码行数:5,代码来源:EventManager.java
示例5: getEventType
import sx.blah.discord.api.events.Event; //导入依赖的package包/类
@NotNull
@Override
public Class<? extends Event> getEventType() {
return MessageReceivedEvent.class;
}
开发者ID:ViniciusArnhold,项目名称:ProjectAltaria,代码行数:6,代码来源:MessageReceivedEventReceiver.java
示例6: ourBotName
import sx.blah.discord.api.events.Event; //导入依赖的package包/类
public static String ourBotName(Event event) {
return ourBotName(event.getClient());
}
开发者ID:quanticc,项目名称:sentry,代码行数:4,代码来源:DiscordUtil.java
示例7: ourBotId
import sx.blah.discord.api.events.Event; //导入依赖的package包/类
public static String ourBotId(Event event) {
return ourBotId(event.getClient());
}
开发者ID:quanticc,项目名称:sentry,代码行数:4,代码来源:DiscordUtil.java
示例8: stream
import sx.blah.discord.api.events.Event; //导入依赖的package包/类
@Override
public <T extends Event> Publisher<T> stream(Class<T> c) {
return new PublisherListener<>(dispatcher, c);
}
开发者ID:Discord4J-Addons,项目名称:D4J-Rx,代码行数:5,代码来源:IEventAdapter.java
示例9: streamAll
import sx.blah.discord.api.events.Event; //导入依赖的package包/类
@Override
public Publisher<Event> streamAll() {
return new PublisherListener<>(dispatcher, Event.class);
}
开发者ID:Discord4J-Addons,项目名称:D4J-Rx,代码行数:5,代码来源:IEventAdapter.java
示例10: subscribe
import sx.blah.discord.api.events.Event; //导入依赖的package包/类
@Override
public void subscribe(FlowableEmitter<Event> e) throws Exception {
emitters.add(e);
}
开发者ID:Discord4J-Addons,项目名称:D4J-Rx,代码行数:5,代码来源:RxJavaEventAdapter.java
示例11: accept
import sx.blah.discord.api.events.Event; //导入依赖的package包/类
@Override
public void accept(FluxSink<Event> eventFluxSink) {
sinks.add(eventFluxSink);
}
开发者ID:Discord4J-Addons,项目名称:D4J-Rx,代码行数:5,代码来源:ReactorEventAdapter.java
示例12: stream
import sx.blah.discord.api.events.Event; //导入依赖的package包/类
/**
* @see IEventAdapter#stream(Class)
*
* Note that this returns a {@link Flowable} instance rather than {@link org.reactivestreams.Publisher}.
*/
@Override
public <T extends Event> Flowable<T> stream(Class<T> c) {
return eventFlowable.ofType(c);
}
开发者ID:Discord4J-Addons,项目名称:D4J-Rx,代码行数:10,代码来源:RxJavaEventAdapter.java
示例13: streamAll
import sx.blah.discord.api.events.Event; //导入依赖的package包/类
/**
* @see IEventAdapter#streamAll()
*
* Note that this returns a {@link Flowable} instance rather than {@link org.reactivestreams.Publisher}.
*/
@Override
public Flowable<Event> streamAll() {
return eventFlowable;
}
开发者ID:Discord4J-Addons,项目名称:D4J-Rx,代码行数:10,代码来源:RxJavaEventAdapter.java
示例14: stream
import sx.blah.discord.api.events.Event; //导入依赖的package包/类
/**
* @see IEventAdapter#stream(Class)
*
* Note that this returns a {@link Flux} instance rather than {@link org.reactivestreams.Publisher}.
*/
@Override
public <T extends Event> Flux<T> stream(Class<T> c) {
return flux.ofType(c);
}
开发者ID:Discord4J-Addons,项目名称:D4J-Rx,代码行数:10,代码来源:ReactorEventAdapter.java
示例15: streamAll
import sx.blah.discord.api.events.Event; //导入依赖的package包/类
/**
* @see IEventAdapter#streamAll()
*
* Note that this returns a {@link Flux} instance rather than {@link org.reactivestreams.Publisher}.
*/
@Override
public Flux<Event> streamAll() {
return flux;
}
开发者ID:Discord4J-Addons,项目名称:D4J-Rx,代码行数:10,代码来源:ReactorEventAdapter.java
注:本文中的sx.blah.discord.api.events.Event类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论