Package ball.upnp.ssdp
Class SSDPDiscoveryCache
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.concurrent.ConcurrentSkipListMap<URI,SSDPMessage>
-
- ball.upnp.ssdp.SSDPDiscoveryCache
-
- All Implemented Interfaces:
SSDPDiscoveryService.Listener
,Serializable
,Cloneable
,ConcurrentMap<URI,SSDPMessage>
,ConcurrentNavigableMap<URI,SSDPMessage>
,Map<URI,SSDPMessage>
,NavigableMap<URI,SSDPMessage>
,SortedMap<URI,SSDPMessage>
public class SSDPDiscoveryCache extends ConcurrentSkipListMap<URI,SSDPMessage> implements SSDPDiscoveryService.Listener
SSDP discovery cache implementation.- Author:
- Allen D. Ball
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Constructor Summary
Constructors Constructor Description SSDPDiscoveryCache()
-
Method Summary
All Methods Instance 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
.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
.-
Methods inherited from class java.util.concurrent.ConcurrentSkipListMap
ceilingEntry, ceilingKey, clear, clone, comparator, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, descendingKeySet, descendingMap, entrySet, equals, firstEntry, firstKey, floorEntry, floorKey, forEach, get, getOrDefault, headMap, headMap, higherEntry, higherKey, isEmpty, keySet, lastEntry, lastKey, lowerEntry, lowerKey, merge, navigableKeySet, pollFirstEntry, pollLastEntry, put, putIfAbsent, remove, remove, replace, replace, replaceAll, size, subMap, subMap, tailMap, tailMap, values
-
Methods inherited from class java.util.AbstractMap
hashCode, putAll, toString
-
-
-
-
Constructor Detail
-
SSDPDiscoveryCache
public SSDPDiscoveryCache()
-
-
Method Detail
-
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
.
-
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
.
-
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
.
-
-