M
- The type of UPnP message handled by this protocol.public abstract class ReceivingAsync<M extends UpnpMessage> extends Object implements Runnable
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()
.
Modifier | Constructor and Description |
---|---|
protected |
ReceivingAsync(UpnpService upnpService,
M inputMessage) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
execute() |
protected <H extends UpnpHeader> |
getFirstHeader(UpnpHeader.Type headerType,
Class<H> subtype) |
M |
getInputMessage() |
UpnpService |
getUpnpService() |
void |
run() |
String |
toString() |
protected boolean |
waitBeforeExecution()
Provides an opportunity to pause before executing the protocol.
|
protected ReceivingAsync(UpnpService upnpService, M inputMessage)
public UpnpService getUpnpService()
public M getInputMessage()
protected boolean waitBeforeExecution() throws InterruptedException
true
(default) if execution should continue after waiting.InterruptedException
- If waiting has been interrupted, which also stops execution.protected abstract void execute() throws RouterException
RouterException
protected <H extends UpnpHeader> H getFirstHeader(UpnpHeader.Type headerType, Class<H> subtype)
Copyright © 2016 4th Line GmbH, Switzerland. All rights reserved.