18 #ifndef ACTIVEMQ_TRANSPORT_TRANSPORTFILTER_H_ 19 #define ACTIVEMQ_TRANSPORT_TRANSPORTFILTER_H_ 36 class TransportFilterImpl;
47 TransportFilterImpl* impl;
87 void checkClosed()
const;
107 virtual void transportInterrupted();
112 virtual void transportResumed();
118 next->oneway(command);
124 return next->asyncRequest(command, responseCallback);
129 return next->request(command);
134 return next->request(command, timeout);
138 this->listener = listener;
142 return this->listener;
149 virtual Transport* narrow(
const std::type_info& typeId);
152 return !isClosed() && next->isFaultTolerant();
156 return !isClosed() && next->isConnected();
160 return !isClosed() && next->isReconnectSupported();
164 return !isClosed() && next->isUpdateURIsSupported();
167 virtual bool isClosed()
const;
175 return next->getRemoteAddress();
182 next->updateURIs(rebalance, uris);
virtual Pointer< Response > request(const Pointer< Command > command, unsigned int timeout)
Sends the given command to the broker and then waits for the response.
Definition: TransportFilter.h:132
virtual void afterNextIsStopped()
Subclasses can override this method to do their own stop work.
Definition: TransportFilter.h:213
#define AMQCPP_API
Definition: Config.h:30
virtual TransportListener * getTransportListener() const
Gets the observer of asynchronous events from this transport.
Definition: TransportFilter.h:141
virtual Pointer< Response > request(const Pointer< Command > command)
Sends the given command to the broker and then waits for the response.
Definition: TransportFilter.h:127
virtual Pointer< FutureResponse > asyncRequest(const Pointer< Command > command, const Pointer< ResponseCallback > responseCallback)
Sends a commands asynchronously, returning a FutureResponse object that the caller can use to check t...
Definition: TransportFilter.h:121
virtual bool isConnected() const
Is the Transport Connected to its Broker.
Definition: TransportFilter.h:155
virtual void doClose()
Subclasses can override this method to do their own close work.
Definition: TransportFilter.h:220
Definition: Response.h:46
Interface for a transport layer for command objects.
Definition: Transport.h:59
A filter on the transport layer.
Definition: TransportFilter.h:44
virtual void updateURIs(bool rebalance, const decaf::util::List< decaf::net::URI > &uris)
Updates the set of URIs the Transport can connect to.
Definition: TransportFilter.h:180
This class represents an instance of a URI as defined by RFC 2396.
Definition: URI.h:36
virtual bool isReconnectSupported() const
Definition: TransportFilter.h:159
virtual void beforeNextIsStopped()
Subclasses can override this method to do their own pre-stop work.
Definition: TransportFilter.h:206
virtual bool isUpdateURIsSupported() const
Definition: TransportFilter.h:163
virtual void oneway(const Pointer< Command > command)
Sends a one-way command.
Definition: TransportFilter.h:116
TransportListener * listener
Listener of this transport.
Definition: TransportFilter.h:59
virtual void afterNextIsStarted()
Subclasses can override this method to do their own post startup work.
Definition: TransportFilter.h:199
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements...
Definition: CachedConsumer.h:24
Definition: Exception.h:38
virtual std::string getRemoteAddress() const
Definition: TransportFilter.h:169
virtual void beforeNextIsStarted()
Subclasses can override this method to do their own startup work.
Definition: TransportFilter.h:192
Decaf's implementation of a Smart Pointer that is a template on a Type and is Thread Safe if the defa...
Definition: Pointer.h:53
virtual void setTransportListener(TransportListener *listener)
Sets the observer of asynchronous events from this transport.
Definition: TransportFilter.h:137
A listener of asynchronous exceptions from a command transport object.
Definition: TransportListener.h:38
Pointer< Transport > next
The transport that this filter wraps around.
Definition: TransportFilter.h:54
virtual bool isFaultTolerant() const
Is this Transport fault tolerant, meaning that it will reconnect to a broker on disconnect.
Definition: TransportFilter.h:151