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
requestThreadLocal
protected static final ThreadLocal<IncomingActionRequestMessage> requestThreadLocal
extraResponseHeadersThreadLocal
protected static final ThreadLocal<UpnpHeaders> extraResponseHeadersThreadLocal
ReceivingAction
public ReceivingAction(UpnpService upnpService,
StreamRequestMessage inputMessage)
executeSync
protected StreamResponseMessage executeSync()
- Specified by:
executeSync
in class ReceivingSync<StreamRequestMessage,StreamResponseMessage>
getRequestMessage
public static IncomingActionRequestMessage getRequestMessage()
getExtraResponseHeaders
public static UpnpHeaders getExtraResponseHeaders()
Copyright © 2011 Teleal GmbH, Switzerland. All Rights Reserved.