Top Description Methods
org.osgi.service.remoteserviceadmin

public Interface ExportRegistration

Annotations
@ProviderType
Imports
java.util.Map, org.osgi.annotation.versioning.ProviderType, org.osgi.framework.ServiceReference

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 the RemoteServiceAdmin#exportService(ServiceReference, Map) method. When this Export Registration has been closed, all methods must return null.
Author
$Id: 322d7ced307aa3ec6bf05041e1a50375e0763722 $

Method Summary

Modifier and TypeMethod and Description
public void
close()

Delete the local endpoint and disconnect any remote distribution providers.

public Throwable

Returns:

The exception that occurred during the initialization of this registration or null if no exception occurred.
getException
()

Return the exception for any error during the export process.

public ExportReference

Returns:

The Export Reference for this registration, or null if this Import Registration is closed.
getExportReference
()

Return the Export Reference for the exported service.

public EndpointDescription

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 using getException().
update
(Map<String, ?>
properties to be merged with the current service properties for the ServiceReference represented by this ExportRegistration. If null is passed then the original properties passed to RemoteServiceAdmin#exportService(ServiceReference, Map) will be used.
properties
)

Update the endpoint represented by this ExportRegistration and return an updated EndpointDescription.

Method Detail

closeback to summary
public void close()

Delete the local endpoint and disconnect any remote distribution providers. After this method returns, all methods must return null. This method has no effect when this registration has already been closed or is being closed.

getExceptionback to summary
public 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 return null. The error must be set before this Export Registration is returned. Asynchronously occurring errors must be reported to the log.

Returns:Throwable

The exception that occurred during the initialization of this registration or null if no exception occurred.

getExportReferenceback to summary
public ExportReference getExportReference()

Return the Export Reference for the exported service.

Returns:ExportReference

The Export Reference for this registration, or null if this Import Registration is closed.

Exceptions
IllegalStateException:
When this registration was not properly initialized. See getException().
updateback to summary
public EndpointDescription update(Map<String, ?> properties)

Update the endpoint represented by this ExportRegistration and return an updated EndpointDescription. If this method returns an updated EndpointDescription, then the object returned via getExportReference() must also have been updated to return this new object. If this method does not return an updated EndpointDescription then the object returned via getExportReference() should remain unchanged. When creating the updated EndpointDescription the ServiceReference originally passed to RemoteServiceAdmin#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 updated EndpointDescription. Otherwise the new properties should be used, and replace the original properties for subsequent calls to the update method.

Parameters
properties:Map<String, ?>

properties to be merged with the current service properties for the ServiceReference represented by this ExportRegistration. If null is passed then the original properties passed to RemoteServiceAdmin#exportService(ServiceReference, Map) will be used.

Returns:EndpointDescription

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 using getException().

Exceptions
IllegalStateException:
If this registration is closed, or when this registration was not properly initialized. See getException().
Since
1.1