public class WebSocketNetworkModule extends TCPNetworkModule
Constructor and Description |
---|
WebSocketNetworkModule(javax.net.SocketFactory factory,
java.lang.String uri,
java.lang.String host,
int port,
java.lang.String resourceContext) |
Modifier and Type | Method and Description |
---|---|
java.io.InputStream |
getInputStream() |
java.io.OutputStream |
getOutputStream() |
java.lang.String |
getServerURI() |
void |
start()
Starts the module, by creating a TCP socket to the server.
|
void |
stop()
Stops the module, by closing the TCP socket.
|
setConnectTimeout
public WebSocketNetworkModule(javax.net.SocketFactory factory, java.lang.String uri, java.lang.String host, int port, java.lang.String resourceContext)
public void start() throws java.io.IOException, MqttException
TCPNetworkModule
start
in interface NetworkModule
start
in class TCPNetworkModule
java.io.IOException
MqttException
public java.io.InputStream getInputStream() throws java.io.IOException
getInputStream
in interface NetworkModule
getInputStream
in class TCPNetworkModule
java.io.IOException
public java.io.OutputStream getOutputStream() throws java.io.IOException
getOutputStream
in interface NetworkModule
getOutputStream
in class TCPNetworkModule
java.io.IOException
public void stop() throws java.io.IOException
stop
in interface NetworkModule
stop
in class TCPNetworkModule
java.io.IOException
public java.lang.String getServerURI()
getServerURI
in interface NetworkModule
getServerURI
in class TCPNetworkModule