Class DefaultSendSystem
java.lang.Object
net.dv8tion.jda.api.audio.factory.DefaultSendSystem
- All Implemented Interfaces:
- IAudioSendSystem
The default implementation of the 
This implementation uses a Java thread, named based on:
IAudioSendSystem.
 This implementation uses a Java thread, named based on:
IPacketProvider.getIdentifier() + " Sending Thread".- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidsetContextMap(ConcurrentMap<String, String> contextMap) Called with the internal JDAMDCcontext map.voidshutdown()This represents the destruction of this instance and should be used to perform all necessary cleanup and shutdown operations needed to free resources.voidstart()This represents the start of the loop, similar toThread.start(), and after a call to this method JDA assumes that the instance will be sending UDP audio packets in a loop.
- 
Constructor Details- 
DefaultSendSystem
 
- 
- 
Method Details- 
setContextMapDescription copied from interface:IAudioSendSystemCalled with the internal JDAMDCcontext map.
 This is guaranteed to be called beforeIAudioSendSystem.start().- Specified by:
- setContextMapin interface- IAudioSendSystem
- Parameters:
- contextMap- The JDA internal MDC context map, or- nullif disabled
 
- 
startpublic void start()Description copied from interface:IAudioSendSystemThis represents the start of the loop, similar toThread.start(), and after a call to this method JDA assumes that the instance will be sending UDP audio packets in a loop.Note: The packet sending loop should NOT be started on the current thread. I.E: This method should not block forever, in the same way that Thread.start()does not. Just like in Thread, the running action of this system should be implemented asynchronously.- Specified by:
- startin interface- IAudioSendSystem
 
- 
shutdownpublic void shutdown()Description copied from interface:IAudioSendSystemThis represents the destruction of this instance and should be used to perform all necessary cleanup and shutdown operations needed to free resources.Note: This method can be called at any time after instance creation ( IAudioSendSystem.start()may not yet have been called), and it is possible that this method could be called more than once due to edge-case shutdown conditions.- Specified by:
- shutdownin interface- IAudioSendSystem
 
 
-