org.eclipse.paho.client.mqttv3.internal
Class LocalNetworkModule
java.lang.Object
org.eclipse.paho.client.mqttv3.internal.LocalNetworkModule
- All Implemented Interfaces:
- NetworkModule
public class LocalNetworkModule
- extends Object
- implements NetworkModule
Special comms class that allows an MQTT client to use a non TCP / optimised
mechanism to talk to an MQTT server when running in the same JRE instance as the
MQTT server.
This class checks for the existence of the optimised comms adatper class i.e. the one
that provides the optimised communication mechanism. If not available the request
to connect using the optimised mechanism is rejected.
The only known server that implements this is the microbroker:- an MQTT server that
ships with a number of IBM products.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LocalNetworkModule
public LocalNetworkModule(String brokerName)
start
public void start()
throws IOException,
MqttException
- Specified by:
start
in interface NetworkModule
- Throws:
IOException
MqttException
getInputStream
public InputStream getInputStream()
throws IOException
- Specified by:
getInputStream
in interface NetworkModule
- Throws:
IOException
getOutputStream
public OutputStream getOutputStream()
throws IOException
- Specified by:
getOutputStream
in interface NetworkModule
- Throws:
IOException
stop
public void stop()
throws IOException
- Specified by:
stop
in interface NetworkModule
- Throws:
IOException
Copyright © 2013. All Rights Reserved.