Package org.jupnp.protocol.async
Klasse ReceivingSearch
- Alle implementierten Schnittstellen:
Runnable
Handles reception of search requests, responds for local registered devices.
Waits a random time between 0 and the requested MX (maximum 120 seconds) before executing. Only waits if there are actually any registered local devices.
Extracts the search target, builds and sends the dozens of messages
required by the UPnP specification, depending on the search target and what
local devices and services are found in the Registry.
- Autor:
- Christian Bauer
-
Feldübersicht
Felder -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungReceivingSearch(UpnpService upnpService, IncomingDatagramMessage<UpnpRequest> inputMessage) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected List<OutgoingSearchResponse> createDeviceMessages(LocalDevice device, NetworkAddress activeStreamServer) protected List<OutgoingSearchResponse> createServiceTypeMessages(LocalDevice device, NetworkAddress activeStreamServer) protected voidexecute()protected LocationgetDescriptorLocation(NetworkAddress activeStreamServer, LocalDevice device) protected booleanisAdvertisementDisabled(LocalDevice device) protected voidOverride this to edit the outgoing message, e.g. by adding headers.protected voidsendResponses(UpnpHeader searchTarget, NetworkAddress activeStreamServer) protected voidsendSearchResponseAll(NetworkAddress activeStreamServer) protected voidsendSearchResponseDeviceType(DeviceType deviceType, NetworkAddress activeStreamServer) protected voidsendSearchResponseRootDevices(NetworkAddress activeStreamServer) protected voidsendSearchResponseServiceType(ServiceType serviceType, NetworkAddress activeStreamServer) protected voidsendSearchResponseUDN(UDN udn, NetworkAddress activeStreamServer) protected booleanProvides an opportunity to pause before executing the protocol.Von Klasse geerbte Methoden org.jupnp.protocol.ReceivingAsync
getFirstHeader, getInputMessage, getUpnpService, run, toString
-
Felddetails
-
randomGenerator
-
-
Konstruktordetails
-
ReceivingSearch
-
-
Methodendetails
-
execute
- Angegeben von:
executein KlasseReceivingAsync<IncomingSearchRequest>- Löst aus:
RouterException
-
waitBeforeExecution
Beschreibung aus Klasse kopiert:ReceivingAsyncProvides an opportunity to pause before executing the protocol.- Setzt außer Kraft:
waitBeforeExecutionin KlasseReceivingAsync<IncomingSearchRequest>- Gibt zurück:
true(default) if execution should continue after waiting.- Löst aus:
InterruptedException- If waiting has been interrupted, which also stops execution.
-
sendResponses
protected void sendResponses(UpnpHeader searchTarget, NetworkAddress activeStreamServer) throws RouterException - Löst aus:
RouterException
-
sendSearchResponseAll
- Löst aus:
RouterException
-
createDeviceMessages
protected List<OutgoingSearchResponse> createDeviceMessages(LocalDevice device, NetworkAddress activeStreamServer) -
createServiceTypeMessages
protected List<OutgoingSearchResponse> createServiceTypeMessages(LocalDevice device, NetworkAddress activeStreamServer) -
sendSearchResponseRootDevices
protected void sendSearchResponseRootDevices(NetworkAddress activeStreamServer) throws RouterException - Löst aus:
RouterException
-
sendSearchResponseUDN
protected void sendSearchResponseUDN(UDN udn, NetworkAddress activeStreamServer) throws RouterException - Löst aus:
RouterException
-
sendSearchResponseDeviceType
protected void sendSearchResponseDeviceType(DeviceType deviceType, NetworkAddress activeStreamServer) throws RouterException - Löst aus:
RouterException
-
sendSearchResponseServiceType
protected void sendSearchResponseServiceType(ServiceType serviceType, NetworkAddress activeStreamServer) throws RouterException - Löst aus:
RouterException
-
getDescriptorLocation
-
isAdvertisementDisabled
-
prepareOutgoingSearchResponse
Override this to edit the outgoing message, e.g. by adding headers.
-