org.fourthline.cling.protocol
Class SendingSync<IN extends StreamRequestMessage,OUT extends StreamResponseMessage>

java.lang.Object
  extended by org.fourthline.cling.protocol.SendingAsync
      extended by org.fourthline.cling.protocol.SendingSync<IN,OUT>
Type Parameters:
IN - The type of request UPnP message send by this protocol.
OUT - The type of response UPnP message expected by this protocol.
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
SendingAction, SendingEvent, SendingRenewal, SendingSubscribe, SendingUnsubscribe

public abstract class SendingSync<IN extends StreamRequestMessage,OUT extends StreamResponseMessage>
extends SendingAsync

Supertype for all synchronously executing protocols, sending UPnP messages.

After instantiation by the ProtocolFactory, this protocol run()s and calls its executeSync() method.

Author:
Christian Bauer

Field Summary
protected  OUT outputMessage
           
 
Constructor Summary
protected SendingSync(UpnpService upnpService, IN inputMessage)
           
 
Method Summary
protected  void execute()
           
protected abstract  OUT executeSync()
           
 IN getInputMessage()
           
 OUT getOutputMessage()
           
 String toString()
           
 
Methods inherited from class org.fourthline.cling.protocol.SendingAsync
getUpnpService, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

outputMessage

protected OUT extends StreamResponseMessage outputMessage
Constructor Detail

SendingSync

protected SendingSync(UpnpService upnpService,
                      IN inputMessage)
Method Detail

getInputMessage

public IN getInputMessage()

getOutputMessage

public OUT getOutputMessage()

execute

protected final void execute()
Specified by:
execute in class SendingAsync

executeSync

protected abstract OUT executeSync()

toString

public String toString()
Overrides:
toString in class SendingAsync


Copyright © 2013 4th Line GmbH, Switzerland. All Rights Reserved.