p2p::RoutingRules::RouteΒΆ

class kanzi::connect::p2p::RoutingRules::Route

Defines a route for a single communications element.

Public Types

typedef RouteAttributes::iterator AttributeIterator
enum RouteDef

Values:

enumerator Server

Route via Server.

enumerator Direct

Route directly.

Public Functions

inline Route(RouteDef r, string link)

Constructor.

Parameters
  • r: route

  • link: link

inline AttributeIterator beginAttributes()

Return beginning of attributes.

Return

iterator to beginning of attributes

inline bool directRouteEnabled() const

Is direct route enabled.

Return

true if direct route enabled

inline bool directRoutePossible() const

Determines whether route is direct and it is possible.

Return

true if direct route is possible

inline AttributeIterator endAttributes()

Return end of attributes iterator.

Return

iterator to end of attributes

inline bool equals(const RoutingRules::Route &other) const

Compares routes.

Return

true if routes equal.

Parameters
  • other: the other route to compare this object to

inline const RouteAttributes &getAttributes() const

Retrieve attribute references.

Return

reference to attribute container

inline const string &getBearer() const

Retrieve bearer information.

Return

bearer

inline shared_ptr<Endpoint> getEndpoint() const

Getter for endpoint.

Return

endpoint information

inline const string &getLink() const

Getter for link information.

Return

link information

inline bool getReliable() const
inline RouteDef getRoute() const

Getter for route.

Return

route information

inline const string &getSubject() const

Getter for subject information.

Return

subject information

inline bool serverRouteEnabled() const

Routing via server enabled.

Return

true if route via server enabled.

inline void setAttributes(const RouteAttributes &attributes)

Stores the attributes specific for the route.

Parameters
  • attributes: the attributes

inline void setBearer(string bearer)

Stores bearer information.

Parameters
  • bearer: the bearer information

inline void setEndpoint(shared_ptr<Endpoint> &ep)

Setter for endpoint.

Parameters
  • ep: endpoint to store

inline void setLink(const string &link)

Setter for link.

Parameters
  • link: link informaiton

inline void setReliable(bool reliable)
inline void setRoute(RouteDef route)

Setter for route information.

Parameters
  • route: route

inline void setSubject(const string &subject)

Setter for subject information.

Parameters
  • subject: subject information