Eclipse Remote Application Platform

org.eclipse.rap.rwt.service
Interface ServiceManager

All Superinterfaces:
IServiceManager

public interface ServiceManager
extends IServiceManager

The service manager is used to register service handlers with the framework. An instance can be obtained from RWT.getServiceManager(). Service handlers can also be registered in an ApplicationConfiguration.

Since:
2.0
See Also:
ServiceHandler

Method Summary
 java.lang.String getServiceHandlerUrl(java.lang.String id)
          Returns the URL to access a service handler.
 void registerServiceHandler(java.lang.String id, ServiceHandler serviceHandler)
          Registers a new service handler with the given unique id.
 void unregisterServiceHandler(java.lang.String id)
          Unregisters the service handler with the given id.
 

Method Detail

registerServiceHandler

void registerServiceHandler(java.lang.String id,
                            ServiceHandler serviceHandler)
Registers a new service handler with the given unique id. The id is used to address the service handler in a request. The URL to address a registered service handler can be obtained from getServiceHandlerUrl(String).

Specified by:
registerServiceHandler in interface IServiceManager
Parameters:
id - the id to register this service handler with
serviceHandler - the service handler to register
Throws:
java.lang.IllegalArgumentException - if a service handler is already registered with the given id
See Also:
ServiceHandler

unregisterServiceHandler

void unregisterServiceHandler(java.lang.String id)
Unregisters the service handler with the given id. If no service hander has been registered with the given id, nothing happens.

Specified by:
unregisterServiceHandler in interface IServiceManager
Parameters:
id - the id of the service handler to remove
See Also:
ServiceHandler

getServiceHandlerUrl

java.lang.String getServiceHandlerUrl(java.lang.String id)
Returns the URL to access a service handler. The URL contains a parameter, it is legal to append more parameters by appending "&key=value...".

Specified by:
getServiceHandlerUrl in interface IServiceManager
Parameters:
id - the id that the service handler has been registered with
Returns:
the URL to address the service handler

Eclipse Remote Application Platform

Copyright (c) EclipseSource and others 2002, 2012. All rights reserved.