activemq-cpp-3.9.5
TransportListener.h
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18#ifndef _ACTIVEMQ_TRANSPORT_TRANSPORTLISTENER_H_
19#define _ACTIVEMQ_TRANSPORT_TRANSPORTLISTENER_H_
20
24#include <decaf/lang/Pointer.h>
25
26namespace activemq{
27namespace transport{
28
29 // Forward declarations.
30 class Transport;
31
32 using decaf::lang::Pointer;
33 using activemq::commands::Command;
34
39 public:
40
41 virtual ~TransportListener() {}
42
52 virtual void onCommand(const Pointer<Command> command) = 0;
53
60 virtual void onException(const decaf::lang::Exception& ex) = 0;
61
65 virtual void transportInterrupted() = 0;
66
70 virtual void transportResumed() = 0;
71
72 };
73
74}}
75
76#endif /*_ACTIVEMQ_TRANSPORT_TRANSPORTLISTENER_H_*/
#define AMQCPP_API
Definition Config.h:30
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
virtual void onCommand(const Pointer< Command > command)=0
Event handler for the receipt of a command.
virtual void onException(const decaf::lang::Exception &ex)=0
Event handler for an exception from a command transport.
virtual ~TransportListener()
Definition TransportListener.h:41
virtual void transportInterrupted()=0
The transport has suffered an interruption from which it hopes to recover.
virtual void transportResumed()=0
The transport has resumed after an interruption.
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
Definition AbstractTransportFactory.h:30
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition CachedConsumer.h:24