org.eclipse.ecf.osgi.services.remoteserviceadmin
Class RemoteServiceAdmin.ExportRegistration

java.lang.Object
  extended by org.eclipse.ecf.osgi.services.remoteserviceadmin.RemoteServiceAdmin.ExportRegistration
All Implemented Interfaces:
ExportRegistration
Enclosing class:
RemoteServiceAdmin

public class RemoteServiceAdmin.ExportRegistration
extends java.lang.Object
implements ExportRegistration

Since:
4.2

Method Summary
 void close()
          Delete the local endpoint and disconnect any remote distribution providers.
 ID getContainerID()
           
 java.lang.Throwable getException()
          Return the exception for any error during the export process.
 ExportReference getExportReference()
          Return the Export Reference for the exported service.
 long getRemoteServiceId()
           
 java.lang.String toString()
           
 EndpointDescription update(java.util.Map<java.lang.String,?> properties)
          Update the endpoint represented by this ExportRegistration and return an updated EndpointDescription.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getContainerID

public ID getContainerID()

getRemoteServiceId

public long getRemoteServiceId()

getExportReference

public ExportReference getExportReference()
Description copied from interface: ExportRegistration
Return the Export Reference for the exported service.

Specified by:
getExportReference in interface ExportRegistration
Returns:
The Export Reference for this registration, or null if this Import Registration is closed.

close

public void close()
Description copied from interface: ExportRegistration
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.

Specified by:
close in interface ExportRegistration

getException

public java.lang.Throwable getException()
Description copied from interface: ExportRegistration
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.

Specified by:
getException in interface ExportRegistration
Returns:
The exception that occurred during the initialization of this registration or null if no exception occurred.

update

public EndpointDescription update(java.util.Map<java.lang.String,?> properties)
Description copied from interface: ExportRegistration
Update the endpoint represented by this ExportRegistration and return an updated EndpointDescription. If this method returns an updated EndpointDescription, then the object returned via ExportRegistration.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 ExportRegistration.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.

Specified by:
update in interface ExportRegistration
Parameters:
properties - 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:
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 ExportRegistration.getException().