Class LocalServiceRegistry.ServiceExportInformation

  • Enclosing class:
    LocalServiceRegistry

    protected static class LocalServiceRegistry.ServiceExportInformation
    extends Object
    ServiceExportInformation encapsulates the data which is needed for exporting a service, which is:
    • the services for exporting a service (ADEPT2ServiceExport),
    • the URIs under which the service is exported and which correspond based on the position in the array to the export service,
    • whether the service is to be published at the global registry.
    This information is exchanged between the preparation of an export and the actual export. While only used for the local URI in this LocalServiceRegistry, this information is of more use in a registry exporting services.
    • Constructor Detail

      • ServiceExportInformation

        public ServiceExportInformation​(ADEPT2ServiceExport[] serviceExports,
                                        URI[] localServiceUris)
        Creates a new object to encapsulate the information for exporting a service. This is for non-exported or locally only exported services.
        The following constraints have to be respected when creating the object and could be relied on when using the object:
        • a local service is exported:
          • at least one export service
          • at least one URI corresponding to the export services
        • a local service is not exported:
          • an empty export service array
          • exactly one URI with the local address
        Parameters:
        serviceExports - An array of export services corresponding to the URIs in localServiceURIs. In case of a non-exported service the array is empty.
        localServiceUris - An array of URIs to be used with the corresponding serviceExports or just one local URI.
      • ServiceExportInformation

        public ServiceExportInformation​(ADEPT2ServiceExport[] serviceExports,
                                        URI[] localServiceUris,
                                        URI[] globalServiceUris)
        Creates a new object to encapsulate the information for exporting a service. This is for published services.
        Parameters:
        serviceExports - An array of export services corresponding to the URIs in localServiceURIs. In case of a non-exported service the array is empty.
        localServiceUris - An array of URIs to be used with the corresponding serviceExports or just one local URI.
        globalServiceUris - The global service URIs under which the service is published at and reachable via the global registry.
    • Method Detail

      • isExported

        public boolean isExported()
        Returns whether the exported service is to be exported at all or just a local service with a local URI.
        Returns:
        Whether this is an exported local service (or a non-exported local service).
      • published

        public boolean published()
        Gets whether the exported service has been published at the global registry.
        Returns:
        Whether the exported service has been published at the global registry.
      • getLocalServiceUris

        public URI[] getLocalServiceUris()
        Gets the URIs under which the service is available at the local service registry. The index in the array corresponds with the export services, if appropriate.
        Returns:
        The URIs under which the service is available at the local service registry. The index in the array corresponds with the export services, if appropriate.
      • getGlobalServiceUris

        public URI[] getGlobalServiceUris()
        Gets the URIs under which the service has been globally published. If the service has not been published, null will be returned.
        Returns:
        The URIs under which the service has been globally published or null in case the service has not been published yet.
      • getServiceUris

        public URI[] getServiceUris()
        Gets the URIs the service is exported with. These are either the global service URIs in case of a published service or the local service URIs in case of a non-exported or non-published service.
        Returns:
        The URIs the service is exported with. These are either the global service URIs in case of a published service or the local service URIs in case of a non-exported or non-published service.
      • getServiceExports

        public ADEPT2ServiceExport[] getServiceExports()
        Gets the services which are used to export a service or an empty array in case of a non-exported local service. The index corresponds to the URIs in the local service URIs.
        Returns:
        The services which are used to export a service or an empty array in case of a non-exported local service. The index corresponds to the URIs in the local service URIs.