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, updateURIs
public MQTTTransportFilter(Transport next, org.apache.activemq.wireformat.WireFormat wireFormat, BrokerService brokerService)
public void oneway(Object o) throws IOException
oneway
in interface Transport
oneway
in class TransportFilter
IOException
public void onCommand(Object command)
onCommand
in interface TransportListener
onCommand
in class TransportFilter
public void sendToActiveMQ(org.apache.activemq.command.Command command)
sendToActiveMQ
in interface MQTTTransport
public void sendToMQTT(org.fusesource.mqtt.codec.MQTTFrame command) throws IOException
sendToMQTT
in interface MQTTTransport
IOException
public void start() throws Exception
start
in interface org.apache.activemq.Service
start
in class TransportFilter
Exception
public void stop() throws Exception
stop
in interface org.apache.activemq.Service
stop
in interface MQTTTransport
stop
in class TransportFilter
Exception
public X509Certificate[] getPeerCertificates()
getPeerCertificates
in interface MQTTTransport
public boolean isTrace()
public void setTrace(boolean trace)
public MQTTInactivityMonitor getInactivityMonitor()
getInactivityMonitor
in interface MQTTTransport
public void setInactivityMonitor(MQTTInactivityMonitor monitor)
public MQTTWireFormat getWireFormat()
getWireFormat
in interface MQTTTransport
public void onException(IOException error)
onException
in interface MQTTTransport
onException
in interface TransportListener
onException
in class TransportFilter
public 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 MQTTTransport
Copyright © 2005–2019 FuseSource, Corp.. All rights reserved.