EventHandlerImpl<T> Class
- java.
lang. Object - com.
microsoft. cognitiveservices. speech. util. EventHandlerImpl<T>
- com.
Type Parameters
- T
public class EventHandlerImpl
Implements the binding between the Speech SDK core event handler and Java event handling.
Constructor Summary
Constructor | Description |
---|---|
EventHandlerImpl(AtomicInteger runCounter) |
Creates and initializes a new instance of the Event |
Method Summary
Modifier and Type | Method and Description |
---|---|
void |
addEventListener(EventHandler<T> handler)
Registers a new event handler with the associated event. |
void |
fireEvent(Object sender, T e)
Fires an event by calling sequentially all registered handlers. |
boolean |
isUpdateNotificationOnConnectedFired()
Checks if a client has subscribed to events. |
void |
removeEventListener(EventHandler<T> handler)
Unregisters the event handler from the associated event. |
void |
updateNotificationOnConnected(Runnable notifyConnectedOnce)
Updates the handler to be notified when the first client subscribes to the event. |
Methods inherited from java.lang.Object
Constructor Details
EventHandlerImpl
public EventHandlerImpl(AtomicInteger runCounter)
Creates and initializes a new instance of the EventHandlerImpl.
Parameters:
Method Details
addEventListener
public void addEventListener(EventHandler
Registers a new event handler with the associated event.
Parameters:
fireEvent
public void fireEvent(Object sender, T e)
Fires an event by calling sequentially all registered handlers.
Parameters:
isUpdateNotificationOnConnectedFired
public boolean isUpdateNotificationOnConnectedFired()
Checks if a client has subscribed to events.
Returns:
removeEventListener
public void removeEventListener(EventHandler
Unregisters the event handler from the associated event.
Parameters:
updateNotificationOnConnected
public void updateNotificationOnConnected(Runnable notifyConnectedOnce)
Updates the handler to be notified when the first client subscribes to the event.
Parameters:
Applies to
Azure SDK for Java
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기