|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.ecf.osgi.services.remoteserviceadmin.RemoteServiceAdmin
public class RemoteServiceAdmin
ECF implementation of OSGI 4.2 Remote Service Admin service. This service can be used by topology managers to to export and/or import remote services with any ECF container that implements the ECF remote service API.
Nested Class Summary | |
---|---|
class |
RemoteServiceAdmin.ExportReference
|
class |
RemoteServiceAdmin.ExportRegistration
|
class |
RemoteServiceAdmin.ImportReference
|
class |
RemoteServiceAdmin.ImportRegistration
|
protected class |
RemoteServiceAdmin.ProxyClassLoader
|
class |
RemoteServiceAdmin.RemoteServiceAdminEvent
|
Field Summary | |
---|---|
static java.lang.String |
SERVICE_PROP
|
Constructor Summary | |
---|---|
RemoteServiceAdmin(org.osgi.framework.Bundle clientBundle)
|
|
RemoteServiceAdmin(org.osgi.framework.Bundle clientBundle,
java.util.Collection<ExportRegistration> exportedRegistrations,
java.util.Collection<ImportRegistration> importedRegistrations)
|
Method Summary | |
---|---|
void |
close()
|
java.util.Collection<ExportRegistration> |
exportService(org.osgi.framework.ServiceReference<?> serviceReference,
java.util.Map<java.lang.String,?> op)
Export a service to a given Endpoint. |
protected IConsumerContainerSelector |
getConsumerContainerSelector()
|
java.util.List<RemoteServiceAdmin.ExportRegistration> |
getExportedRegistrations()
|
java.util.Collection<ExportReference> |
getExportedServices()
Return the currently active Export References. |
protected IHostContainerSelector |
getHostContainerSelector()
|
java.util.Collection<ImportReference> |
getImportedEndpoints()
Return the currently active Import References. |
java.util.List<RemoteServiceAdmin.ImportRegistration> |
getImportedRegistrations()
|
ImportRegistration |
importService(EndpointDescription endpointDescription)
Import a service from an Endpoint. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SERVICE_PROP
Constructor Detail |
---|
public RemoteServiceAdmin(org.osgi.framework.Bundle clientBundle)
public RemoteServiceAdmin(org.osgi.framework.Bundle clientBundle, java.util.Collection<ExportRegistration> exportedRegistrations, java.util.Collection<ImportRegistration> importedRegistrations)
Method Detail |
---|
public java.util.List<RemoteServiceAdmin.ExportRegistration> getExportedRegistrations()
public java.util.List<RemoteServiceAdmin.ImportRegistration> getImportedRegistrations()
public java.util.Collection<ExportRegistration> exportService(org.osgi.framework.ServiceReference<?> serviceReference, java.util.Map<java.lang.String,?> op)
RemoteServiceAdmin
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
.
exportService
in interface RemoteServiceAdmin
serviceReference
- The Service Reference to export.op
- 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 ExportRegistration
s 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 and the intents that they support.
The result is never null
but may be empty if this Remove
Service Admin does not recognize any of the configuration types,
or if they Remote Service Admin cannot support the relevant
intents.public ImportRegistration importService(EndpointDescription endpointDescription)
RemoteServiceAdmin
null
if
the service could not be imported.
importService
in interface RemoteServiceAdmin
endpointDescription
- The Endpoint Description to be used for import.
null
if the Endpoint could not
be imported.public java.util.Collection<ExportReference> getExportedServices()
RemoteServiceAdmin
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.
getExportedServices
in interface RemoteServiceAdmin
Collection
of ExportReference
s that are
currently active.public java.util.Collection<ImportReference> getImportedEndpoints()
RemoteServiceAdmin
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.
getImportedEndpoints
in interface RemoteServiceAdmin
Collection
of ImportReference
s that are
currently active.protected IHostContainerSelector getHostContainerSelector()
protected IConsumerContainerSelector getConsumerContainerSelector()
public void close()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |