org.fourthline.cling.mock

## Class MockUpnpService.MockProtocolFactory

- java.lang.Object
- - org.fourthline.cling.protocol.ProtocolFactoryImpl
  - - org.fourthline.cling.mock.MockUpnpService.MockProtocolFactory

- All Implemented Interfaces:
    ProtocolFactory
  Enclosing class:
    MockUpnpService

      public static class MockUpnpService.MockProtocolFactory
      extends ProtocolFactoryImpl

  This factory customizes several protocols.

  The `SendingNotificationAlive` protocol only sends messages if this feature is enabled when instantiating the factory.

  The `SendingSearch` protocol doesn't wait between sending search message bulks, this speeds up testing.

- - ### Field Summary

    - ### Fields inherited from class org.fourthline.cling.protocol.ProtocolFactoryImpl

      `upnpService`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MockUpnpService.MockProtocolFactory(UpnpService upnpService, boolean sendsAlive)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `SendingNotificationAlive` | `createSendingNotificationAlive(LocalDevice localDevice)` Called by the `Registry`, creates a protocol for announcing local devices.
    `SendingSearch` | `createSendingSearch(UpnpHeader searchTarget, int mxSeconds)` Called by the `ControlPoint`, creates a protocol for a multicast search.

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

      `createReceivingAction, createReceivingAsync, createReceivingEvent, createReceivingNotification, createReceivingRetrieval, createReceivingSearch, createReceivingSearchResponse, createReceivingSubscribe, createReceivingSync, createReceivingUnsubscribe, createSendingAction, createSendingEvent, createSendingNotificationByebye, createSendingRenewal, createSendingSubscribe, createSendingUnsubscribe, getUpnpService, isByeBye, isSupportedServiceAdvertisement`

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

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

- - ### Constructor Detail

    - #### MockUpnpService.MockProtocolFactory

          public MockUpnpService.MockProtocolFactory(UpnpService upnpService,
                                             boolean sendsAlive)

  - ### Method Detail

    - #### createSendingNotificationAlive

          public SendingNotificationAlive createSendingNotificationAlive(LocalDevice localDevice)

      Description copied from interface: `ProtocolFactory`
      Called by the `Registry`, creates a protocol for announcing local devices.
      Specified by:
        `createSendingNotificationAlive` in interface `ProtocolFactory`
      Overrides:
        `createSendingNotificationAlive` in class `ProtocolFactoryImpl`

    - #### createSendingSearch

          public SendingSearch createSendingSearch(UpnpHeader searchTarget,
                                          int mxSeconds)

      Description copied from interface: `ProtocolFactory`
      Called by the `ControlPoint`, creates a protocol for a multicast search.
      Specified by:
        `createSendingSearch` in interface `ProtocolFactory`
      Overrides:
        `createSendingSearch` in class `ProtocolFactoryImpl`

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