|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.fourthline.cling.transport.impl.DatagramProcessorImpl
public class DatagramProcessorImpl
Default implementation.
Constructor Summary | |
---|---|
DatagramProcessorImpl()
|
Method Summary | |
---|---|
IncomingDatagramMessage |
read(InetAddress receivedOnAddress,
DatagramPacket datagram)
Reads the datagram and instantiates a message. |
protected IncomingDatagramMessage |
readRequestMessage(InetAddress receivedOnAddress,
DatagramPacket datagram,
ByteArrayInputStream is,
String requestMethod,
String httpProtocol)
|
protected IncomingDatagramMessage |
readResponseMessage(InetAddress receivedOnAddress,
DatagramPacket datagram,
ByteArrayInputStream is,
int statusCode,
String statusMessage,
String httpProtocol)
|
DatagramPacket |
write(OutgoingDatagramMessage message)
Creates a UDP datagram with the content of a message. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DatagramProcessorImpl()
Method Detail |
---|
public IncomingDatagramMessage read(InetAddress receivedOnAddress, DatagramPacket datagram) throws UnsupportedDataException
DatagramProcessor
The message is either a UpnpRequest
or
a UpnpResponse
operation type.
read
in interface DatagramProcessor
receivedOnAddress
- The address of the socket on which this datagram was received.datagram
- The received UDP datagram.
UnsupportedDataException
- If the datagram could not be read, or didn't contain required data.public DatagramPacket write(OutgoingDatagramMessage message) throws UnsupportedDataException
DatagramProcessor
The outgoing message might be a UpnpRequest
or a
UpnpResponse
.
write
in interface DatagramProcessor
message
- The outgoing datagram message.
UnsupportedDataException
- If the datagram could not be created.protected IncomingDatagramMessage readRequestMessage(InetAddress receivedOnAddress, DatagramPacket datagram, ByteArrayInputStream is, String requestMethod, String httpProtocol) throws Exception
Exception
protected IncomingDatagramMessage readResponseMessage(InetAddress receivedOnAddress, DatagramPacket datagram, ByteArrayInputStream is, int statusCode, String statusMessage, String httpProtocol) throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |