org.fourthline.cling.protocol.sync

## Class SendingAction

- java.lang.Object
- - org.fourthline.cling.protocol.SendingAsync
  - - org.fourthline.cling.protocol.SendingSync<OutgoingActionRequestMessage,IncomingActionResponseMessage>
    - - org.fourthline.cling.protocol.sync.SendingAction

- All Implemented Interfaces:
    Runnable

      public class SendingAction
      extends SendingSync<OutgoingActionRequestMessage,IncomingActionResponseMessage>

  Sending control message, transforming a local `ActionInvocation`.

  Writes the outgoing message's body with the `SOAPActionProcessor`. This protocol will return `null` if no response was received from the control target host. In all other cases, even if only the processing of message content failed, this protocol will return an `IncomingActionResponseMessage`. Any error details of a failed response (`UpnpResponse.isFailed()`) are available with `ActionInvocation.setFailure(org.fourthline.cling.model.action.ActionException)`.

  Author:
    Christian Bauer

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ActionInvocation` | `actionInvocation`

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

      `outputMessage`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SendingAction(UpnpService upnpService, ActionInvocation actionInvocation, URL controlURL)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected IncomingActionResponseMessage` | `executeSync()`
    `protected void` | `handleResponse(IncomingActionResponseMessage responseMsg)`
    `protected void` | `handleResponseFailure(IncomingActionResponseMessage responseMsg)`
    `protected IncomingActionResponseMessage` | `invokeRemote(OutgoingActionRequestMessage requestMessage)`
    `protected StreamResponseMessage` | `sendRemoteRequest(OutgoingActionRequestMessage requestMessage)`

    - ### 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

    - #### actionInvocation

          protected final ActionInvocation actionInvocation

  - ### Constructor Detail

    - #### SendingAction

          public SendingAction(UpnpService upnpService,
                       ActionInvocation actionInvocation,
                       URL controlURL)

  - ### Method Detail

    - #### executeSync

          protected IncomingActionResponseMessage executeSync()
                                                       throws RouterException

      Specified by:
        `executeSync` in class `SendingSync<OutgoingActionRequestMessage,IncomingActionResponseMessage>`
      Throws:
        `RouterException`

    - #### invokeRemote

          protected IncomingActionResponseMessage invokeRemote(OutgoingActionRequestMessage requestMessage)
                                                        throws RouterException

      Throws:
        `RouterException`

    - #### sendRemoteRequest

          protected StreamResponseMessage sendRemoteRequest(OutgoingActionRequestMessage requestMessage)
                                                     throws ActionException,
                                                            RouterException

      Throws:
        `ActionException`
        `RouterException`

    - #### handleResponse

          protected void handleResponse(IncomingActionResponseMessage responseMsg)
                                 throws ActionException

      Throws:
        `ActionException`

    - #### handleResponseFailure

          protected void handleResponseFailure(IncomingActionResponseMessage responseMsg)
                                        throws ActionException

      Throws:
        `ActionException`

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