public class MQTTTransportFilter extends TransportFilter implements MQTTTransport
next, transportListener| Constructor and Description |
|---|
MQTTTransportFilter(Transport next,
WireFormat wireFormat,
BrokerService brokerService) |
| Modifier and Type | Method and Description |
|---|---|
int |
getActiveMQSubscriptionPrefetch() |
long |
getConnectAttemptTimeout() |
long |
getDefaultKeepAlive() |
MQTTInactivityMonitor |
getInactivityMonitor() |
int |
getMaxFrameSize() |
X509Certificate[] |
getPeerCertificates() |
boolean |
getPublishDollarTopics() |
String |
getSubscriptionStrategy() |
MQTTWireFormat |
getWireFormat()
Retrieves the WireFormat instance associated with this Transport instance.
|
boolean |
isTrace() |
void |
onCommand(Object command)
called to process a command
|
void |
oneway(Object o)
A one way asynchronous send
|
void |
onException(IOException error)
An unrecoverable exception has occured on the transport
|
void |
sendToActiveMQ(Command command) |
void |
sendToMQTT(org.fusesource.mqtt.codec.MQTTFrame command) |
void |
setActiveMQSubscriptionPrefetch(int activeMQSubscriptionPrefetch)
set the default prefetch size when mapping the MQTT subscription to an ActiveMQ one
The default = 1
|
void |
setConnectAttemptTimeout(long connectTimeout)
Sets the timeout value used to fail a connection if no CONNECT frame is read
in the given interval.
|
void |
setDefaultKeepAlive(long defaultHeartBeat) |
void |
setInactivityMonitor(MQTTInactivityMonitor monitor) |
void |
setMaxFrameSize(int maxFrameSize)
Sets the maximum frame size for an incoming MQTT frame.
|
void |
setPeerCertificates(X509Certificate[] certificates)
Sets the certificates provided by the connected peer.
|
void |
setPublishDollarTopics(boolean publishDollarTopics) |
void |
setSubscriptionStrategy(String name) |
void |
setTrace(boolean trace) |
void |
start() |
void |
stop() |
asyncRequest, getNext, getReceiveCounter, getRemoteAddress, getTransportListener, isConnected, isDisposed, isFaultTolerant, isReconnectSupported, isUpdateURIsSupported, narrow, reconnect, request, request, setTransportListener, toString, transportInterupted, transportResumed, updateURIspublic MQTTTransportFilter(Transport next, WireFormat wireFormat, BrokerService brokerService)
public void oneway(Object o) throws IOException
Transportoneway in interface Transportoneway in class TransportFilterIOExceptionpublic void onCommand(Object command)
TransportListeneronCommand in interface TransportListeneronCommand in class TransportFilterpublic void sendToActiveMQ(Command command)
sendToActiveMQ in interface MQTTTransportpublic void sendToMQTT(org.fusesource.mqtt.codec.MQTTFrame command) throws IOException
sendToMQTT in interface MQTTTransportIOExceptionpublic void start() throws Exception
start in interface Servicestart in class TransportFilterExceptionService.start()public void stop() throws Exception
stop in interface Servicestop in interface MQTTTransportstop in class TransportFilterExceptionService.stop()public X509Certificate[] getPeerCertificates()
getPeerCertificates in interface MQTTTransportgetPeerCertificates in interface TransportgetPeerCertificates in class TransportFilterpublic boolean isTrace()
public void setTrace(boolean trace)
public MQTTInactivityMonitor getInactivityMonitor()
getInactivityMonitor in interface MQTTTransportpublic void setInactivityMonitor(MQTTInactivityMonitor monitor)
public MQTTWireFormat getWireFormat()
TransportgetWireFormat in interface MQTTTransportgetWireFormat in interface TransportgetWireFormat in class TransportFilterpublic void onException(IOException error)
TransportListeneronException in interface MQTTTransportonException in interface TransportListeneronException in class TransportFilterpublic long getDefaultKeepAlive()
public void setDefaultKeepAlive(long defaultHeartBeat)
public long getConnectAttemptTimeout()
public void setConnectAttemptTimeout(long connectTimeout)
connectTimeout - the connection frame received timeout value.public boolean getPublishDollarTopics()
public void setPublishDollarTopics(boolean publishDollarTopics)
public String getSubscriptionStrategy()
public void setSubscriptionStrategy(String name)
public int getActiveMQSubscriptionPrefetch()
public void setActiveMQSubscriptionPrefetch(int activeMQSubscriptionPrefetch)
activeMQSubscriptionPrefetch - set the prefetch for the corresponding ActiveMQ subscriptionpublic int getMaxFrameSize()
public void setMaxFrameSize(int maxFrameSize)
maxFrameSize - the maximum allowed frame size for a single MQTT frame.public void setPeerCertificates(X509Certificate[] certificates)
TransportsetPeerCertificates in interface MQTTTransportsetPeerCertificates in interface TransportsetPeerCertificates in class TransportFiltercertificates - the Certificates provided by the peer.Copyright © 2005–2017 The Apache Software Foundation. All rights reserved.