public class ReceivingSubscribe extends ReceivingSync<StreamRequestMessage,OutgoingSubscribeResponseMessage>
This protocol tries to find a local event subscription URI matching the requested URI,
then creates a new LocalGENASubscription
if no
subscription identifer was supplied.
The subscription is however only registered with the local service, and monitoring of state changes is established, if the response of this protocol was successfully delivered to the client which requested the subscription.
Once registration and monitoring is active, an initial event with the current state of the service is send to the subscriber. This will only happen after the subscription response message was successfully delivered to the subscriber.
Modifier and Type | Field and Description |
---|---|
protected LocalGENASubscription |
subscription |
outputMessage, remoteClientInfo
Constructor and Description |
---|
ReceivingSubscribe(UpnpService upnpService,
StreamRequestMessage inputMessage) |
Modifier and Type | Method and Description |
---|---|
protected OutgoingSubscribeResponseMessage |
executeSync() |
protected OutgoingSubscribeResponseMessage |
processNewSubscription(LocalService service,
IncomingSubscribeRequestMessage requestMessage) |
protected OutgoingSubscribeResponseMessage |
processRenewal(LocalService service,
IncomingSubscribeRequestMessage requestMessage) |
void |
responseException(Throwable t)
Called by the client of this protocol if the returned response was not delivered.
|
void |
responseSent(StreamResponseMessage responseMessage)
Called by the client of this protocol after the returned response has been successfully delivered.
|
execute, getOutputMessage, getRemoteClientInfo, toString
getFirstHeader, getInputMessage, getUpnpService, run, waitBeforeExecution
protected LocalGENASubscription subscription
public ReceivingSubscribe(UpnpService upnpService, StreamRequestMessage inputMessage)
protected OutgoingSubscribeResponseMessage executeSync() throws RouterException
executeSync
in class ReceivingSync<StreamRequestMessage,OutgoingSubscribeResponseMessage>
RouterException
protected OutgoingSubscribeResponseMessage processRenewal(LocalService service, IncomingSubscribeRequestMessage requestMessage)
protected OutgoingSubscribeResponseMessage processNewSubscription(LocalService service, IncomingSubscribeRequestMessage requestMessage)
public void responseSent(StreamResponseMessage responseMessage)
ReceivingSync
NOOP by default.
responseSent
in class ReceivingSync<StreamRequestMessage,OutgoingSubscribeResponseMessage>
public void responseException(Throwable t)
ReceivingSync
NOOP by default.
responseException
in class ReceivingSync<StreamRequestMessage,OutgoingSubscribeResponseMessage>
t
- The reason why the response wasn't delivered.Copyright © 2016 4th Line GmbH, Switzerland. All rights reserved.