Package ball.upnp.ssdp
Class SSDPDiscoveryService.RequestHandler
- java.lang.Object
-
- ball.upnp.ssdp.SSDPDiscoveryService.RequestHandler
-
- All Implemented Interfaces:
SSDPDiscoveryService.Listener
- Enclosing class:
- SSDPDiscoveryService
public abstract static class SSDPDiscoveryService.RequestHandler extends Object implements SSDPDiscoveryService.Listener
SSDPDiscoveryService
SSDPRequest
handler.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
RequestHandler(SSDPRequest.Method method)
Sole constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
receiveEvent(SSDPDiscoveryService service, DatagramSocket socket, SSDPMessage message)
Callback made after receiving aSSDPMessage
.void
register(SSDPDiscoveryService service)
Callback when aSSDPDiscoveryService.Listener
is added to aSSDPDiscoveryService
.abstract void
run(SSDPDiscoveryService service, DatagramSocket socket, SSDPRequest request)
void
sendEvent(SSDPDiscoveryService service, DatagramSocket socket, SSDPMessage message)
Callback made just before sending aSSDPMessage
.void
unregister(SSDPDiscoveryService service)
Callback when aSSDPDiscoveryService.Listener
is removed from aSSDPDiscoveryService
.
-
-
-
Constructor Detail
-
RequestHandler
protected RequestHandler(SSDPRequest.Method method)
Sole constructor.- Parameters:
method
- TheSSDPRequest.Method
to handle.
-
-
Method Detail
-
run
public abstract void run(SSDPDiscoveryService service, DatagramSocket socket, SSDPRequest request)
-
register
public void register(SSDPDiscoveryService service)
Description copied from interface:SSDPDiscoveryService.Listener
Callback when aSSDPDiscoveryService.Listener
is added to aSSDPDiscoveryService
.- Specified by:
register
in interfaceSSDPDiscoveryService.Listener
- Parameters:
service
- TheSSDPDiscoveryService
.
-
unregister
public void unregister(SSDPDiscoveryService service)
Description copied from interface:SSDPDiscoveryService.Listener
Callback when aSSDPDiscoveryService.Listener
is removed from aSSDPDiscoveryService
.- Specified by:
unregister
in interfaceSSDPDiscoveryService.Listener
- Parameters:
service
- TheSSDPDiscoveryService
.
-
receiveEvent
public void receiveEvent(SSDPDiscoveryService service, DatagramSocket socket, SSDPMessage message)
Description copied from interface:SSDPDiscoveryService.Listener
Callback made after receiving aSSDPMessage
.- Specified by:
receiveEvent
in interfaceSSDPDiscoveryService.Listener
- Parameters:
service
- TheSSDPDiscoveryService
.socket
- TheDatagramSocket
.message
- TheSSDPMessage
.
-
sendEvent
public void sendEvent(SSDPDiscoveryService service, DatagramSocket socket, SSDPMessage message)
Description copied from interface:SSDPDiscoveryService.Listener
Callback made just before sending aSSDPMessage
.- Specified by:
sendEvent
in interfaceSSDPDiscoveryService.Listener
- Parameters:
service
- TheSSDPDiscoveryService
.socket
- TheDatagramSocket
.message
- TheSSDPMessage
.
-
-