public class MQTTTransportFilter extends TransportFilter implements MQTTTransport
next, transportListener| Constructor and Description |
|---|
MQTTTransportFilter(Transport next,
org.apache.activemq.wireformat.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() |
boolean |
isTrace() |
void |
onCommand(Object command) |
void |
oneway(Object o) |
void |
onException(IOException error) |
void |
sendToActiveMQ(org.apache.activemq.command.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) |
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, org.apache.activemq.wireformat.WireFormat wireFormat, BrokerService brokerService)
public void oneway(Object o) throws IOException
oneway in interface Transportoneway in class TransportFilterIOExceptionpublic void onCommand(Object command)
onCommand in interface TransportListeneronCommand in class TransportFilterpublic void sendToActiveMQ(org.apache.activemq.command.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 org.apache.activemq.Servicestart in class TransportFilterExceptionpublic void stop() throws Exception
stop in interface org.apache.activemq.Servicestop in interface MQTTTransportstop in class TransportFilterExceptionpublic 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()
getWireFormat in interface MQTTTransportgetWireFormat in interface TransportgetWireFormat in class TransportFilterpublic void onException(IOException error)
onException 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)
setPeerCertificates in interface MQTTTransportsetPeerCertificates in interface TransportsetPeerCertificates in class TransportFilterCopyright © 2005–2017 The Apache Software Foundation. All rights reserved.