| 
OSGi™ Compendium Release 5  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface RemoteServiceAdmin
A Remote Service Admin manages the import and export of services. A Distribution Provider can expose a control interface. This interface allows a Topology Manager to control the export and import of services. The API allows a Topology Manager to export a service, to import a service, and find out about the current imports and exports.
| Method Summary | |
|---|---|
 java.util.Collection<ExportRegistration> | 
exportService(ServiceReference reference,
              java.util.Map<java.lang.String,?> properties)
Export a service to a given Endpoint.  | 
 java.util.Collection<ExportReference> | 
getExportedServices()
Return the currently active Export References.  | 
 java.util.Collection<ImportReference> | 
getImportedEndpoints()
Return the currently active Import References.  | 
 ImportRegistration | 
importService(EndpointDescription endpoint)
Import a service from an Endpoint.  | 
| Method Detail | 
|---|
java.util.Collection<ExportRegistration> exportService(ServiceReference reference,
                                                       java.util.Map<java.lang.String,?> properties)
properties map are case sensitive.
 A property key in the specified properties map must therefore
 override any case variant property key in the properties of the specified
 Service Reference.
 
 
 If the caller does not have the appropriate
 EndpointPermission[endpoint,EXPORT] for an Endpoint, and the Java
 Runtime Environment supports permissions, then the
 getException method on the
 corresponding returned ExportRegistration will return a
 SecurityException.
reference - The Service Reference to export.properties - The properties to create a local Endpoint that can be
        implemented by this Remote Service Admin. If this is null,
        the Endpoint will be determined by the properties on the service.
        The properties are the same as given for an exported service. They
        override any properties in the specified Service Reference (case
        insensitive). The properties objectClass and
        service.id, in any case variant, are ignored. Those
        properties in the Service Reference cannot be overridden. This
        parameter can be null, this should be treated as an empty
        map.
Collection of ExportRegistrations for the
         specified Service Reference and properties. Multiple Export
         Registrations may be returned because a single service can be
         exported to multiple Endpoints depending on the available
         configuration type properties. The result is never null
         but may be empty if this Remove Service Admin does not recognize
         any of the configuration types.
java.lang.IllegalArgumentException - If any of the properties has a value
         that is not syntactically correct or if the service properties
         and the overlaid properties do not contain a
         RemoteConstants.SERVICE_EXPORTED_INTERFACES entry.
java.lang.UnsupportedOperationException - If any of the intents expressed
         through the properties is not supported by the distribution
         provider.ImportRegistration importService(EndpointDescription endpoint)
null if
 the service could not be imported.
endpoint - The Endpoint Description to be used for import.
null if the Endpoint could not
         be imported.
java.lang.SecurityException - If the caller does not have the appropriate
         EndpointPermission[endpoint,IMPORT] for the Endpoint, and
         the Java Runtime Environment supports permissions.java.util.Collection<ExportReference> getExportedServices()
 If the caller does not have the appropriate
 EndpointPermission[endpoint,READ] for an Endpoint, and the Java
 Runtime Environment supports permissions, then returned collection will
 not contain a reference to the exported Endpoint.
Collection of ExportReferences that are
         currently active.java.util.Collection<ImportReference> getImportedEndpoints()
 If the caller does not have the appropriate
 EndpointPermission[endpoint,READ] for an Endpoint, and the Java
 Runtime Environment supports permissions, then returned collection will
 not contain a reference to the imported Endpoint.
Collection of ImportReferences that are
         currently active.
  | 
OSGi™ Compendium Release 5  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||