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
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic interfacestatic classstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Patternstatic final Patternstatic final Patternstatic final Patternstatic final Durationstatic final InetSocketAddressstatic final Patternstatic final Patternstatic final Patternstatic final Patternstatic final Patternstatic final Patternstatic final Patternstatic final Pattern -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddPortMapping(URI url, String serviceType, Integer externalPort, InetAddress localAddress, String description) static byte[]booleandeletePortMapping(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.MessagereadMessage(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
-