Registry
Runtime Registry Interface
Constructor Summary
Public Constructor | ||
public |
constructor(msgbus: MessageBus, runtimeURL: HypertyRuntimeURL, appSandbox: AppSandbox, runtimeCatalogue: runtimeCatalogue, remoteRegistry: DomainURL, storageManager: storageManager) To initialise the Runtime Registry with the RuntimeURL that will be the basis to derive the internal runtime addresses when allocating addresses to internal runtime component. |
Member Summary
Public Members | ||
public set |
loader: * |
|
public get |
loader: * |
|
public get |
messageBus(messageBus: MessageBus): * return the messageBus in this Registry |
|
public set |
messageBus(messageBus: MessageBus): * Set the messageBus in this Registry |
Method Summary
Public Methods | ||
public |
checkP2P(info: URL.URL): HypertyDataObjectInstance Verifies if remote Entity can be reached with a P2P Connection. |
|
public |
checkP2PDataObject(DataObjectURL: URL.URL): HypertyDataObjectInstance Verifies if remote Data Object can be reached with a P2P Connection. |
|
public |
checkP2PHyperty(info: JSON): addressURL Verifies if remote Hyperty can be reached with a P2P Connection. |
|
public |
checkP2PRuntime(runtimeURL: URL.URL): Object Verifies if remote Runtime can be reached with a P2P Connection. |
|
public |
checkRegisteredURLs(info: JSON): addressURL method that returns previously registered Hyperty or DataObjects URLS, for given characteristics |
|
public |
deleteDataObjectInstance(name: String) function to delete an dataObjectInstance in the Domain Registry |
|
public |
discoverIdpProxy(DomainURL: DomainURL): RuntimeURL To discover idpProxy stubs available in the runtime for a certain domain. |
|
public |
discoverP2PStub(RuntimeURL: RuntimeURL): p2pRequester To discover protocol stubs available in the runtime for a certain remote runtime URL. |
|
public |
discoverProtostub(DomainURL: DomainURL): RuntimeURL To discover protocol stubs available in the runtime for a certain domain. |
|
public |
getAppSandbox(): * This function is used to return the sandbox instance where the Application is executing. |
|
public |
returns the hyperty URL that subscribed the dataObject |
|
public |
getDataObjectSubscribers(dataObjectURL: String, Substribers: Array<String>): * get the subscribers registered within a dataObject |
|
public |
getHypertyName(url: String): String returns the hyperty Name from a given url. |
|
public |
getHypertyOwner(hypertyURL: String): String This function returns the user associated to the hyperty URL |
|
public |
getPreAuthSubscribers(dataObjectURL: String): Array<String> Function to return the list of pre authorised users received in the creation of a data object |
|
public |
getReporterURL(dataObjectURL: String): String function to return the reporterURL associated with the dataobject URL |
|
public |
getReporterURLSynchonous(dataObjectURL: String): String function to return the reporterURL associated with the dataobject URL. |
|
public |
getSandbox(DomainURL: DomainURL): RuntimeSandbox To discover sandboxes available in the runtime for a certain domain and a certain set of capabilities. |
|
public |
isInterworkingProtoStub(runtimeProtostubURL: URL.URL): boolean To verify if protostub is to interwork with a legacy domain. |
|
public |
To verify if url is for a legacy service. |
|
public |
To verify if URL is locally registered or not. |
|
public |
registerDataObject(identifier: String, dataObjectschema: String, dataObjectUrl: String, dataObjectReporter: String, resources: Array, authorise: Array): * To register a new Data Object in the runtime which returns the dataObjectURL allocated to the new Data Object. |
|
public |
registerHyperty(sandbox: Sandbox, HypertyCatalogueURL: HypertyCatalogueURL, IdpConstraint: object): HypertyURL To register a new Hyperty in the runtime which returns the HypertyURL allocated to the new Hyperty. |
|
public |
registerIdpProxy(Sandbox: Sandbox, DomainURL: DomainURL): RuntimeIdpProxyURL To register a new Identity Provider proxy in the runtime including as input parameters the function to postMessage, the DomainURL that is connected with the stub, which returns the RuntimeURL allocated to the new ProtocolStub. |
|
public |
registerPEP(postMessage: Message.Message, HypertyURL: HypertyURL): HypertyRuntimeURL To register a new Policy Enforcer in the runtime including as input parameters the function to postMessage, the HypertyURL associated with the PEP, which returns the RuntimeURL allocated to the new Policy Enforcer component. |
|
public |
registerStub(Sandbox: Sandbox, Domain: stubID, Catalogue: descriptorURL, Protostub: descriptor): RuntimeProtoStubURL To register a new Protocol Stub in the runtime including as input parameters the function to postMessage, the DomainURL that is connected with the stub, which returns the RuntimeURL allocated to the new ProtocolStub. |
|
public |
registerSubscribedDataObject(dataObjectURL: String) register a desired dataObject to subscribe |
|
public |
registerSubscriber(dataObjectURL: String, subscriberURL: String) register a new subscriber in the dataObject registered |
|
public |
To verify if source is valid and to resolve target runtime url address if needed (eg protostub runtime url in case the message is to be dispatched to a remote endpoint). |
|
public |
resolveNormalStub(url: *): * |
|
public |
send requests to unregister all hyperties registered in domain registry |
|
public |
unregisterHyperty(HypertyURL: HypertyURL): * To unregister a previously registered Hyperty |
|
public |
unregisterHypertyInstance(user: String, hypertyInstance: String) function to unregister an hypertyInstance in the Domain Registry |
|
public |
unregisterPEP(HypertyRuntimeURL: HypertyRuntimeURL): * To unregister a previously registered protocol stub |
|
public |
unregisterStub(HypertyRuntimeURL: HypertyRuntimeURL): * To unregister a previously registered protocol stub |
|
public |
updateHypertyInstance(resource: *, value: *) Function to update an Hyperty |
Public Constructors
public constructor(msgbus: MessageBus, runtimeURL: HypertyRuntimeURL, appSandbox: AppSandbox, runtimeCatalogue: runtimeCatalogue, remoteRegistry: DomainURL, storageManager: storageManager) source
To initialise the Runtime Registry with the RuntimeURL that will be the basis to derive the internal runtime addresses when allocating addresses to internal runtime component. In addition, the Registry domain back-end to be used to remotely register Runtime components, is also passed as input parameter.
Params:
Name | Type | Attribute | Description |
msgbus | MessageBus | msgbus |
|
runtimeURL | HypertyRuntimeURL | runtimeURL |
|
appSandbox | AppSandbox | appSandbox |
|
runtimeCatalogue | runtimeCatalogue | runtimeCatalogue |
|
remoteRegistry | DomainURL | remoteRegistry |
|
storageManager | storageManager |
Public Methods
public checkP2P(info: URL.URL): HypertyDataObjectInstance source
Verifies if remote Entity can be reached with a P2P Connection.
Params:
Name | Type | Attribute | Description |
info | URL.URL | object URL |
Return:
HypertyDataObjectInstance | addressURL return the Data Object instance registered URL, return undefined otherwise |
public checkP2PDataObject(DataObjectURL: URL.URL): HypertyDataObjectInstance source
Verifies if remote Data Object can be reached with a P2P Connection.
Params:
Name | Type | Attribute | Description |
DataObjectURL | URL.URL | object URL |
Return:
HypertyDataObjectInstance | addressURL return the Data Object instance registered URL, return undefined otherwise |
public checkP2PHyperty(info: JSON): addressURL source
Verifies if remote Hyperty can be reached with a P2P Connection.
Params:
Name | Type | Attribute | Description |
info | JSON | object or hyperty charateristics info |
Return:
addressURL | addressURL return the URL if there is any previousy registered URL, return undefined otherwise |
public checkP2PRuntime(runtimeURL: URL.URL): Object source
Verifies if remote Runtime can be reached with a P2P Connection.
Params:
Name | Type | Attribute | Description |
runtimeURL | URL.URL | Runtime URL |
Return:
Object | p2pConnection return the P2PConnection instance registered URL, return undefined otherwise |
public checkRegisteredURLs(info: JSON): addressURL source
method that returns previously registered Hyperty or DataObjects URLS, for given characteristics
Params:
Name | Type | Attribute | Description |
info | JSON | object or hyperty charateristics info |
Return:
addressURL | addressURL return the URL if there is any previousy registered URL, return undefined otherwise |
public deleteDataObjectInstance(name: String) source
function to delete an dataObjectInstance in the Domain Registry
Params:
Name | Type | Attribute | Description |
name | String | DataObjectName |
public discoverIdpProxy(DomainURL: DomainURL): RuntimeURL source
To discover idpProxy stubs available in the runtime for a certain domain. If available, it returns the runtime url for the idpProxy stub that connects to the requested domain. Required by the runtime BUS to route messages to remote servers or peers
Params:
Name | Type | Attribute | Description |
DomainURL | DomainURL | url |
Return:
RuntimeURL | RuntimeURL idpProxyUrl |
public discoverP2PStub(RuntimeURL: RuntimeURL): p2pRequester source
To discover protocol stubs available in the runtime for a certain remote runtime URL. If available, it returns the runtime url for the protocol stub that connects to the requested domain. Required by the runtime BUS to route messages to remote servers or peers (do we need something similar for Hyperties?).
Params:
Name | Type | Attribute | Description |
RuntimeURL | RuntimeURL | url |
public discoverProtostub(DomainURL: DomainURL): RuntimeURL source
To discover protocol stubs available in the runtime for a certain domain. If available, it returns the runtime url for the protocol stub that connects to the requested domain. Required by the runtime BUS to route messages to remote servers or peers (do we need something similar for Hyperties?).
Params:
Name | Type | Attribute | Description |
DomainURL | DomainURL | url |
Return:
RuntimeURL | RuntimeURL |
public getAppSandbox(): * source
This function is used to return the sandbox instance where the Application is executing. It is assumed there is just one App per Runtime instance.
Return:
* |
public getDataObjectSubscriberHyperty(url: String): String source
returns the hyperty URL that subscribed the dataObject
Params:
Name | Type | Attribute | Description |
url | String | url format |
public getDataObjectSubscribers(dataObjectURL: String, Substribers: Array<String>): * source
get the subscribers registered within a dataObject
Return:
* |
public getHypertyName(url: String): String source
returns the hyperty Name from a given url. This url could be from a dataObject or hyperty
Params:
Name | Type | Attribute | Description |
url | String | hyperty or dataObject URL |
public getHypertyOwner(hypertyURL: String): String source
This function returns the user associated to the hyperty URL
Params:
Name | Type | Attribute | Description |
hypertyURL | String | hyperty URL |
public getPreAuthSubscribers(dataObjectURL: String): Array<String> source
Function to return the list of pre authorised users received in the creation of a data object
Params:
Name | Type | Attribute | Description |
dataObjectURL | String | dataObjectURL |
public getReporterURL(dataObjectURL: String): String source
function to return the reporterURL associated with the dataobject URL
Params:
Name | Type | Attribute | Description |
dataObjectURL | String | dataObjectURL |
public getReporterURLSynchonous(dataObjectURL: String): String source
function to return the reporterURL associated with the dataobject URL. no promise returned
Params:
Name | Type | Attribute | Description |
dataObjectURL | String | dataObjectURL |
public getSandbox(DomainURL: DomainURL): RuntimeSandbox source
To discover sandboxes available in the runtime for a certain domain and a certain set of capabilities. Required by the runtime UA to avoid more than one sandbox for the same domain.
Params:
Name | Type | Attribute | Description |
DomainURL | DomainURL | url |
Return:
RuntimeSandbox | RuntimeSandbox |
public isInterworkingProtoStub(runtimeProtostubURL: URL.URL): boolean source
To verify if protostub is to interwork with a legacy domain.
Params:
Name | Type | Attribute | Description |
runtimeProtostubURL | URL.URL | The runtime URL of the Protostub |
public isLegacy(url: URL.URL): boolean source
To verify if url is for a legacy service.
Params:
Name | Type | Attribute | Description |
url | URL.URL | url |
public isLocal(url: URL.URL): boolean source
To verify if URL is locally registered or not.
Params:
Name | Type | Attribute | Description |
url | URL.URL | url |
public registerDataObject(identifier: String, dataObjectschema: String, dataObjectUrl: String, dataObjectReporter: String, resources: Array, authorise: Array): * source
To register a new Data Object in the runtime which returns the dataObjectURL allocated to the new Data Object.
Return:
* |
public registerHyperty(sandbox: Sandbox, HypertyCatalogueURL: HypertyCatalogueURL, IdpConstraint: object): HypertyURL source
To register a new Hyperty in the runtime which returns the HypertyURL allocated to the new Hyperty.
Return:
HypertyURL | HypertyURL |
public registerIdpProxy(Sandbox: Sandbox, DomainURL: DomainURL): RuntimeIdpProxyURL source
To register a new Identity Provider proxy in the runtime including as input parameters the function to postMessage, the DomainURL that is connected with the stub, which returns the RuntimeURL allocated to the new ProtocolStub.
Params:
Name | Type | Attribute | Description |
Sandbox | Sandbox | ||
DomainURL | DomainURL | service provider domain |
Return:
RuntimeIdpProxyURL |
public registerPEP(postMessage: Message.Message, HypertyURL: HypertyURL): HypertyRuntimeURL source
To register a new Policy Enforcer in the runtime including as input parameters the function to postMessage, the HypertyURL associated with the PEP, which returns the RuntimeURL allocated to the new Policy Enforcer component.
Params:
Name | Type | Attribute | Description |
postMessage | Message.Message | postMessage |
|
HypertyURL | HypertyURL | hyperty |
Return:
HypertyRuntimeURL | HypertyRuntimeURL |
public registerStub(Sandbox: Sandbox, Domain: stubID, Catalogue: descriptorURL, Protostub: descriptor): RuntimeProtoStubURL source
To register a new Protocol Stub in the runtime including as input parameters the function to postMessage, the DomainURL that is connected with the stub, which returns the RuntimeURL allocated to the new ProtocolStub.
Params:
Name | Type | Attribute | Description |
Sandbox | Sandbox | ||
Domain | stubID | or hyperty runtime to register the stub |
|
Catalogue | descriptorURL | URL of the Protostub descriptor |
|
Protostub | descriptor | descriptor |
Return:
RuntimeProtoStubURL |
public registerSubscribedDataObject(dataObjectURL: String) source
register a desired dataObject to subscribe
Params:
Name | Type | Attribute | Description |
dataObjectURL | String | dataObject URL |
public registerSubscriber(dataObjectURL: String, subscriberURL: String) source
register a new subscriber in the dataObject registered
public resolve(url: URL.URL): Promise<URL.URL> source
To verify if source is valid and to resolve target runtime url address if needed (eg protostub runtime url in case the message is to be dispatched to a remote endpoint).
Params:
Name | Type | Attribute | Description |
url | URL.URL | url |
public unregisterAllHyperties(): Promise source
send requests to unregister all hyperties registered in domain registry
public unregisterHyperty(HypertyURL: HypertyURL): * source
To unregister a previously registered Hyperty
Params:
Name | Type | Attribute | Description |
HypertyURL | HypertyURL | url url |
Return:
* |
public unregisterHypertyInstance(user: String, hypertyInstance: String) source
function to unregister an hypertyInstance in the Domain Registry
public unregisterPEP(HypertyRuntimeURL: HypertyRuntimeURL): * source
To unregister a previously registered protocol stub
Params:
Name | Type | Attribute | Description |
HypertyRuntimeURL | HypertyRuntimeURL | HypertyRuntimeURL |
Return:
* |
public unregisterStub(HypertyRuntimeURL: HypertyRuntimeURL): * source
To unregister a previously registered protocol stub
Params:
Name | Type | Attribute | Description |
HypertyRuntimeURL | HypertyRuntimeURL | hypertyRuntimeURL |
Return:
* |
public updateHypertyInstance(resource: *, value: *) source
Function to update an Hyperty
Params:
Name | Type | Attribute | Description |
resource | * | ||
value | * |