Class LocalServiceRegistry.ServiceExportInformation
java.lang.Object
de.aristaflow.adept2.base.registry.LocalServiceRegistry.ServiceExportInformation
- Enclosing class:
- LocalServiceRegistry
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.
LocalServiceRegistry, this information is of more use in a
registry exporting services.-
Constructor Summary
ConstructorsConstructorDescriptionServiceExportInformation(ADEPT2ServiceExport[] serviceExports, URI[] localServiceUris) Creates a new object to encapsulate the information for exporting a service.ServiceExportInformation(ADEPT2ServiceExport[] serviceExports, URI[] localServiceUris, URI[] globalServiceUris) Creates a new object to encapsulate the information for exporting a service. -
Method Summary
Modifier and TypeMethodDescriptionURI[]Gets the URIs under which the service has been globally published.URI[]Gets the URIs under which the service is available at the local service registry.Gets the services which are used to export a service or an empty array in case of a non-exported local service.URI[]Gets the URIs the service is exported with.booleanReturns whether the exported service is to be exported at all or just a local service with a local URI.booleanGets whether the exported service has been published at the global registry.
-
Constructor Details
-
ServiceExportInformation
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 inlocalServiceURIs. In case of a non-exported service the array is empty.localServiceUris- An array of URIs to be used with the correspondingserviceExportsor just one local URI.
- a local service is exported:
-
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 inlocalServiceURIs. In case of a non-exported service the array is empty.localServiceUris- An array of URIs to be used with the correspondingserviceExportsor just one local URI.globalServiceUris- The global service URIs under which the service is published at and reachable via the global registry.
-
-
Method Details
-
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
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
Gets the URIs under which the service has been globally published. If the service has not been published,nullwill be returned.- Returns:
- The URIs under which the service has been globally published or
nullin case the service has not been published yet.
-
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
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.
-