OSGi™ Enterprise
Release 5

org.osgi.service.remoteserviceadmin
Interface ExportRegistration


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

ThreadSafe
Consumers of this API must not implement this interface

Method Summary
 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.
 

Method Detail

getExportReference

ExportReference getExportReference()
Return the Export Reference for the exported service.

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

close

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.


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 return null. 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.

OSGi™ Enterprise
Release 5

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