org.fourthline.cling.protocol.sync
Class ReceivingSubscribe
java.lang.Object
org.fourthline.cling.protocol.ReceivingAsync<IN>
org.fourthline.cling.protocol.ReceivingSync<StreamRequestMessage,OutgoingSubscribeResponseMessage>
org.fourthline.cling.protocol.sync.ReceivingSubscribe
- All Implemented Interfaces:
- Runnable
public class ReceivingSubscribe
- extends ReceivingSync<StreamRequestMessage,OutgoingSubscribeResponseMessage>
Handles reception of GENA event subscription (initial and renewal) messages.
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.
- Author:
- Christian Bauer
subscription
protected LocalGENASubscription subscription
ReceivingSubscribe
public ReceivingSubscribe(UpnpService upnpService,
StreamRequestMessage inputMessage)
executeSync
protected OutgoingSubscribeResponseMessage executeSync()
throws RouterException
- Specified by:
executeSync
in class ReceivingSync<StreamRequestMessage,OutgoingSubscribeResponseMessage>
- Throws:
RouterException
processRenewal
protected OutgoingSubscribeResponseMessage processRenewal(LocalService service,
IncomingSubscribeRequestMessage requestMessage)
processNewSubscription
protected OutgoingSubscribeResponseMessage processNewSubscription(LocalService service,
IncomingSubscribeRequestMessage requestMessage)
responseSent
public void responseSent(StreamResponseMessage responseMessage)
- Description copied from class:
ReceivingSync
- Called by the client of this protocol after the returned response has been successfully delivered.
NOOP by default.
- Overrides:
responseSent
in class ReceivingSync<StreamRequestMessage,OutgoingSubscribeResponseMessage>
responseException
public void responseException(Throwable t)
- Description copied from class:
ReceivingSync
- Called by the client of this protocol if the returned response was not delivered.
NOOP by default.
- Overrides:
responseException
in class ReceivingSync<StreamRequestMessage,OutgoingSubscribeResponseMessage>
- Parameters:
t
- The reason why the response wasn't delivered.
Copyright © 2013 4th Line GmbH, Switzerland. All Rights Reserved.