Package org.jupnp.transport.spi
Schnittstelle DatagramProcessor
- Alle bekannten Implementierungsklassen:
DatagramProcessorImpl
public interface DatagramProcessor
Reads and creates UDP datagrams from and into UPnP messages.
An implementation of this interface has to be thread-safe.
- Autor:
- Christian Bauer
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungread(InetAddress receivedOnAddress, DatagramPacket datagram) Reads the datagram and instantiates a message.write(OutgoingDatagramMessage message) Creates a UDP datagram with the content of a message.
-
Methodendetails
-
read
IncomingDatagramMessage read(InetAddress receivedOnAddress, DatagramPacket datagram) throws UnsupportedDataException Reads the datagram and instantiates a message.The message is either a
UpnpRequestor aUpnpResponseoperation type.- Parameter:
receivedOnAddress- The address of the socket on which this datagram was received.datagram- The received UDP datagram.- Gibt zurück:
- The populated instance.
- Löst aus:
UnsupportedDataException- If the datagram could not be read, or didn't contain required data.
-
write
Creates a UDP datagram with the content of a message.The outgoing message might be a
UpnpRequestor aUpnpResponse.- Parameter:
message- The outgoing datagram message.- Gibt zurück:
- An actual UDP datagram.
- Löst aus:
UnsupportedDataException- If the datagram could not be created.
-