p2p::RoutingRules::EndpointΒΆ

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

Endpoint for communication.

Public Types

typedef unordered_map<string, string>::iterator AttributeIterator

Public Functions

Endpoint()

Constructor.

AttributeIterator beginAttributes()

Return beginning of attributes.

Return

iterator to beginning of attributes

AttributeIterator endAttributes()

Return end of attributes iterator.

Return

iterator to end of attributes

bool equals(const Endpoint &o) const

Compares this and passed object by all information.

Return

true if equals

Parameters
  • o: the object to compare to

bool equalsByAddress(const Endpoint &o) const

Compares this and passed object by address information.

Return

true if equals by address

Parameters
  • o: object to compare to

bool equalsByAddressAndReliability(const Endpoint &o) const

Compares this and passed object by address and relialibility information.

Return

true if equals by address

Parameters
  • o: object to compare to

const unordered_map<string, string> &getAttributes() const

Retrieve attribute references.

Return

reference to attribute container

const string &getBearer() const

Getter for bearer information.

Return

the bearer information

const string &getConnectIdentifier() const

Retrieve previously set connect identifier.

Return

connectIdentifier value.

const string &getIdentifier() const

Retrieves then endpoint identifier.

Return

endpoint identifier

const string &getIP() const

Getter for IP Address.

Return

IP Address

MessageDispatcher *getMessageDispatcher() const

Getter for message dispatcher.

Return

message dispatcher

const string &getPort() const

Getter for port information.

Return

port number

bool getReliable() const

Getter for reliable.

Return

true if reliable.

bool getUnreliable() const

Getter for unreliable flag.

Return

true if unreliable

void setAttributes(const unordered_map<string, string> &attributes)

Stores the attributes specific for the route.

Parameters
  • attributes: the attributes

void setBearer(const string &bearer)

Setter for bearer information.

Parameters
  • bearer: the bearer to set

void setConnectIdentifier(const string &connectIdentifier)

Sets the connection identifier.

Parameters
  • connectIdentifier: some identifier using which the client can reach this service with selected bearer.

void setIdentifier(const string &identifier)

sets the endpoint identifier

Parameters
  • identifier: the name of the endpoint

void setIP(const string &ip)

Setter for IP Address.

For server side IP defines the interface to bind into.

Parameters
  • ip: the ip address

void setMessageDispatcher(MessageDispatcher *dsp)

Attach message dispatcher.

Parameters
  • dsp: the dispatcher to attach

void setPort(const string &port)

Setter for port information.

Parameters
  • port: the port information to set in string format

void setPort(int port)

Setter for port information.

Parameters
  • port: the port information

void setReliable(bool reliable)

Setter for reliable flag.

Parameters
  • reliable: state of the endpoint

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.

Return

stringified representation of the object

bool valid() const

Checks is object valid.

Return

true if valid.