terminus.hpp
Go to the documentation of this file.
#ifndef PROTON_TERMINUS_HPP
#define PROTON_TERMINUS_HPP
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
#include "./types_fwd.hpp"
#include "./internal/export.hpp"
#include <proton/terminus.h>
#include <string>
#include <vector>
struct pn_link_t;
struct pn_terminus_t;
namespace proton {
namespace internal {
template <class T> class factory;
}
class terminus {
terminus(pn_terminus_t* t);
public:
terminus() : object_(0), parent_(0) {}
enum durability_mode {
NONDURABLE = PN_NONDURABLE,
CONFIGURATION = PN_CONFIGURATION,
UNSETTLED_STATE = PN_DELIVERIES
};
enum expiry_policy {
LINK_CLOSE = PN_EXPIRE_WITH_LINK,
SESSION_CLOSE = PN_EXPIRE_WITH_SESSION,
CONNECTION_CLOSE = PN_EXPIRE_WITH_CONNECTION,
NEVER = PN_EXPIRE_NEVER
};
// XXX This should have address?
PN_CPP_EXTERN enum expiry_policy expiry_policy() const;
PN_CPP_EXTERN duration timeout() const;
PN_CPP_EXTERN enum durability_mode durability_mode();
PN_CPP_EXTERN bool dynamic() const;
PN_CPP_EXTERN value node_properties() const;
PN_CPP_EXTERN std::vector<symbol> capabilities() const;
protected:
pn_terminus_t *pn_object() const { return object_; }
private:
pn_terminus_t* object_;
pn_link_t* parent_;
friend class internal::factory<terminus>;
friend class source;
friend class target;
};
} // proton
#endif // PROTON_TERMINUS_HPP
proton::duration
A span of time in milliseconds.
Definition: duration.hpp:39
proton::source
A point of origin for messages.
Definition: source.hpp:44
proton::target
A destination for messages.
Definition: target.hpp:45
proton::terminus
One end of a link, either a source or a target.
Definition: terminus.hpp:51
proton::terminus::timeout
duration timeout() const
The period after which the source is discarded on expiry.
proton::terminus::capabilities
std::vector< symbol > capabilities() const
Extension capabilities that are supported/requested.
proton::terminus::expiry_policy
expiry_policy
When expiration of the source or target begins.
Definition: terminus.hpp:70
proton::terminus::NEVER
@ NEVER
The terminus never expires.
Definition: terminus.hpp:78
proton::terminus::LINK_CLOSE
@ LINK_CLOSE
When the link is closed.
Definition: terminus.hpp:72
proton::terminus::SESSION_CLOSE
@ SESSION_CLOSE
When the containing session is closed.
Definition: terminus.hpp:74
proton::terminus::CONNECTION_CLOSE
@ CONNECTION_CLOSE
When the containing connection is closed.
Definition: terminus.hpp:76
proton::terminus::durability_mode
durability_mode
The persistence mode of the source or target.
Definition: terminus.hpp:60
proton::terminus::CONFIGURATION
@ CONFIGURATION
Only configuration is persisted.
Definition: terminus.hpp:64
proton::terminus::UNSETTLED_STATE
@ UNSETTLED_STATE
Configuration and unsettled state are persisted.
Definition: terminus.hpp:66
proton::terminus::NONDURABLE
@ NONDURABLE
No persistence.
Definition: terminus.hpp:62
proton::terminus::node_properties
value node_properties() const
Obtain a reference to the AMQP dynamic node properties for the terminus.
proton::terminus::dynamic
bool dynamic() const
True if the remote node is created dynamically.
proton::value
A holder for any AMQP value, simple or complex.
Definition: value.hpp:57
proton
The main Proton namespace.
Definition: annotation_key.hpp:33
types_fwd.hpp
Forward declarations for Proton types used to represent AMQP types.