Top Description Methods
org.osgi.service.remoteserviceadmin

public Interface ImportRegistration

Annotations
@ProviderType
Imports
org.osgi.annotation.versioning.ProviderType

An Import Registration associates an active proxy service to a remote endpoint. The Import Registration can be used to delete the proxy associated with an endpoint. It is created with the RemoteServiceAdmin#importService(EndpointDescription) method. When this Import Registration has been closed, all methods must return null.
Author
$Id: 4dfea3f10524d18ba3b46176b9df33e7de0e7176 $

Method Summary

Modifier and TypeMethod and Description
public void
close()

Close this Import Registration.

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 import process.

public ImportReference

Returns:

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

Return the Import Reference for the imported service.

public boolean

Returns:

true if the endpoint was successfully updated, false otherwise. If the update fails then the failure can be retrieved from getException().
update
(EndpointDescription
The updated endpoint
endpoint
)

Update the local service represented by this ImportRegistration.

Method Detail

closeback to summary
public void close()

Close this Import Registration. This must close the connection to the endpoint and unregister the proxy. After this method returns, all other 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 import 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 Import 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.

getImportReferenceback to summary
public ImportReference getImportReference()

Return the Import Reference for the imported service.

Returns:ImportReference

The Import 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 boolean update(EndpointDescription endpoint)

Update the local service represented by this ImportRegistration. After this method returns the EndpointDescription returned via getImportReference() must have been updated.

Parameters
endpoint:EndpointDescription

The updated endpoint

Returns:boolean

true if the endpoint was successfully updated, false otherwise. If the update fails then the failure can be retrieved from getException().

Exceptions
IllegalStateException:
When this registration is closed, or if it was not properly initialized. See getException().
IllegalArgumentException:
When the supplied EndpointDescription does not represent the same endpoint as this ImportRegistration.
Since
1.1