org.fourthline.cling.protocol.sync

## Class SendingUnsubscribe

- java.lang.Object
- - org.fourthline.cling.protocol.SendingAsync
  - - org.fourthline.cling.protocol.SendingSync<OutgoingUnsubscribeRequestMessage,StreamResponseMessage>
    - - org.fourthline.cling.protocol.sync.SendingUnsubscribe

- All Implemented Interfaces:
    Runnable

      public class SendingUnsubscribe
      extends SendingSync<OutgoingUnsubscribeRequestMessage,StreamResponseMessage>

  Disconnecting a GENA event subscription with a remote host.

  Calls the `RemoteGENASubscription.end(org.fourthline.cling.model.gena.CancelReason, org.fourthline.cling.model.message.UpnpResponse)` method if the subscription request was responded to correctly. No `CancelReason` will be provided if the unsubscribe procedure completed as expected, otherwise `UNSUBSCRIBE_FAILED` is used. The response might be `null` if no response was received from the remote host.

  Author:
    Christian Bauer

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected RemoteGENASubscription` | `subscription`

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

      `outputMessage`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SendingUnsubscribe(UpnpService upnpService, RemoteGENASubscription subscription)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected StreamResponseMessage` | `executeSync()`
    `protected void` | `onUnsubscribe(StreamResponseMessage response)`

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

      `execute, getInputMessage, getOutputMessage, toString`

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

      `getUpnpService, run`

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

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

- - ### Field Detail

    - #### subscription

          protected final RemoteGENASubscription subscription

  - ### Constructor Detail

    - #### SendingUnsubscribe

          public SendingUnsubscribe(UpnpService upnpService,
                                    RemoteGENASubscription subscription)

  - ### Method Detail

    - #### executeSync

          protected StreamResponseMessage executeSync()
                                               throws RouterException

      Specified by:
        `executeSync` in class `SendingSync<OutgoingUnsubscribeRequestMessage,StreamResponseMessage>`
      Throws:
        `RouterException`

    - #### onUnsubscribe

          protected void onUnsubscribe(StreamResponseMessage response)

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