org.eclipse.ecf.server
Interface IServiceHost


public interface IServiceHost

Service Host

Since:
2.0

Method Summary
 java.lang.String getConnectTargetLocation()
          Get the connect target location for this service host.
 IRemoteServiceContainer getRemoteServiceContainer()
          Get the remote service container for this service client.
 IRemoteServiceRegistration registerRemoteService(java.lang.String[] clazzes, java.lang.Object service, java.util.Dictionary remoteServiceProperties)
          Register a remote service with this service client.
 org.osgi.framework.ServiceRegistration registerServiceHost(org.osgi.framework.BundleContext context, java.util.Dictionary properties)
          Register service host.
 void start()
          Start the service host.
 void stop()
          Stop this service host.
 

Method Detail

getConnectTargetLocation

java.lang.String getConnectTargetLocation()
Get the connect target location for this service host. Will not be null.

Returns:
String that provides an connect target location for IServiceClients to use to connect to this service host.

start

void start()
           throws java.lang.Exception
Start the service host. This will make the service host active, and available on the network.

Throws:
java.lang.Exception - if something goes wrong with initialization or starting.

registerServiceHost

org.osgi.framework.ServiceRegistration registerServiceHost(org.osgi.framework.BundleContext context,
                                                           java.util.Dictionary properties)
Register service host. Registers this service host in the service registry with the given BundleContext.

Parameters:
context - the BundleContext to register with. Must not be null.
properties - to associate with IServiceHost registration. May be null.
Returns:
ServiceRegistration registration for the IServiceHost service. Will not be null.

registerRemoteService

IRemoteServiceRegistration registerRemoteService(java.lang.String[] clazzes,
                                                 java.lang.Object service,
                                                 java.util.Dictionary remoteServiceProperties)
Register a remote service with this service client. This allows remote services to be registered/exposed for remote usage.

Parameters:
clazzes - the interface class names of the remote services expose.
service - the actual service implementation.
remoteServiceProperties - and remote service properties to be exposed to clients of the remote service.
Returns:
IRemoteServiceRegistration the remote service registration for the registered remote service. Will not be null.

getRemoteServiceContainer

IRemoteServiceContainer getRemoteServiceContainer()
Get the remote service container for this service client.

Returns:
IRemoteServiceContainer will not be null.

stop

void stop()
Stop this service host. This will stop any/all the underlying containers for this host.