OSGi™ Compendium
Release 5

org.osgi.service.remoteserviceadmin
Interface ImportRegistration


public interface ImportRegistration

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.

ThreadSafe
Consumers of this API must not implement this interface

Method Summary
 void close()
          Close this Import Registration.
 java.lang.Throwable getException()
          Return the exception for any error during the import process.
 ImportReference getImportReference()
          Return the Import Reference for the imported service.
 

Method Detail

getImportReference

ImportReference getImportReference()
Return the Import Reference for the imported service.

Returns:
The Import Reference for this registration.
Throws:
java.lang.IllegalStateException - When this registration was not properly initialized. See getException().

close

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.


getException

java.lang.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:
The exception that occurred during the initialization of this registration or null if no exception occurred.

OSGi™ Compendium
Release 5

Copyright © OSGi Alliance (2000, 2013). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0