Interface ExportRegistration
-
@ProviderType public interface ExportRegistration
An Export Registration associates a service to a local endpoint. The Export Registration can be used to delete the endpoint associated with an this registration. It is created with theRemoteServiceAdmin.exportService(ServiceReference,Map)
method. When this Export Registration has been closed, all methods must returnnull
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Delete the local endpoint and disconnect any remote distribution providers.java.lang.Throwable
getException()
Return the exception for any error during the export process.ExportReference
getExportReference()
Return the Export Reference for the exported service.EndpointDescription
update(java.util.Map<java.lang.String,?> properties)
Update the endpoint represented by thisExportRegistration
and return an updatedEndpointDescription
.
-
-
-
Method Detail
-
getExportReference
ExportReference getExportReference()
Return the Export Reference for the exported service.- Returns:
- The Export Reference for this registration, or
null
if this Import Registration is closed. - Throws:
java.lang.IllegalStateException
- When this registration was not properly initialized. SeegetException()
.
-
update
EndpointDescription update(java.util.Map<java.lang.String,?> properties)
Update the endpoint represented by thisExportRegistration
and return an updatedEndpointDescription
. If this method returns an updatedEndpointDescription
, then the object returned viagetExportReference()
must also have been updated to return this new object. If this method does not return an updatedEndpointDescription
then the object returned viagetExportReference()
should remain unchanged. When creating the updatedEndpointDescription
theServiceReference
originally passed toRemoteServiceAdmin.exportService(ServiceReference, Map)
must be queried to pick up any changes to its service properties. If this argument is null then the original properties passed when creating this ExportRegistration should be used when constructing the updatedEndpointDescription
. Otherwise the new properties should be used, and replace the original properties for subsequent calls to the update method.- Parameters:
properties
- properties to be merged with the current service properties for theServiceReference
represented by thisExportRegistration
. If null is passed then the original properties passed toRemoteServiceAdmin.exportService(ServiceReference, Map)
will be used.- Returns:
- The updated
EndpointDescription
for this registration or null if there was a failure updating the endpoint. If a failure occurs then it can be accessed usinggetException()
. - Throws:
java.lang.IllegalStateException
- If this registration is closed, or when this registration was not properly initialized. SeegetException()
.- Since:
- 1.1
-
close
void close()
Delete the local endpoint and disconnect any remote distribution providers. After this method returns, all methods must returnnull
. This method has no effect when this registration has already been closed or is being closed.
-
getException
java.lang.Throwable getException()
Return the exception for any error during the export process. If the Remote Service Admin for some reasons is unable to properly initialize this registration, then it must return an exception from this method. If no error occurred, this method must returnnull
. The error must be set before this Export Registration is returned. Asynchronously occurring errors must be reported to the log.- Returns:
- The exception that occurred during the initialization of this
registration or
null
if no exception occurred.
-
-