public class GatewayDiscover extends Object
discover()
method.Modifier and Type | Field and Description |
---|---|
static String |
IP
The broadcast address to use when trying to contact UPnP devices
|
static int |
PORT
The SSDP port
|
Constructor and Description |
---|
GatewayDiscover()
Constructor.
|
GatewayDiscover(String st)
Constructor of the gateway discover service.
|
GatewayDiscover(String[] types)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Map<InetAddress,GatewayDevice> |
discover()
Discovers Gateway Devices on the network(s) the executing machine is
connected to.
|
Map<InetAddress,GatewayDevice> |
getAllGateways()
Returns list of all discovered gateways.
|
int |
getTimeout()
Gets the timeout for socket connections of the initial broadcast request.
|
GatewayDevice |
getValidGateway()
Gets the first connected gateway
|
void |
setTimeout(int milliseconds)
Sets the timeout for socket connections of the initial broadcast request.
|
public static final int PORT
public static final String IP
public GatewayDiscover()
public GatewayDiscover(String st)
st
- The search type you are looking forpublic GatewayDiscover(String[] types)
types
- The search types the discover have to look forpublic int getTimeout()
public void setTimeout(int milliseconds)
milliseconds
- the new timeout in millisecondspublic Map<InetAddress,GatewayDevice> discover() throws SocketException, UnknownHostException, IOException, SAXException, ParserConfigurationException
SocketException
UnknownHostException
IOException
SAXException
ParserConfigurationException
public GatewayDevice getValidGateway()
public Map<InetAddress,GatewayDevice> getAllGateways()
Copyright © 2016. All rights reserved.