18#ifndef ACTIVEMQ_TRANSPORT_TRANSPORTFILTER_H_
19#define ACTIVEMQ_TRANSPORT_TRANSPORTFILTER_H_
32 using decaf::lang::Pointer;
33 using activemq::commands::Command;
34 using activemq::commands::Response;
36 class TransportFilterImpl;
47 TransportFilterImpl* impl;
63 TransportFilter(
const TransportFilter&);
64 TransportFilter& operator=(
const TransportFilter&);
118 next->oneway(command);
124 return next->asyncRequest(command, responseCallback);
129 return next->request(command);
134 return next->request(command, timeout);
142 return this->listener;
175 return next->getRemoteAddress();
182 next->updateURIs(rebalance, uris);
#define AMQCPP_API
Definition Config.h:30
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 bool isReconnectSupported() const
Definition TransportFilter.h:159
virtual void afterNextIsStopped()
Subclasses can override this method to do their own stop work.
Definition TransportFilter.h:213
virtual void setWireFormat(const Pointer< wireformat::WireFormat > wireFormat)
Sets the WireFormat instance to use.
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 transportResumed()
The transport has resumed after an interruption.
virtual Transport * narrow(const std::type_info &typeId)
Narrows down a Chain of Transports to a specific Transport to allow a higher level transport to skip ...
virtual void afterNextIsStarted()
Subclasses can override this method to do their own post startup work.
Definition TransportFilter.h:199
void close()
Closes this object and deallocates the appropriate resources.
virtual void transportInterrupted()
The transport has suffered an interruption from which it hopes to recover.
virtual void beforeNextIsStarted()
Subclasses can override this method to do their own startup work.
Definition TransportFilter.h:192
TransportListener * listener
Listener of this transport.
Definition TransportFilter.h:59
void stop()
Stops the Transport.
virtual TransportListener * getTransportListener() const
Gets the observer of asynchronous events from this transport.
Definition TransportFilter.h:141
virtual void reconnect(const decaf::net::URI &uri)
reconnect to another location
virtual bool isFaultTolerant() const
Is this Transport fault tolerant, meaning that it will reconnect to a broker on disconnect.
Definition TransportFilter.h:151
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
virtual void setTransportListener(TransportListener *listener)
Sets the observer of asynchronous events from this transport.
Definition TransportFilter.h:137
virtual void doClose()
Subclasses can override this method to do their own close work.
Definition TransportFilter.h:220
virtual bool isUpdateURIsSupported() const
Definition TransportFilter.h:163
virtual void onCommand(const Pointer< Command > command)
Event handler for the receipt of a command.
virtual void beforeNextIsStopped()
Subclasses can override this method to do their own pre-stop work.
Definition TransportFilter.h:206
virtual ~TransportFilter()
virtual void onException(const decaf::lang::Exception &ex)
Event handler for an exception from a command transport.
virtual bool isConnected() const
Is the Transport Connected to its Broker.
Definition TransportFilter.h:155
void start()
Starts the Transport, the send methods of a Transport will throw an exception if used before the Tran...
TransportFilter(const Pointer< Transport > next)
Constructor.
virtual std::string getRemoteAddress() const
Definition TransportFilter.h:169
virtual void oneway(const Pointer< Command > command)
Sends a one-way command.
Definition TransportFilter.h:116
virtual Pointer< wireformat::WireFormat > getWireFormat() const
Gets the WireFormat instance that is in use by this transport.
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
Pointer< Transport > next
The transport that this filter wraps around.
Definition TransportFilter.h:54
void checkClosed() const
Throws an IOException if this filter chain has already been closed.
virtual bool isClosed() const
Has the Transport been shutdown and no longer usable.
Interface for a transport layer for command objects.
Definition Transport.h:60
A listener of asynchronous exceptions from a command transport object.
Definition TransportListener.h:38
Definition Exception.h:38
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
This class represents an instance of a URI as defined by RFC 2396.
Definition URI.h:37
An ordered collection (also known as a sequence).
Definition List.h:47
Definition AbstractTransportFactory.h:30
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition CachedConsumer.h:24