Klasse ReceivingAsync<M extends UpnpMessage>

java.lang.Object
org.jupnp.protocol.ReceivingAsync<M>
Typparameter:
M - The type of UPnP message handled by this protocol.
Alle implementierten Schnittstellen:
Runnable
Bekannte direkte Unterklassen:
ReceivingNotification, ReceivingSearch, ReceivingSearchResponse, ReceivingSync

public abstract class ReceivingAsync<M extends UpnpMessage> extends Object implements Runnable
Supertype for all asynchronously executing protocols, handling reception of UPnP messages.

After instantiation by the ProtocolFactory, this protocol run()s and calls its own waitBeforeExecution() method. By default, the protocol does not wait before then proceeding with execute().

Autor:
Christian Bauer
  • Konstruktordetails

    • ReceivingAsync

      protected ReceivingAsync(UpnpService upnpService, M inputMessage)
  • Methodendetails

    • getUpnpService

      public UpnpService getUpnpService()
    • getInputMessage

      public M getInputMessage()
    • run

      public void run()
      Angegeben von:
      run in Schnittstelle Runnable
    • waitBeforeExecution

      protected boolean waitBeforeExecution() throws InterruptedException
      Provides an opportunity to pause before executing the protocol.
      Gibt zurück:
      true (default) if execution should continue after waiting.
      Löst aus:
      InterruptedException - If waiting has been interrupted, which also stops execution.
    • execute

      protected abstract void execute() throws RouterException
      Löst aus:
      RouterException
    • getFirstHeader

      protected <H extends UpnpHeader> H getFirstHeader(UpnpHeader.Type headerType, Class<H> subtype)
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object