Package org.jupnp.protocol
Klasse ReceivingSync<IN extends StreamRequestMessage,OUT extends StreamResponseMessage>
java.lang.Object
org.jupnp.protocol.ReceivingAsync<IN>
org.jupnp.protocol.ReceivingSync<IN,OUT>
- Typparameter:
IN- The type of incoming UPnP message handled by this protocol.OUT- The type of response UPnP message created by this protocol.
- Alle implementierten Schnittstellen:
Runnable
- Bekannte direkte Unterklassen:
ReceivingAction,ReceivingEvent,ReceivingRetrieval,ReceivingSubscribe,ReceivingUnsubscribe
public abstract class ReceivingSync<IN extends StreamRequestMessage,OUT extends StreamResponseMessage>
extends ReceivingAsync<IN>
Supertype for all synchronously executing protocols, handling reception of UPnP messages and return a response.
After instantiation by the ProtocolFactory, this protocol run()s and
calls its own ReceivingAsync.waitBeforeExecution() method. By default, the protocol does not wait
before then proceeding with executeSync().
The returned response will be available to the client of this protocol. The
client will then call either responseSent(org.jupnp.model.message.StreamResponseMessage)
or responseException(Throwable), depending on whether the response was successfully
delivered. The protocol can override these methods to decide if the whole procedure it is
implementing was successful or not, including not only creation but also delivery of the response.
- Autor:
- Christian Bauer
-
Feldübersicht
Felder -
Konstruktorübersicht
KonstruktorenModifiziererKonstruktorBeschreibungprotectedReceivingSync(UpnpService upnpService, IN inputMessage) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected final voidexecute()protected abstract OUTvoidCalled by the client of this protocol if the returned response was not delivered.voidresponseSent(StreamResponseMessage responseMessage) Called by the client of this protocol after the returned response has been successfully delivered.toString()Von Klasse geerbte Methoden org.jupnp.protocol.ReceivingAsync
getFirstHeader, getInputMessage, getUpnpService, run, waitBeforeExecution
-
Felddetails
-
remoteClientInfo
-
outputMessage
-
-
Konstruktordetails
-
ReceivingSync
-
-
Methodendetails
-
getOutputMessage
-
execute
- Angegeben von:
executein KlasseReceivingAsync<IN extends StreamRequestMessage>- Löst aus:
RouterException
-
executeSync
- Löst aus:
RouterException
-
responseSent
Called by the client of this protocol after the returned response has been successfully delivered.NOOP by default.
-
responseException
Called by the client of this protocol if the returned response was not delivered.NOOP by default.
- Parameter:
t- The reason why the response wasn't delivered.
-
getRemoteClientInfo
-
toString
- Setzt außer Kraft:
toStringin KlasseReceivingAsync<IN extends StreamRequestMessage>
-