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, toStringgetFirstHeader, getInputMessage, getUpnpService, run, waitBeforeExecutionprotected LocalGENASubscription subscription
public ReceivingSubscribe(UpnpService upnpService, StreamRequestMessage inputMessage)
protected OutgoingSubscribeResponseMessage executeSync() throws RouterException
executeSync in class ReceivingSync<StreamRequestMessage,OutgoingSubscribeResponseMessage>RouterExceptionprotected OutgoingSubscribeResponseMessage processRenewal(LocalService service, IncomingSubscribeRequestMessage requestMessage)
protected OutgoingSubscribeResponseMessage processNewSubscription(LocalService service, IncomingSubscribeRequestMessage requestMessage)
public void responseSent(StreamResponseMessage responseMessage)
ReceivingSyncNOOP by default.
responseSent in class ReceivingSync<StreamRequestMessage,OutgoingSubscribeResponseMessage>public void responseException(Throwable t)
ReceivingSyncNOOP by default.
responseException in class ReceivingSync<StreamRequestMessage,OutgoingSubscribeResponseMessage>t - The reason why the response wasn't delivered.Copyright © 2023 jUPnP.org. All rights reserved.