org.fourthline.cling.protocol.async

## Class SendingSearch

- java.lang.Object
- - org.fourthline.cling.protocol.SendingAsync
  - - org.fourthline.cling.protocol.async.SendingSearch

- All Implemented Interfaces:
    Runnable

      public class SendingSearch
      extends SendingAsync

  Sending search request messages using the supplied search type.

  Sends all search messages 5 times, waits 0 to 500 milliseconds between each sending procedure.

  Author:
    Christian Bauer

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SendingSearch(UpnpService upnpService)` Defaults to `STAllHeader` and an MX of 3 seconds.
    `SendingSearch(UpnpService upnpService, UpnpHeader searchTarget)` Defaults to an MX value of 3 seconds.
    `SendingSearch(UpnpService upnpService, UpnpHeader searchTarget, int mxSeconds)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `execute()`
    `int` | `getBulkIntervalMilliseconds()`
    `int` | `getBulkRepeat()`
    `int` | `getMxSeconds()`
    `UpnpHeader` | `getSearchTarget()`
    `protected void` | `prepareOutgoingSearchRequest(OutgoingSearchRequest message)` Override this to edit the outgoing message, e.g.

    - ### Methods inherited from class org.fourthline.cling.protocol.SendingAsync

      `getUpnpService, run, toString`

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

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

- - ### Constructor Detail

    - #### SendingSearch

          public SendingSearch(UpnpService upnpService)

      Defaults to `STAllHeader` and an MX of 3 seconds.

    - #### SendingSearch

          public SendingSearch(UpnpService upnpService,
                       UpnpHeader searchTarget)

      Defaults to an MX value of 3 seconds.

    - #### SendingSearch

          public SendingSearch(UpnpService upnpService,
                       UpnpHeader searchTarget,
                       int mxSeconds)

      Parameters:
        `mxSeconds` - The time in seconds a host should wait before responding.

  - ### Method Detail

    - #### getSearchTarget

          public UpnpHeader getSearchTarget()

    - #### getMxSeconds

          public int getMxSeconds()

    - #### execute

          protected void execute()
                          throws RouterException

      Specified by:
        `execute` in class `SendingAsync`
      Throws:
        `RouterException`

    - #### getBulkRepeat

          public int getBulkRepeat()

    - #### getBulkIntervalMilliseconds

          public int getBulkIntervalMilliseconds()

    - #### prepareOutgoingSearchRequest

          protected void prepareOutgoingSearchRequest(OutgoingSearchRequest message)

      Override this to edit the outgoing message, e.g. by adding headers.

Copyright © 2014 4th Line GmbH, Switzerland. All Rights Reserved.