java.lang.Object
- All Implemented Interfaces:
Serializable, Cloneable, Iterable<SSDPNotifySocket>, Collection<SSDPNotifySocket>, List<SSDPNotifySocket>, RandomAccess, SequencedCollection<SSDPNotifySocket>
A list of SSDP notification sockets for receiving SSDP notify messages.
This class manages multiple
This class manages multiple
SSDPNotifySocket instances to handle SSDP notifications across different network interfaces and addresses.- See Also:
Field Summary
FieldsFields inherited from class Vector
capacityIncrement, elementCount, elementDataFields inherited from class AbstractList
modCountConstructor Summary
ConstructorsConstructorDescriptionCreates an empty socket list with no explicit bind addresses.SSDPNotifySocketList(InetAddress[] binds) Create a socket list bound to the given addresses.Method Summary
All MethodsModifier and TypeMethodDescriptionvoidclose()Closes every socket in this list and empties it.getSSDPNotifySocket(int n) Returns the notify socket at the given index.booleanopen()Opens a notify socket per bind address.voidsetControlPoint(ControlPoint ctrlPoint) Hands the control point to every socket in this list.voidstart()Starts the notification thread on every socket in this list.voidstop()Stops the notification thread on every socket in this list.Methods inherited from class Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, forEach, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeIf, removeRange, replaceAll, retainAll, set, setElementAt, setSize, size, sort, spliterator, subList, toArray, toArray, toString, trimToSizeMethods inherited from interface Collection
parallelStream, stream, toArrayMethods inherited from interface List
addFirst, addLast, getFirst, getLast, removeFirst, removeLast, reversed
Field Details
binds
/////////////////////////////////////////////
Constructor Details
SSDPNotifySocketList
public SSDPNotifySocketList()Creates an empty socket list with no explicit bind addresses.SSDPNotifySocketList
Create a socket list bound to the given addresses.- Parameters:
binds- The host to bind the servicenullmeans to bind to default.
Method Details
getSSDPNotifySocket
Returns the notify socket at the given index.- Parameters:
n- the zero-based index of the socket in this list- Returns:
- the notify socket bound to that address
setControlPoint
Hands the control point to every socket in this list.- Parameters:
ctrlPoint- the control point handed to every socket in this list
open
public boolean open()Opens a notify socket per bind address.- Returns:
- true once the sockets are opened, even if some bind addresses failed
close
public void close()Closes every socket in this list and empties it.start
public void start()Starts the notification thread on every socket in this list.stop
public void stop()Stops the notification thread on every socket in this list.