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

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

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

Since:
4.2

Method Summary
 void close()
          Close this Import Registration.
 ID getContainerID()
           
 java.lang.Throwable getException()
          Return the exception for any error during the import process.
 ImportReference getImportReference()
          Return the Import Reference for the imported service.
 long getRemoteServiceId()
           
 java.lang.String toString()
           
 boolean update(EndpointDescription endpoint)
          Update the local service represented by this ImportRegistration.
 
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()

getImportReference

public ImportReference getImportReference()
Description copied from interface: ImportRegistration
Return the Import Reference for the imported service.

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

close

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

Specified by:
close in interface ImportRegistration

getException

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

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

update

public boolean update(EndpointDescription endpoint)
Description copied from interface: ImportRegistration
Update the local service represented by this ImportRegistration. After this method returns the EndpointDescription returned via ImportRegistration.getImportReference() must have been updated.

Specified by:
update in interface ImportRegistration
Parameters:
endpoint - The updated endpoint
Returns:
true if the endpoint was successfully updated, false otherwise. If the update fails then the failure can be retrieved from ImportRegistration.getException().