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.

Returns

iterator to beginning of attributes

inline bool directRouteEnabled() const

Is direct route enabled.

Returns

true if direct route enabled

inline bool directRoutePossible() const

Determines whether route is direct and it is possible.

Returns

true if direct route is possible

inline AttributeIterator endAttributes()

Return end of attributes iterator.

Returns

iterator to end of attributes

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

Compares routes.

Parameters

other – the other route to compare this object to

Returns

true if routes equal.

inline const RouteAttributes &getAttributes() const

Retrieve attribute references.

Returns

reference to attribute container

inline const string &getBearer() const

Retrieve bearer information.

Returns

bearer

inline shared_ptr<Endpoint> getEndpoint() const

Getter for endpoint.

Returns

endpoint information

inline const string &getLink() const

Getter for link information.

Returns

link information

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

Getter for route.

Returns

route information

inline const string &getSubject() const

Getter for subject information.

Returns

subject information

inline bool serverRouteEnabled() const

Routing via server enabled.

Returns

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