Package net.dv8tion.jda.api.hooks
Class InterfacedEventManager
- java.lang.Object
- 
- net.dv8tion.jda.api.hooks.InterfacedEventManager
 
- 
- All Implemented Interfaces:
- IEventManager
 
 public class InterfacedEventManager extends java.lang.Object implements IEventManager AnIEventManagerimplementation that uses theEventListenerinterface for event listeners.This only accepts listeners that implement EventListener
 An adapter implementation isListenerAdapterwhich provides methods for each individualEvent.This is the default IEventManager used by JDA - See Also:
- AnnotatedEventManager,- IEventManager
 
- 
- 
Constructor SummaryConstructors Constructor Description InterfacedEventManager()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.Object>getRegisteredListeners()The currently registered listenersvoidhandle(GenericEvent event)Handles the providedGenericEvent.voidregister(java.lang.Object listener)Registers the specified listener
 Accepted types may be specified by implementationsvoidunregister(java.lang.Object listener)Removes the specified listener
 
- 
- 
- 
Method Detail- 
registerpublic void register(@Nonnull java.lang.Object listener)Registers the specified listener
 Accepted types may be specified by implementations- Specified by:
- registerin interface- IEventManager
- Parameters:
- listener- A listener object
- Throws:
- java.lang.IllegalArgumentException- If the provided listener does not implement- EventListener
 
 - 
unregisterpublic void unregister(@Nonnull java.lang.Object listener)Description copied from interface:IEventManagerRemoves the specified listener- Specified by:
- unregisterin interface- IEventManager
- Parameters:
- listener- The listener object to remove
 
 - 
getRegisteredListeners@Nonnull public java.util.List<java.lang.Object> getRegisteredListeners() Description copied from interface:IEventManagerThe currently registered listeners- Specified by:
- getRegisteredListenersin interface- IEventManager
- Returns:
- A list of listeners that have already been registered
 
 - 
handlepublic void handle(@Nonnull GenericEvent event)Description copied from interface:IEventManagerHandles the providedGenericEvent.
 How this is handled is specified by the implementation.An implementation should not throw exceptions. - Specified by:
- handlein interface- IEventManager
- Parameters:
- event- The event to handle
 
 
- 
 
-