Package org.drasyl.util
Class WebSocketUtil
java.lang.Object
org.drasyl.util.WebSocketUtil
Utility class for operations on websocket 
URIs (e.g. ws://foo.bar).- 
Field Summary
Fields - 
Method Summary
Modifier and TypeMethodDescriptionstatic booleanstatic booleanisWebSocketSecureURI(URI uri) static booleanisWebSocketURI(URI uri) static intwebSocketPort(URI uri)  
- 
Field Details
- 
WS_PORT
public static final int WS_PORT- See Also:
 
 - 
WSS_PORT
public static final int WSS_PORT- See Also:
 
 
 - 
 - 
Method Details
- 
webSocketPort
- Parameters:
 uri- the URI to be used for determining the WebSocket URI- Returns:
 - the port in the WebSocket URI. If no custom port is specified, the protocol default port is assumed
 - Throws:
 IllegalArgumentException- if no port could be determinedNullPointerException- ifuriisnull
 - 
isWebSocketSecureURI
- Parameters:
 uri- the URI to be checked- Returns:
 trueifuriis a WebSocket Secure URI. Otherwise, returnsfalse- Throws:
 NullPointerException- ifuriisnull
 - 
isWebSocketNonSecureURI
- Parameters:
 uri- the URI to be checked- Returns:
 trueifuriis a non-secure Websocket URI. Otherwise, returnsfalse- Throws:
 NullPointerException- ifuriisnull
 - 
isWebSocketURI
- Parameters:
 uri- the URI to be checked- Returns:
 trueifuriis Websocket URI. Otherwise, returnsfalse- Throws:
 NullPointerException- ifuriisnull
 
 -