public class HTTPServerList extends Vector<HTTPServer>
capacityIncrement, elementCount, elementDatamodCount| Constructor and Description |
|---|
HTTPServerList()
Creates a new empty HTTPServerList.
|
HTTPServerList(InetAddress[] list,
int port)
Creates a new HTTPServerList with specified bind addresses and port.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addRequestListener(HTTPRequestListener listener)
Adds a request listener to all HTTP servers in this list.
|
void |
close()
Closes all HTTP servers in this list.
|
HTTPServer |
getHTTPServer(int n)
Gets the HTTPServer at the specified index.
|
int |
open()
Opens HTTP servers on all configured bind addresses.
|
boolean |
open(int port)
Opens HTTP servers on the specified port.
|
void |
start()
Starts all HTTP servers in this list.
|
void |
stop()
Stops all HTTP servers in this list.
|
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, trimToSizefinalize, getClass, notify, notifyAll, wait, wait, waitparallelStream, streampublic HTTPServerList()
public HTTPServerList(InetAddress[] list, int port)
list - array of InetAddress objects to bind toport - the port number for all serverspublic void addRequestListener(HTTPRequestListener listener)
listener - the request listener to addpublic void close()
public HTTPServer getHTTPServer(int n)
n - the index of the server to retrievepublic int open()
public boolean open(int port)
port - the port number to usepublic void start()
public void stop()