terminus.hpp
#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 "./internal/export.hpp"
#include "./internal/object.hpp"
#include "./value.hpp"
#include <proton/link.h>
#include <string>
namespace proton {
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;
protected:
pn_terminus_t *pn_object() { 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::terminus
One end of a link, either a source or a target.
Definition: terminus.hpp:40
proton::terminus::NONDURABLE
No persistence.
Definition: terminus.hpp:51
proton::terminus::expiry_policy
expiry_policy
When expiration of the source or target begins.
Definition: terminus.hpp:59
proton::duration
A span of time in milliseconds.
Definition: duration.hpp:34
proton::terminus::NEVER
The terminus never expires.
Definition: terminus.hpp:67
proton::terminus::timeout
duration timeout() const
The period after which the source is discarded on expiry.
proton::terminus::LINK_CLOSE
When the link is closed.
Definition: terminus.hpp:61
proton::terminus::expiry_policy
enum expiry_policy expiry_policy() const
Get the policy for when expiration begins.
proton::source
A point of origin for messages.
Definition: source.hpp:43
proton::terminus::SESSION_CLOSE
When the containing session is closed.
Definition: terminus.hpp:63
proton::terminus::UNSETTLED_STATE
Configuration and unsettled state are persisted.
Definition: terminus.hpp:55
proton::value
A holder for any AMQP value, simple or complex.
Definition: value.hpp:60
proton::terminus::node_properties
value node_properties() const
Obtain a reference to the AMQP dynamic node properties for the terminus.
proton::terminus::CONFIGURATION
Only configuration is persisted.
Definition: terminus.hpp:53
proton::target
A destination for messages.
Definition: target.hpp:40
proton::terminus::CONNECTION_CLOSE
When the containing connection is closed.
Definition: terminus.hpp:65
proton::terminus::dynamic
bool dynamic() const
True if the remote node is created dynamically.
proton::terminus::durability_mode
enum durability_mode durability_mode()
Get the durability flag.
proton
Type traits for mapping between AMQP and C++ types.
Definition: annotation_key.hpp:28
proton::terminus::durability_mode
durability_mode
The persistence mode of the source or target.
Definition: terminus.hpp:49