org.fourthline.cling.model.message

## Class IncomingDatagramMessage<O extends UpnpOperation>

- java.lang.Object
- - org.fourthline.cling.model.message.UpnpMessage<O>
  - - org.fourthline.cling.model.message.IncomingDatagramMessage<O>

- Direct Known Subclasses:
    IncomingNotificationRequest, IncomingSearchRequest, IncomingSearchResponse

      public class IncomingDatagramMessage<O extends UpnpOperation>
      extends UpnpMessage<O>

  A received UDP datagram request or response message, with source address and port.

  Additionally, holds a local address that is reachable from the source address (in the same subnet):

  - When an M-SEARCH is received, we send a LOCATION header back with a reachable (by the remote control point) local address.
  - When a NOTIFY discovery message (can be a search response) is received we need to memorize on which local address it was received, so that the we can later give the remote device a reachable (from its point of view) local GENA callback address.
  Author:
    Christian Bauer

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.fourthline.cling.model.message.UpnpMessage

      `UpnpMessage.BodyType`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `IncomingDatagramMessage(IncomingDatagramMessage<O> source)`
    `` | `IncomingDatagramMessage(O operation, InetAddress sourceAddress, int sourcePort, InetAddress localAddress)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `InetAddress` | `getLocalAddress()`
    `InetAddress` | `getSourceAddress()`
    `int` | `getSourcePort()`

    - ### Methods inherited from class org.fourthline.cling.model.message.UpnpMessage

      `getBody, getBodyBytes, getBodyString, getBodyType, getContentTypeCharset, getContentTypeHeader, getHeaders, getOperation, getUdaMajorVersion, getUdaMinorVersion, hasBody, hasHostHeader, isBodyNonEmptyString, isContentTypeMissingOrText, isContentTypeText, isContentTypeTextUDA, setBody, setBody, setBodyCharacters, setBodyType, setHeaders, setUdaMajorVersion, setUdaMinorVersion, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### IncomingDatagramMessage

          public IncomingDatagramMessage(O operation,
                                         InetAddress sourceAddress,
                                         int sourcePort,
                                         InetAddress localAddress)

    - #### IncomingDatagramMessage

          protected IncomingDatagramMessage(IncomingDatagramMessage<O> source)

  - ### Method Detail

    - #### getSourceAddress

          public InetAddress getSourceAddress()

    - #### getSourcePort

          public int getSourcePort()

    - #### getLocalAddress

          public InetAddress getLocalAddress()

Copyright © 2015 4th Line GmbH, Switzerland. All rights reserved.