Class MQTTSocket
- java.lang.Object
- 
- org.apache.activemq.util.ServiceSupport
- 
- org.apache.activemq.transport.TransportSupport
- 
- org.apache.activemq.transport.ws.AbstractMQTTSocket
- 
- org.apache.activemq.transport.ws.jetty9.MQTTSocket
 
 
 
 
- 
- All Implemented Interfaces:
- BrokerServiceAware,- Service,- MQTTCodec.MQTTFrameSink,- MQTTTransport,- Transport,- org.eclipse.jetty.websocket.api.WebSocketConnectionListener,- org.eclipse.jetty.websocket.api.WebSocketListener
 
 public class MQTTSocket extends AbstractMQTTSocket implements MQTTCodec.MQTTFrameSink, org.eclipse.jetty.websocket.api.WebSocketListener 
- 
- 
Field Summary- 
Fields inherited from class org.apache.activemq.transport.ws.AbstractMQTTSocketbrokerService, mqttInactivityMonitor, peerCertificates, protocolConverter, protocolLock, receiveCounter, remoteAddress, socketTransportStarted, wireFormat
 
- 
 - 
Constructor SummaryConstructors Constructor Description MQTTSocket(String remoteAddress)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandleStopped()Called when the transport is stopping to allow the dervied classes a chance to close WebSocket resources.voidonFrame(org.fusesource.mqtt.codec.MQTTFrame mqttFrame)voidonWebSocketBinary(byte[] bytes, int offset, int length)voidonWebSocketClose(int arg0, String arg1)voidonWebSocketConnect(org.eclipse.jetty.websocket.api.Session session)voidonWebSocketError(Throwable arg0)voidonWebSocketText(String arg0)voidsendToMQTT(org.fusesource.mqtt.codec.MQTTFrame command)- 
Methods inherited from class org.apache.activemq.transport.ws.AbstractMQTTSocketdoStart, doStop, getInactivityMonitor, getPeerCertificates, getProtocolConverter, getReceiveCounter, getRemoteAddress, getWireFormat, oneway, sendToActiveMQ, setBrokerService, setPeerCertificates, setTransportOptions, transportStartedAtLeastOnce
 - 
Methods inherited from class org.apache.activemq.transport.TransportSupportasyncRequest, checkStarted, doConsume, getTransportListener, isConnected, isDisposed, isFaultTolerant, isReconnectSupported, isUpdateURIsSupported, narrow, onException, reconnect, request, request, setTransportListener, updateURIs
 - 
Methods inherited from class org.apache.activemq.util.ServiceSupportaddServiceListener, dispose, isStarted, isStopped, isStopping, postStop, preStart, removeServiceListener, start, stop
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.apache.activemq.transport.mqtt.MQTTTransportonException, stop
 
- 
 
- 
- 
- 
Constructor Detail- 
MQTTSocketpublic MQTTSocket(String remoteAddress) 
 
- 
 - 
Method Detail- 
sendToMQTTpublic void sendToMQTT(org.fusesource.mqtt.codec.MQTTFrame command) throws IOException- Specified by:
- sendToMQTTin interface- MQTTTransport
- Specified by:
- sendToMQTTin class- AbstractMQTTSocket
- Throws:
- IOException
 
 - 
handleStoppedpublic void handleStopped() throws IOExceptionDescription copied from class:AbstractMQTTSocketCalled when the transport is stopping to allow the dervied classes a chance to close WebSocket resources.- Specified by:
- handleStoppedin class- AbstractMQTTSocket
- Throws:
- IOException- if an error occurs during the stop.
 
 - 
onWebSocketBinarypublic void onWebSocketBinary(byte[] bytes, int offset, int length)- Specified by:
- onWebSocketBinaryin interface- org.eclipse.jetty.websocket.api.WebSocketListener
 
 - 
onWebSocketClosepublic void onWebSocketClose(int arg0, String arg1)- Specified by:
- onWebSocketClosein interface- org.eclipse.jetty.websocket.api.WebSocketConnectionListener
 
 - 
onWebSocketConnectpublic void onWebSocketConnect(org.eclipse.jetty.websocket.api.Session session) - Specified by:
- onWebSocketConnectin interface- org.eclipse.jetty.websocket.api.WebSocketConnectionListener
 
 - 
onWebSocketErrorpublic void onWebSocketError(Throwable arg0) - Specified by:
- onWebSocketErrorin interface- org.eclipse.jetty.websocket.api.WebSocketConnectionListener
 
 - 
onWebSocketTextpublic void onWebSocketText(String arg0) - Specified by:
- onWebSocketTextin interface- org.eclipse.jetty.websocket.api.WebSocketListener
 
 - 
onFramepublic void onFrame(org.fusesource.mqtt.codec.MQTTFrame mqttFrame) - Specified by:
- onFramein interface- MQTTCodec.MQTTFrameSink
 
 
- 
 
-