Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.teleal.cling.protocol.sync
Class ReceivingAction

    java.lang.Object
      org.teleal.cling.protocol.ReceivingAsync<IN>
          org.teleal.cling.protocol.ReceivingSync<StreamRequestMessage,StreamResponseMessage>
              org.teleal.cling.protocol.sync.ReceivingAction

All Implemented Interfaces:
  Runnable

    public class ReceivingAction

extends ReceivingSync<StreamRequestMessage,StreamResponseMessage>

Handles reception of control messages, invoking actions on local services.

Actions are invoked through the `ActionExecutor` returned by the registered `LocalService.getExecutor(org.teleal.cling.model.meta.Action)` method.

This class offers two shortcut thread-local variables, which providers of UPnP services might find useful in some situations. You can access these methods statically from within your service implementation:

- The `getRequestMessage()` static method offers access to the original action request message, including all received HTTP headers, etc.
- The `getExtraResponseHeaders()` static method offers modifiable HTTP headers which will be added to the action response after the invocation, and returned to the client.

Author:
  Christian Bauer

Field Summary
`protected static ThreadLocal<UpnpHeaders>` | `extraResponseHeadersThreadLocal`
`protected static ThreadLocal<IncomingActionRequestMessage>` | `requestThreadLocal`

Fields inherited from class org.teleal.cling.protocol.ReceivingSync
`outputMessage`

Constructor Summary
`ReceivingAction(UpnpService upnpService, StreamRequestMessage inputMessage)`

Method Summary
`protected StreamResponseMessage` | `executeSync()`
`static UpnpHeaders` | `getExtraResponseHeaders()`
`static IncomingActionRequestMessage` | `getRequestMessage()`

Methods inherited from class org.teleal.cling.protocol.ReceivingSync
`execute, getOutputMessage, responseException, responseSent, toString`

Methods inherited from class org.teleal.cling.protocol.ReceivingAsync
`getFirstHeader, getInputMessage, getUpnpService, run, waitBeforeExecution`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### requestThreadLocal

    protected static final ThreadLocal<IncomingActionRequestMessage> requestThreadLocal

### extraResponseHeadersThreadLocal

    protected static final ThreadLocal<UpnpHeaders> extraResponseHeadersThreadLocal

Constructor Detail

### ReceivingAction

    public ReceivingAction(UpnpService upnpService,
                           StreamRequestMessage inputMessage)

Method Detail

### executeSync

    protected StreamResponseMessage executeSync()

  Specified by:
    `executeSync` in class `ReceivingSync<StreamRequestMessage,StreamResponseMessage>`

### getRequestMessage

    public static IncomingActionRequestMessage getRequestMessage()

### getExtraResponseHeaders

    public static UpnpHeaders getExtraResponseHeaders()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010 Teleal GmbH, Switzerland. All Rights Reserved.