Package org.drasyl.util.protocol
Class UpnpIgdUtil
java.lang.Object
org.drasyl.util.protocol.UpnpIgdUtil
Utility class for Universal Plug and Play (UPnP) Internet Gateway Device-related stuff.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static class
static interface
static class
static class
static class
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Pattern
static final Pattern
static final Pattern
static final Pattern
static final Duration
static final InetSocketAddress
static final Pattern
static final Pattern
static final Pattern
static final Pattern
static final Pattern
static final Pattern
static final Pattern
static final Pattern
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddPortMapping
(URI url, String serviceType, Integer externalPort, InetAddress localAddress, String description) static byte[]
boolean
deletePortMapping
(URI url, String serviceType, int port) getExternalIpAddress
(URI url, String serviceType) getSpecificPortMappingEntry
(URI url, String serviceType, Integer externalPort) getStatusInfo
(URI url, String serviceType) getUpnpService
(URI url) static UpnpIgdUtil.Message
readMessage
(byte[] content)
-
Field Details
-
SSDP_MULTICAST_ADDRESS
-
SSDP_MAX_WAIT_TIME
-
SSDP_DISCOVERY_RESPONSE_PATTERN
-
SSDP_HEADER_PATTERN
-
UPNP_SERVICE_PATTERN
-
UPNP_EXTERNAL_IP_ADDRESS_PATTERN
-
UPNP_ERROR_PATTERN
-
UPNP_NEW_CONNECTION_STATUS_PATTERN
-
UPNP_NEW_PORT_MAPPING_DESCRIPTION_PATTERN
-
UPNP_NEW_INTERNAL_PORT_PATTERN
-
UPNP_NEW_INTERNAL_CLIENT_PATTERN
-
UPNP_NEW_LEASE_DURATION_PATTERN
-
HTTP_HEADER_SEPARATOR_PATTERN
-
HTTP_HEADER_FIELD_SEPARATOR_PATTERN
-
-
Constructor Details
-
UpnpIgdUtil
public UpnpIgdUtil()
-
-
Method Details
-
getUpnpService
- Throws:
InterruptedException
-
getSpecificPortMappingEntry
public UpnpIgdUtil.MappingEntry getSpecificPortMappingEntry(URI url, String serviceType, Integer externalPort) throws InterruptedException - Throws:
InterruptedException
-
addPortMapping
public UpnpIgdUtil.PortMapping addPortMapping(URI url, String serviceType, Integer externalPort, InetAddress localAddress, String description) throws InterruptedException - Throws:
InterruptedException
-
deletePortMapping
- Throws:
InterruptedException
-
getStatusInfo
public UpnpIgdUtil.StatusInfo getStatusInfo(URI url, String serviceType) throws InterruptedException - Throws:
InterruptedException
-
getExternalIpAddress
public UpnpIgdUtil.ExternalIpAddress getExternalIpAddress(URI url, String serviceType) throws InterruptedException - Throws:
InterruptedException
-
buildSsdpDiscoveryMessage
public static byte[] buildSsdpDiscoveryMessage() -
readMessage
-