QRemoteObjectRegistryHost Class | Qt Remote Objects 5.12.9

- Qt 5.12
- Qt Remote Objects
- C++ Classes
- QRemoteObjectRegistryHost
- Qt 5.12.9 Reference Documentation

# QRemoteObjectRegistryHost Class

A (Host/Registry) node on a Qt Remote Objects network. More...

Header: | #include <QRemoteObjectRegistryHost>
qmake: | QT += remoteobjects
Inherits: | QRemoteObjectHostBase

- List of all members, including inherited members
- Obsolete members

## Public Functions

| QRemoteObjectRegistryHost(const QUrl &registryAddress = QUrl(), QObject *parent = nullptr)
virtual | ~QRemoteObjectRegistryHost() override

## Reimplemented Public Functions

virtual bool | setRegistryUrl(const QUrl &registryUrl) override

- 8 public functions inherited from QRemoteObjectHostBase
- 18 public functions inherited from QRemoteObjectNode
- 31 public functions inherited from QObject

## Static Public Members

const QMetaObject | staticMetaObject

- 9 static public members inherited from QObject

### Additional Inherited Members

- 3 properties inherited from QRemoteObjectNode
- 1 property inherited from QObject
- 1 public slot inherited from QObject
- 4 signals inherited from QRemoteObjectNode
- 2 signals inherited from QObject
- 1 protected function inherited from QRemoteObjectNode
- 9 protected functions inherited from QObject

## Detailed Description

A (Host/Registry) node on a Qt Remote Objects network.

The QRemoteObjectRegistryHost class provides an entry point to a QtRemoteObjects network. A network can be as simple as two Nodes, or an arbitrarily complex set of processes and devices.

A QRemoteObjectRegistryHost has the same capability that a QRemoteObjectHost has (which includes everything a QRemoteObjectNode supports), and in addition is the owner of the Registry. Any QRemoteObjectHost node that connects to this Node will have all of their Source objects made available by the Registry.

Nodes only support connection to one registry, calling QRemoteObjectNode::setRegistryUrl when a Registry is already set is considered an error. For something like a secure and insecure network (where different Registries would be applicable), the recommendation is to create separate Nodes to connect to each, in effect creating two independent Qt Remote Objects networks.

Nodes may connect to each other directly using connectToNode, or they can use the QRemoteObjectRegistry to simplify connections.

The QRemoteObjectRegistry is a special Replica available to every Node that connects to the Registry Url. It knows how to connect to every QRemoteObjectSource object on the network.

See also QRemoteObjectNode and QRemoteObjectHost.

## Member Function Documentation

### QRemoteObjectRegistryHost::QRemoteObjectRegistryHost(const QUrl &registryAddress = QUrl(), QObject *parent = nullptr)

Constructs a new QRemoteObjectRegistryHost Node with the given parent. RegistryHost Nodes have the same functionality as QRemoteObjectHost Nodes, except rather than being able to connect to a QRemoteObjectRegistry, the provided Host QUrl (registryAddress) becomes the address of the registry for other Nodes to connect to.

### `[override virtual]` QRemoteObjectRegistryHost::~QRemoteObjectRegistryHost()

Destroys the instance of QRemoteObjectRegistryHost. The destructor is virtual.

### `[override virtual]` bool QRemoteObjectRegistryHost::setRegistryUrl(const QUrl &registryUrl)

Reimplemented from QRemoteObjectNode::setRegistryUrl().

This method can be used to set the address of this Node to registryUrl (used for other Nodes to connect to this one), if the QUrl isn't set in the constructor. Since this Node becomes the Registry, calling this setter method causes this Node to use the url as the host address. All other Node's use the QRemoteObjectNode::setRegistryUrl method initiate a connection to the Registry.

See also QRemoteObjectRegistryHost() and QRemoteObjectNode::setRegistryUrl.