Home Reference Source Test
public class | source

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

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

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

returns the hyperty Name from a given url.

public

getHypertyOwner(hypertyURL: String): String

This function returns the user associated to the hyperty URL

public

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

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

isLegacy(url: URL.URL): boolean

To verify if url is for a legacy service.

public

isLocal(url: URL.URL): boolean

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

register a desired dataObject to subscribe

public

registerSubscriber(dataObjectURL: String, subscriberURL: String)

register a new subscriber in the dataObject registered

public

resolve(url: URL.URL): Promise<URL.URL>

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:

NameTypeAttributeDescription
msgbus MessageBus

msgbus

runtimeURL HypertyRuntimeURL

runtimeURL

appSandbox AppSandbox

appSandbox

runtimeCatalogue runtimeCatalogue

runtimeCatalogue

remoteRegistry DomainURL

remoteRegistry

storageManager storageManager

Public Members

public set loader: * source

public get loader: * source

public get messageBus(messageBus: MessageBus): * source

return the messageBus in this Registry

public set messageBus(messageBus: MessageBus): * source

Set the messageBus in this Registry

Public Methods

public checkP2P(info: URL.URL): HypertyDataObjectInstance source

Verifies if remote Entity can be reached with a P2P Connection.

Params:

NameTypeAttributeDescription
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:

NameTypeAttributeDescription
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:

NameTypeAttributeDescription
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:

NameTypeAttributeDescription
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:

NameTypeAttributeDescription
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:

NameTypeAttributeDescription
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:

NameTypeAttributeDescription
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:

NameTypeAttributeDescription
RuntimeURL RuntimeURL

url

Return:

p2pRequester

RuntimeURL

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:

NameTypeAttributeDescription
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:

NameTypeAttributeDescription
url String

url format

Return:

String

Hyperty URL subscribed to the URL

public getDataObjectSubscribers(dataObjectURL: String, Substribers: Array<String>): * source

get the subscribers registered within a dataObject

Params:

NameTypeAttributeDescription
dataObjectURL String

dataObject URL

Substribers Array<String>

List

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:

NameTypeAttributeDescription
url String

hyperty or dataObject URL

Return:

String

hypertyName hyperty Name

public getHypertyOwner(hypertyURL: String): String source

This function returns the user associated to the hyperty URL

Params:

NameTypeAttributeDescription
hypertyURL String

hyperty URL

Return:

String

userURL user 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:

NameTypeAttributeDescription
dataObjectURL String

dataObjectURL

Return:

Array<String>

preAuth List of pre authorised users

public getReporterURL(dataObjectURL: String): String source

function to return the reporterURL associated with the dataobject URL

Params:

NameTypeAttributeDescription
dataObjectURL String

dataObjectURL

Return:

String

reporterURL reporterURL

public getReporterURLSynchonous(dataObjectURL: String): String source

function to return the reporterURL associated with the dataobject URL. no promise returned

Params:

NameTypeAttributeDescription
dataObjectURL String

dataObjectURL

Return:

String

reporterURL reporterURL

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:

NameTypeAttributeDescription
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:

NameTypeAttributeDescription
runtimeProtostubURL URL.URL

The runtime URL of the Protostub

Return:

boolean

public isLegacy(url: URL.URL): boolean source

To verify if url is for a legacy service.

Params:

NameTypeAttributeDescription
url URL.URL

url

Return:

boolean

public isLocal(url: URL.URL): boolean source

To verify if URL is locally registered or not.

Params:

NameTypeAttributeDescription
url URL.URL

url

Return:

boolean

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.

Params:

NameTypeAttributeDescription
identifier String

identifier

dataObjectschema String

dataObjectschema

dataObjectUrl String

dataObjectUrl

dataObjectReporter String

dataObjectReporter

resources Array

dataObject resources

authorise Array

list of pre authorised authorised IDs

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.

Params:

NameTypeAttributeDescription
sandbox Sandbox

sandbox

HypertyCatalogueURL HypertyCatalogueURL

descriptor

IdpConstraint object

constraints to be used when selecting the identity to be associated with the Hyperty including origin, idp, and idHint.

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:

NameTypeAttributeDescription
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:

NameTypeAttributeDescription
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:

NameTypeAttributeDescription
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:

NameTypeAttributeDescription
dataObjectURL String

dataObject URL

public registerSubscriber(dataObjectURL: String, subscriberURL: String) source

register a new subscriber in the dataObject registered

Params:

NameTypeAttributeDescription
dataObjectURL String

dataObject URL

subscriberURL String

subscriber URL

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:

NameTypeAttributeDescription
url URL.URL

url

Return:

Promise<URL.URL>

Promise <URL.URL>

public resolveNormalStub(url: *): * source

Params:

NameTypeAttributeDescription
url *

Return:

*

public unregisterAllHyperties(): Promise source

send requests to unregister all hyperties registered in domain registry

Return:

Promise

return a promise if the result of unregistration all hyperties

public unregisterHyperty(HypertyURL: HypertyURL): * source

To unregister a previously registered Hyperty

Params:

NameTypeAttributeDescription
HypertyURL HypertyURL

url url

Return:

*

public unregisterHypertyInstance(user: String, hypertyInstance: String) source

function to unregister an hypertyInstance in the Domain Registry

Params:

NameTypeAttributeDescription
user String

user url

hypertyInstance String

HypertyInsntance url

public unregisterPEP(HypertyRuntimeURL: HypertyRuntimeURL): * source

To unregister a previously registered protocol stub

Params:

NameTypeAttributeDescription
HypertyRuntimeURL HypertyRuntimeURL

HypertyRuntimeURL

Return:

*

public unregisterStub(HypertyRuntimeURL: HypertyRuntimeURL): * source

To unregister a previously registered protocol stub

Params:

NameTypeAttributeDescription
HypertyRuntimeURL HypertyRuntimeURL

hypertyRuntimeURL

Return:

*

public updateHypertyInstance(resource: *, value: *) source

Function to update an Hyperty

Params:

NameTypeAttributeDescription
resource *
value *