@FunctionalInterface public interface ShortDatagramProvider
short readDatagram() throws org.refcodes.component.OpenException, InterruptedException
DatagramSendercounterpart. In case none short is available, then this method blocks until one is available. To prevent blocking, use the
#hasDatagram()method to test beforehand whether a short is available (in a multi-threaded usage scenario,
#hasDatagram()is not a reliable indicator whether this method will block or not). When a
Threadis waiting for a short to be read and
Thread.interrupt()is being called, then the operation is aborted and an
org.refcodes.component.OpenException- Thrown in case opening or accessing an open line (connection, junction, link) caused problems.
InterruptedException- Thrown when a
Threadis waiting, sleeping, or otherwise occupied, and the
Threadis interrupted, either before or during the activity.
Copyright © 2017. All rights reserved.