p2p::RoutingRules::Endpoint

class kanzi::connect::p2p::RoutingRules::Endpoint

Endpoint for communication.

Public Types

typedef RouteAttributes::iterator AttributeIterator

Public Functions

inline Endpoint()

Constructor.

inline AttributeIterator beginAttributes()

Return beginning of attributes.

Returns

iterator to beginning of attributes

inline AttributeIterator endAttributes()

Return end of attributes iterator.

Returns

iterator to end of attributes

inline bool equals(const Endpoint &o) const

Compares this and passed object by all information.

Parameters

o – the object to compare to

Returns

true if equals

inline bool equalsByAddress(const Endpoint &o) const

Compares this and passed object by address information.

Parameters

o – object to compare to

Returns

true if equals by address

inline bool equalsByAddressAndReliability(const Endpoint &o) const

Compares this and passed object by address and relialibility information.

Parameters

o – object to compare to

Returns

true if equals by address

inline const RouteAttributes &getAttributes() const

Retrieve attribute references.

Returns

reference to attribute container

inline const string &getBearer() const

Getter for bearer information.

Returns

the bearer information

inline const string &getConnectIdentifier() const

Retrieve previously set connect identifier.

Returns

connectIdentifier value.

inline const string &getIdentifier() const

Retrieves then endpoint identifier.

Returns

endpoint identifier

inline const string &getIP() const

Getter for IP Address.

Returns

IP Address

inline MessageDispatcher *getMessageDispatcher() const

Getter for message dispatcher.

Returns

message dispatcher

inline const string &getPort() const

Getter for port information.

Returns

port number

inline bool getReliable() const

Getter for reliable.

Returns

true if reliable.

inline bool getUnreliable() const

Getter for unreliable flag.

Returns

true if unreliable

inline void setAttributes(const RouteAttributes &attributes)

Stores the attributes specific for the route.

Parameters

attributes – the attributes

inline void setBearer(const string &bearer)

Setter for bearer information.

Parameters

bearer – the bearer to set

inline void setConnectIdentifier(const string &connectIdentifier)

Sets the connection identifier.

Parameters

connectIdentifier – some identifier using which the client can reach this service with selected bearer.

inline void setIdentifier(const string &identifier)

sets the endpoint identifier

Parameters

identifier – the name of the endpoint

inline void setIP(const string &ip)

Setter for IP Address.

For server side IP defines the interface to bind into.

Parameters

ip – the ip address

inline void setMessageDispatcher(MessageDispatcher *dsp)

Attach message dispatcher.

Parameters

dsp – the dispatcher to attach

inline void setPort(const string &port)

Setter for port information.

Parameters

port – the port information to set in string format

inline void setPort(int port)

Setter for port information.

Parameters

port – the port information

inline void setReliable(bool reliable)

Setter for reliable flag.

Parameters

reliable – state of the endpoint

inline void setUnreliable(bool unreliable = true)

Setter for unreliable flag.

Parameters

unreliable – unreliability state of the endpoint

string toString() const

Get stringular representation of the endpoint.

Returns

stringified representation of the object

inline bool valid() const

Checks is object valid.

Returns

true if valid.