Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Sternberg2012-11-30 16:23:02 +0000
committerRalf Sternberg2012-11-30 16:23:02 +0000
commit4e33bdd290d0eb8da790a1ecda823cb2e27dc732 (patch)
tree5f0aedb258eda76d6b18a60747f0d2d7f2b2d294
parenta20999e4c15fd1d10edb97d6ceb82de0b4d0e697 (diff)
downloadorg.eclipse.rap-4e33bdd290d0eb8da790a1ecda823cb2e27dc732.tar.gz
org.eclipse.rap-4e33bdd290d0eb8da790a1ecda823cb2e27dc732.tar.xz
org.eclipse.rap-4e33bdd290d0eb8da790a1ecda823cb2e27dc732.zip
Rename IServiceHandler to ServiceHandler
See bug 391724: Remove "I" prefix from interfaces https://bugs.eclipse.org/bugs/show_bug.cgi?id=391724
-rw-r--r--bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/RWT.java8
-rw-r--r--bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/application/Application.java8
-rw-r--r--bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/internal/application/ApplicationImpl.java6
-rw-r--r--bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/internal/service/LifeCycleServiceHandler.java4
-rw-r--r--bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/internal/service/ServiceHandlerRegistry.java10
-rw-r--r--bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/internal/service/ServiceManager.java20
-rw-r--r--bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/internal/uicallback/UICallBackServiceHandler.java4
-rw-r--r--bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/service/IServiceHandler.java61
-rw-r--r--bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/service/IServiceManager.java14
-rw-r--r--bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/service/ServiceHandler.java77
-rw-r--r--bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/widgets/ClusteredSynchronizer.java6
-rw-r--r--bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/rap/ui/internal/servlet/WorkbenchApplicationConfigurator.java4
-rw-r--r--bundles/org.eclipse.rap.ui/schema/rap/serviceHandler.exsd4
-rw-r--r--tests/org.eclipse.rap.rwt.cluster.testfixture/src/org/eclipse/rap/rwt/cluster/testfixture/client/RWTClient.java4
-rw-r--r--tests/org.eclipse.rap.rwt.jstest/src/org/eclipse/rap/rwt/jstest/internal/ClientResourcesServiceHandler.java4
-rw-r--r--tests/org.eclipse.rap.rwt.jstest/src/org/eclipse/rap/rwt/jstest/internal/RapTestApplicationConfigurator.java4
-rw-r--r--tests/org.eclipse.rap.rwt.test/src/org/eclipse/rap/rwt/engine/RWTServlet_Test.java6
-rw-r--r--tests/org.eclipse.rap.rwt.test/src/org/eclipse/rap/rwt/internal/application/ApplicationContextConfigurator_Test.java4
-rw-r--r--tests/org.eclipse.rap.rwt.test/src/org/eclipse/rap/rwt/internal/service/LifeCycleServiceHandler_Test.java8
-rw-r--r--tests/org.eclipse.rap.rwt.test/src/org/eclipse/rap/rwt/service/ServiceManager_Test.java24
20 files changed, 151 insertions, 129 deletions
diff --git a/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/RWT.java b/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/RWT.java
index c125ea3978..00186098ab 100644
--- a/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/RWT.java
+++ b/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/RWT.java
@@ -40,7 +40,7 @@ import org.eclipse.rap.rwt.internal.widgets.BrowserHistoryImpl;
import org.eclipse.rap.rwt.lifecycle.ILifeCycle;
import org.eclipse.rap.rwt.resources.IResourceManager;
import org.eclipse.rap.rwt.service.IApplicationStore;
-import org.eclipse.rap.rwt.service.IServiceHandler;
+import org.eclipse.rap.rwt.service.ServiceHandler;
import org.eclipse.rap.rwt.service.IServiceManager;
import org.eclipse.rap.rwt.service.IServiceStore;
import org.eclipse.rap.rwt.service.ISessionStore;
@@ -427,7 +427,7 @@ public final class RWT {
}
/**
- * Returns a manager to add and remove {@link IServiceHandler}s.
+ * Returns a manager to add and remove {@link ServiceHandler}s.
*
* @return the {@link IServiceManager}
*/
@@ -483,7 +483,7 @@ public final class RWT {
* service handlers obtain parameters of the request to process.
* </p>
* @return instance of {@link HttpServletRequest}
- * @see IServiceHandler
+ * @see ServiceHandler
*/
public static HttpServletRequest getRequest() {
checkHasSessionContext();
@@ -500,7 +500,7 @@ public final class RWT {
* certainly an error.
* </p>
* @return instance of {@link HttpServletResponse}
- * @see IServiceHandler
+ * @see ServiceHandler
*/
public static HttpServletResponse getResponse() {
checkHasSessionContext();
diff --git a/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/application/Application.java b/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/application/Application.java
index d57279118c..8e60486d8a 100644
--- a/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/application/Application.java
+++ b/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/application/Application.java
@@ -20,7 +20,7 @@ import org.eclipse.rap.rwt.lifecycle.IEntryPointFactory;
import org.eclipse.rap.rwt.lifecycle.PhaseListener;
import org.eclipse.rap.rwt.resources.ResourceLoader;
import org.eclipse.rap.rwt.service.IApplicationStore;
-import org.eclipse.rap.rwt.service.IServiceHandler;
+import org.eclipse.rap.rwt.service.ServiceHandler;
import org.eclipse.rap.rwt.service.ISettingStore;
import org.eclipse.rap.rwt.service.ISettingStoreFactory;
import org.eclipse.rap.rwt.widgets.DialogUtil;
@@ -211,15 +211,15 @@ public interface Application {
* Adds a service handler to the application. A service handler is used to
* handle requests with a certain parameter inside the application. You can
* think of it like a lightweight servlet that has access to the user's
- * session. Please see the documentation of {@link IServiceHandler} for the
+ * session. Please see the documentation of {@link ServiceHandler} for the
* URL to access this service handler.
*
* @param serviceHandlerId the id for this servlet handler, used in the
* parameter
* @param serviceHandler the servlet handler to register
- * @see IServiceHandler
+ * @see ServiceHandler
*/
- void addServiceHandler( String serviceHandlerId, IServiceHandler serviceHandler );
+ void addServiceHandler( String serviceHandlerId, ServiceHandler serviceHandler );
void addResource( String resourceName, ResourceLoader resourceLoader );
}
diff --git a/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/internal/application/ApplicationImpl.java b/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/internal/application/ApplicationImpl.java
index 93e3f17ac6..efdeee2e2e 100644
--- a/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/internal/application/ApplicationImpl.java
+++ b/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/internal/application/ApplicationImpl.java
@@ -31,7 +31,7 @@ import org.eclipse.rap.rwt.lifecycle.IEntryPoint;
import org.eclipse.rap.rwt.lifecycle.IEntryPointFactory;
import org.eclipse.rap.rwt.lifecycle.PhaseListener;
import org.eclipse.rap.rwt.resources.ResourceLoader;
-import org.eclipse.rap.rwt.service.IServiceHandler;
+import org.eclipse.rap.rwt.service.ServiceHandler;
import org.eclipse.rap.rwt.service.ISettingStoreFactory;
import org.eclipse.swt.widgets.Widget;
@@ -99,11 +99,11 @@ public class ApplicationImpl implements Application, Adaptable {
public void addResource( String resourceName, ResourceLoader resourceLoader ) {
ParamCheck.notNull( resourceName, "resourceName" );
ParamCheck.notNull( resourceLoader, "resourceLoader" );
-
+
applicationContext.getResourceRegistry().add( resourceName, resourceLoader );
}
- public void addServiceHandler( String serviceHandlerId, IServiceHandler serviceHandler ) {
+ public void addServiceHandler( String serviceHandlerId, ServiceHandler serviceHandler ) {
ParamCheck.notNull( serviceHandlerId, "serviceHandlerId" );
ParamCheck.notNull( serviceHandler, "serviceHandler" );
diff --git a/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/internal/service/LifeCycleServiceHandler.java b/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/internal/service/LifeCycleServiceHandler.java
index e37bc46d3d..1acd5c4021 100644
--- a/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/internal/service/LifeCycleServiceHandler.java
+++ b/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/internal/service/LifeCycleServiceHandler.java
@@ -32,11 +32,11 @@ import org.eclipse.rap.rwt.internal.protocol.ProtocolMessageWriter;
import org.eclipse.rap.rwt.internal.protocol.ProtocolUtil;
import org.eclipse.rap.rwt.internal.theme.JsonValue;
import org.eclipse.rap.rwt.internal.util.HTTP;
-import org.eclipse.rap.rwt.service.IServiceHandler;
+import org.eclipse.rap.rwt.service.ServiceHandler;
import org.eclipse.rap.rwt.service.ISessionStore;
-public class LifeCycleServiceHandler implements IServiceHandler {
+public class LifeCycleServiceHandler implements ServiceHandler {
private static final String PROP_ERROR = "error";
private static final String PROP_MESSAGE = "message";
private static final String SESSION_STARTED
diff --git a/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/internal/service/ServiceHandlerRegistry.java b/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/internal/service/ServiceHandlerRegistry.java
index 3000a034ec..55615446cb 100644
--- a/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/internal/service/ServiceHandlerRegistry.java
+++ b/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/internal/service/ServiceHandlerRegistry.java
@@ -13,23 +13,23 @@ package org.eclipse.rap.rwt.internal.service;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.rap.rwt.service.IServiceHandler;
+import org.eclipse.rap.rwt.service.ServiceHandler;
class ServiceHandlerRegistry {
- private final Map<String, IServiceHandler> handlers;
+ private final Map<String, ServiceHandler> handlers;
ServiceHandlerRegistry() {
- handlers = new HashMap<String, IServiceHandler>();
+ handlers = new HashMap<String, ServiceHandler>();
}
- IServiceHandler get( String serviceHandlerId ) {
+ ServiceHandler get( String serviceHandlerId ) {
synchronized( handlers ) {
return handlers.get( serviceHandlerId );
}
}
- void put( String serviceHandlerId, IServiceHandler serviceHandler ) {
+ void put( String serviceHandlerId, ServiceHandler serviceHandler ) {
synchronized( handlers ) {
handlers.put( serviceHandlerId, serviceHandler );
}
diff --git a/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/internal/service/ServiceManager.java b/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/internal/service/ServiceManager.java
index 51d7744fad..cae190805b 100644
--- a/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/internal/service/ServiceManager.java
+++ b/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/internal/service/ServiceManager.java
@@ -12,24 +12,24 @@
******************************************************************************/
package org.eclipse.rap.rwt.internal.service;
-import org.eclipse.rap.rwt.service.IServiceHandler;
+import org.eclipse.rap.rwt.service.ServiceHandler;
import org.eclipse.rap.rwt.service.IServiceManager;
public class ServiceManager implements IServiceManager {
- private final IServiceHandler lifeCycleRequestHandler;
+ private final ServiceHandler lifeCycleRequestHandler;
private final ServiceHandlerRegistry customHandlers;
- public ServiceManager( IServiceHandler lifeCycleRequestHandler ) {
+ public ServiceManager( ServiceHandler lifeCycleRequestHandler ) {
this.lifeCycleRequestHandler = lifeCycleRequestHandler;
customHandlers = new ServiceHandlerRegistry();
}
- public IServiceHandler getServiceHandler( String customId ) {
+ public ServiceHandler getServiceHandler( String customId ) {
return customHandlers.get( customId );
}
- public void registerServiceHandler( String id, IServiceHandler handler ) {
+ public void registerServiceHandler( String id, ServiceHandler handler ) {
customHandlers.put( id, handler );
}
@@ -41,8 +41,8 @@ public class ServiceManager implements IServiceManager {
customHandlers.clear();
}
- public IServiceHandler getHandler() {
- IServiceHandler result;
+ public ServiceHandler getHandler() {
+ ServiceHandler result;
String customId = getCustomHandlerId();
if( customId != null && customId.length() > 0 ) {
result = getCustomHandlerChecked( customId );
@@ -52,8 +52,8 @@ public class ServiceManager implements IServiceManager {
return result;
}
- private IServiceHandler getCustomHandlerChecked( String customId ) {
- IServiceHandler customHandler = customHandlers.get( customId );
+ private ServiceHandler getCustomHandlerChecked( String customId ) {
+ ServiceHandler customHandler = customHandlers.get( customId );
if( customHandler == null ) {
throw new IllegalArgumentException( "No service handler registered with id " + customId );
}
@@ -61,7 +61,7 @@ public class ServiceManager implements IServiceManager {
}
private static String getCustomHandlerId() {
- return ContextProvider.getRequest().getParameter( IServiceHandler.REQUEST_PARAM );
+ return ContextProvider.getRequest().getParameter( ServiceHandler.REQUEST_PARAM );
}
}
diff --git a/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/internal/uicallback/UICallBackServiceHandler.java b/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/internal/uicallback/UICallBackServiceHandler.java
index 211deb1d03..8a499008e6 100644
--- a/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/internal/uicallback/UICallBackServiceHandler.java
+++ b/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/internal/uicallback/UICallBackServiceHandler.java
@@ -16,10 +16,10 @@ import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import org.eclipse.rap.rwt.internal.service.ContextProvider;
-import org.eclipse.rap.rwt.service.IServiceHandler;
+import org.eclipse.rap.rwt.service.ServiceHandler;
-public class UICallBackServiceHandler implements IServiceHandler {
+public class UICallBackServiceHandler implements ServiceHandler {
public final static String HANDLER_ID = "org.eclipse.rap.uicallback";
diff --git a/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/service/IServiceHandler.java b/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/service/IServiceHandler.java
index 89e6cfde6b..197886f1fa 100644
--- a/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/service/IServiceHandler.java
+++ b/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/service/IServiceHandler.java
@@ -11,67 +11,12 @@
******************************************************************************/
package org.eclipse.rap.rwt.service;
-import java.io.IOException;
-import javax.servlet.ServletException;
-
/**
- * <p>
- * A service handler can be used to process requests that bypass the standard
- * request lifecycle. Clients are free to implement custom service handlers to
- * deliver custom content. Implementing a custom service handler involves three
- * steps:
- * </p>
- * <ul>
- * <li>Implementing the IServiceHandler interface, e.g.
- * <pre>
- * public class MyServiceHandler implements IServiceHandler {
- * public void service() throws IOException, ServletException {
- * HttpServletResponse response = RWT.getResponse();
- * response.getWriter().write( &quot;Hello World&quot; );
- * }
- * }
- * </pre>
- * </li>
- * <li>Registering the service handler and associating it with a request
- * parameter value.
- * <pre>
- * RWT.getServiceManager().registerServiceHandler( &quot;myServiceHandler&quot;,
- * new MyServiceHandler() );
- * </pre>
- * </li>
- * <li>Constructing the URL to invoke the service handler. The URL must contain
- * the agreed parameter value like this:
- * <code>http://localhost:9090/rap?custom_service_handler=myServiceHandler</code>.
- * The following example code snippet achieves this
- * <pre>
- * StringBuilder url = new StringBuilder();
- * url.append( RWT.getRequest().getContextPath() );
- * url.append( RWT.getRequest().getServletPath() );
- * url.append( &quot;?&quot; );
- * url.append( IServiceHandler.REQUEST_PARAM );
- * url.append( &quot;=myServiceHandler&quot; );
- * String encodedURL = RWT.getResponse().encodeURL( url.toString() );
- * </pre>
- * </li>
- *
* @since 2.0
+ * @deprecated Use ServiceHandler instead.
*/
-public interface IServiceHandler {
-
- /**
- * <p>The request parameter name to hold the service handlers name as its
- * value (value is custom_service_handler).</p>
- */
- static final String REQUEST_PARAM = "custom_service_handler";
-
- /**
- * <p>This method is called by the request lifecycle to allow the service
- * handler to respond to a request.</p>
- *
- * @throws IOException
- * @throws ServletException
- */
- void service() throws IOException, ServletException;
+@Deprecated
+public interface IServiceHandler extends ServiceHandler {
}
diff --git a/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/service/IServiceManager.java b/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/service/IServiceManager.java
index 945ac24a28..8ff87e9962 100644
--- a/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/service/IServiceManager.java
+++ b/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/service/IServiceManager.java
@@ -14,9 +14,9 @@ package org.eclipse.rap.rwt.service;
/**
* An <code>IServiceManager</code> is responsible to manage existing
- * <code>IServiceHandler</code>s.
+ * <code>ServiceHandler</code>s.
*
- * @see IServiceHandler
+ * @see ServiceHandler
*
* @since 2.0
* @noimplement This interface is not intended to be implemented by clients.
@@ -29,19 +29,19 @@ public interface IServiceManager {
* registered service handler.
*
* @param id the identifier of this service handler used in the URL
- * @param serviceHandler the <code>IServiceHandler</code> implementation
+ * @param serviceHandler the <code>ServiceHandler</code> implementation
*
- * @see IServiceHandler
- * @see IServiceHandler#REQUEST_PARAM
+ * @see ServiceHandler
+ * @see ServiceHandler#REQUEST_PARAM
*/
- void registerServiceHandler( String id, IServiceHandler serviceHandler );
+ void registerServiceHandler( String id, ServiceHandler serviceHandler );
/**
* Unregisters a service handler.
*
* @param id the identifier of this service handler
*
- * @see IServiceHandler
+ * @see ServiceHandler
*/
void unregisterServiceHandler( String id );
}
diff --git a/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/service/ServiceHandler.java b/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/service/ServiceHandler.java
new file mode 100644
index 0000000000..8f31f2b6d1
--- /dev/null
+++ b/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/service/ServiceHandler.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2012 Innoopract Informationssysteme GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Innoopract Informationssysteme GmbH - initial API and implementation
+ * EclipseSource - ongoing development
+ ******************************************************************************/
+package org.eclipse.rap.rwt.service;
+
+import java.io.IOException;
+import javax.servlet.ServletException;
+
+
+/**
+ * <p>
+ * A service handler can be used to process requests that bypass the standard
+ * request lifecycle. Clients are free to implement custom service handlers to
+ * deliver custom content. Implementing a custom service handler involves three
+ * steps:
+ * </p>
+ * <ul>
+ * <li>Implementing the ServiceHandler interface, e.g.
+ * <pre>
+ * public class MyServiceHandler implements ServiceHandler {
+ * public void service() throws IOException, ServletException {
+ * HttpServletResponse response = RWT.getResponse();
+ * response.getWriter().write( &quot;Hello World&quot; );
+ * }
+ * }
+ * </pre>
+ * </li>
+ * <li>Registering the service handler and associating it with a request
+ * parameter value.
+ * <pre>
+ * RWT.getServiceManager().registerServiceHandler( &quot;myServiceHandler&quot;,
+ * new MyServiceHandler() );
+ * </pre>
+ * </li>
+ * <li>Constructing the URL to invoke the service handler. The URL must contain
+ * the agreed parameter value like this:
+ * <code>http://localhost:9090/rap?custom_service_handler=myServiceHandler</code>.
+ * The following example code snippet achieves this
+ * <pre>
+ * StringBuilder url = new StringBuilder();
+ * url.append( RWT.getRequest().getContextPath() );
+ * url.append( RWT.getRequest().getServletPath() );
+ * url.append( &quot;?&quot; );
+ * url.append( ServiceHandler.REQUEST_PARAM );
+ * url.append( &quot;=myServiceHandler&quot; );
+ * String encodedURL = RWT.getResponse().encodeURL( url.toString() );
+ * </pre>
+ * </li>
+ *
+ * @since 2.0
+ */
+public interface ServiceHandler {
+
+ /**
+ * <p>The request parameter name to hold the service handlers name as its
+ * value (value is custom_service_handler).</p>
+ */
+ static final String REQUEST_PARAM = "custom_service_handler";
+
+ /**
+ * <p>This method is called by the request lifecycle to allow the service
+ * handler to respond to a request.</p>
+ *
+ * @throws IOException
+ * @throws ServletException
+ */
+ void service() throws IOException, ServletException;
+
+}
diff --git a/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/widgets/ClusteredSynchronizer.java b/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/widgets/ClusteredSynchronizer.java
index 0c29a55f1b..92962cfcb4 100644
--- a/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/widgets/ClusteredSynchronizer.java
+++ b/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/widgets/ClusteredSynchronizer.java
@@ -17,7 +17,7 @@ import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import org.eclipse.rap.rwt.RWT;
-import org.eclipse.rap.rwt.service.IServiceHandler;
+import org.eclipse.rap.rwt.service.ServiceHandler;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Synchronizer;
@@ -95,7 +95,7 @@ public class ClusteredSynchronizer extends Synchronizer {
return result;
}
- static class AsyncExecServiceHandler implements IServiceHandler {
+ static class AsyncExecServiceHandler implements ServiceHandler {
static final String ID = "asyncExecServiceHandler";
static void register() {
@@ -109,7 +109,7 @@ public class ClusteredSynchronizer extends Synchronizer {
buffer.append( request.getServerPort() );
buffer.append( request.getRequestURI() );
buffer.append( "?" );
- buffer.append( IServiceHandler.REQUEST_PARAM );
+ buffer.append( ServiceHandler.REQUEST_PARAM );
buffer.append( "=" );
buffer.append( ID );
return buffer.toString();
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/rap/ui/internal/servlet/WorkbenchApplicationConfigurator.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/rap/ui/internal/servlet/WorkbenchApplicationConfigurator.java
index 7baa278d44..3c452af7e4 100644
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/rap/ui/internal/servlet/WorkbenchApplicationConfigurator.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/rap/ui/internal/servlet/WorkbenchApplicationConfigurator.java
@@ -44,7 +44,7 @@ import org.eclipse.rap.rwt.lifecycle.IEntryPoint;
import org.eclipse.rap.rwt.lifecycle.IEntryPointFactory;
import org.eclipse.rap.rwt.lifecycle.PhaseListener;
import org.eclipse.rap.rwt.resources.ResourceLoader;
-import org.eclipse.rap.rwt.service.IServiceHandler;
+import org.eclipse.rap.rwt.service.ServiceHandler;
import org.eclipse.rap.rwt.service.ISettingStoreFactory;
import org.eclipse.rap.ui.internal.application.EntryPointApplicationWrapper;
import org.eclipse.rap.ui.internal.branding.AbstractBranding;
@@ -411,7 +411,7 @@ public final class WorkbenchApplicationConfigurator implements ApplicationConfig
String id = elements[ i ].getAttribute( "id" );
if( id != null ) {
Object extObject = elements[ i ].createExecutableExtension( "class" );
- IServiceHandler handler = ( IServiceHandler )extObject;
+ ServiceHandler handler = ( ServiceHandler )extObject;
application.addServiceHandler( id, handler );
}
} catch( final CoreException ce ) {
diff --git a/bundles/org.eclipse.rap.ui/schema/rap/serviceHandler.exsd b/bundles/org.eclipse.rap.ui/schema/rap/serviceHandler.exsd
index 9c7d6f5497..43effe54b1 100644
--- a/bundles/org.eclipse.rap.ui/schema/rap/serviceHandler.exsd
+++ b/bundles/org.eclipse.rap.ui/schema/rap/serviceHandler.exsd
@@ -61,10 +61,10 @@ To invoke the service handler a developer needs to construct a URL. The URL must
<attribute name="class" type="string" use="required">
<annotation>
<documentation>
- An implementation of &lt;code&gt;IServiceHandler&lt;/code&gt;
+ An implementation of &lt;code&gt;ServiceHandler&lt;/code&gt;
</documentation>
<appInfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.rap.rwt.service.IServiceHandler"/>
+ <meta.attribute kind="java" basedOn=":org.eclipse.rap.rwt.service.ServiceHandler"/>
</appInfo>
</annotation>
</attribute>
diff --git a/tests/org.eclipse.rap.rwt.cluster.testfixture/src/org/eclipse/rap/rwt/cluster/testfixture/client/RWTClient.java b/tests/org.eclipse.rap.rwt.cluster.testfixture/src/org/eclipse/rap/rwt/cluster/testfixture/client/RWTClient.java
index 457ba92f79..3ef07d0d96 100644
--- a/tests/org.eclipse.rap.rwt.cluster.testfixture/src/org/eclipse/rap/rwt/cluster/testfixture/client/RWTClient.java
+++ b/tests/org.eclipse.rap.rwt.cluster.testfixture/src/org/eclipse/rap/rwt/cluster/testfixture/client/RWTClient.java
@@ -19,7 +19,7 @@ import java.util.Map;
import org.eclipse.rap.rwt.cluster.testfixture.server.IServletEngine;
import org.eclipse.rap.rwt.internal.uicallback.UICallBackServiceHandler;
-import org.eclipse.rap.rwt.service.IServiceHandler;
+import org.eclipse.rap.rwt.service.ServiceHandler;
import org.eclipse.swt.dnd.Transfer;
@@ -133,7 +133,7 @@ public class RWTClient {
public Response sendUICallBackRequest( int timeout ) throws IOException {
Map<String,String> parameters = new HashMap<String,String>();
- parameters.put( IServiceHandler.REQUEST_PARAM, UICallBackServiceHandler.HANDLER_ID );
+ parameters.put( ServiceHandler.REQUEST_PARAM, UICallBackServiceHandler.HANDLER_ID );
URL url = createUrl( IServletEngine.SERVLET_NAME, parameters );
HttpURLConnection connection = createConnection( "GET", url, timeout );
return new Response( connection );
diff --git a/tests/org.eclipse.rap.rwt.jstest/src/org/eclipse/rap/rwt/jstest/internal/ClientResourcesServiceHandler.java b/tests/org.eclipse.rap.rwt.jstest/src/org/eclipse/rap/rwt/jstest/internal/ClientResourcesServiceHandler.java
index 0570c38cbf..28550c9d23 100644
--- a/tests/org.eclipse.rap.rwt.jstest/src/org/eclipse/rap/rwt/jstest/internal/ClientResourcesServiceHandler.java
+++ b/tests/org.eclipse.rap.rwt.jstest/src/org/eclipse/rap/rwt/jstest/internal/ClientResourcesServiceHandler.java
@@ -26,10 +26,10 @@ import javax.servlet.http.HttpServletResponse;
import org.eclipse.rap.rwt.RWT;
import org.eclipse.rap.rwt.jstest.TestContribution;
-import org.eclipse.rap.rwt.service.IServiceHandler;
+import org.eclipse.rap.rwt.service.ServiceHandler;
-public class ClientResourcesServiceHandler implements IServiceHandler {
+public class ClientResourcesServiceHandler implements ServiceHandler {
private static final String PARAM_CONTRIBUTION = "contribution";
private static final String PARAM_FILE = "file";
diff --git a/tests/org.eclipse.rap.rwt.jstest/src/org/eclipse/rap/rwt/jstest/internal/RapTestApplicationConfigurator.java b/tests/org.eclipse.rap.rwt.jstest/src/org/eclipse/rap/rwt/jstest/internal/RapTestApplicationConfigurator.java
index 600c9a5308..d77a663aba 100644
--- a/tests/org.eclipse.rap.rwt.jstest/src/org/eclipse/rap/rwt/jstest/internal/RapTestApplicationConfigurator.java
+++ b/tests/org.eclipse.rap.rwt.jstest/src/org/eclipse/rap/rwt/jstest/internal/RapTestApplicationConfigurator.java
@@ -14,13 +14,13 @@ import org.eclipse.rap.rwt.application.Application;
import org.eclipse.rap.rwt.application.ApplicationConfiguration;
import org.eclipse.rap.rwt.lifecycle.IEntryPoint;
import org.eclipse.rap.rwt.lifecycle.IEntryPointFactory;
-import org.eclipse.rap.rwt.service.IServiceHandler;
+import org.eclipse.rap.rwt.service.ServiceHandler;
public class RapTestApplicationConfigurator implements ApplicationConfiguration {
public void configure( Application application ) {
- IServiceHandler serviceHandler = new ClientResourcesServiceHandler();
+ ServiceHandler serviceHandler = new ClientResourcesServiceHandler();
application.addServiceHandler( ClientResourcesServiceHandler.ID, serviceHandler );
IEntryPointFactory factory = new IEntryPointFactory() {
public IEntryPoint create() {
diff --git a/tests/org.eclipse.rap.rwt.test/src/org/eclipse/rap/rwt/engine/RWTServlet_Test.java b/tests/org.eclipse.rap.rwt.test/src/org/eclipse/rap/rwt/engine/RWTServlet_Test.java
index cf876d3f5c..865cb694cd 100644
--- a/tests/org.eclipse.rap.rwt.test/src/org/eclipse/rap/rwt/engine/RWTServlet_Test.java
+++ b/tests/org.eclipse.rap.rwt.test/src/org/eclipse/rap/rwt/engine/RWTServlet_Test.java
@@ -27,7 +27,7 @@ import org.eclipse.rap.rwt.engine.RWTServlet;
import org.eclipse.rap.rwt.internal.application.ApplicationContext;
import org.eclipse.rap.rwt.internal.application.ApplicationContextUtil;
import org.eclipse.rap.rwt.internal.service.ContextProvider;
-import org.eclipse.rap.rwt.service.IServiceHandler;
+import org.eclipse.rap.rwt.service.ServiceHandler;
import org.eclipse.rap.rwt.service.IServiceStore;
import org.eclipse.rap.rwt.testfixture.TestRequest;
import org.eclipse.rap.rwt.testfixture.TestResponse;
@@ -80,8 +80,8 @@ public class RWTServlet_Test extends TestCase {
final List<IServiceStore> log = new ArrayList<IServiceStore>();
ApplicationContext applicationContext = createApplicationContext();
TestRequest request = createTestRequest( applicationContext );
- request.setParameter( IServiceHandler.REQUEST_PARAM, "foo" );
- applicationContext.getServiceManager().registerServiceHandler( "foo", new IServiceHandler() {
+ request.setParameter( ServiceHandler.REQUEST_PARAM, "foo" );
+ applicationContext.getServiceManager().registerServiceHandler( "foo", new ServiceHandler() {
public void service() throws IOException, ServletException {
log.add( ContextProvider.getServiceStore() );
}
diff --git a/tests/org.eclipse.rap.rwt.test/src/org/eclipse/rap/rwt/internal/application/ApplicationContextConfigurator_Test.java b/tests/org.eclipse.rap.rwt.test/src/org/eclipse/rap/rwt/internal/application/ApplicationContextConfigurator_Test.java
index 986e58e612..d330dd0df6 100644
--- a/tests/org.eclipse.rap.rwt.test/src/org/eclipse/rap/rwt/internal/application/ApplicationContextConfigurator_Test.java
+++ b/tests/org.eclipse.rap.rwt.test/src/org/eclipse/rap/rwt/internal/application/ApplicationContextConfigurator_Test.java
@@ -35,7 +35,7 @@ import org.eclipse.rap.rwt.lifecycle.PhaseEvent;
import org.eclipse.rap.rwt.lifecycle.PhaseId;
import org.eclipse.rap.rwt.lifecycle.PhaseListener;
import org.eclipse.rap.rwt.resources.ResourceLoader;
-import org.eclipse.rap.rwt.service.IServiceHandler;
+import org.eclipse.rap.rwt.service.ServiceHandler;
import org.eclipse.rap.rwt.service.ISettingStore;
import org.eclipse.rap.rwt.service.ISettingStoreFactory;
import org.eclipse.rap.rwt.testfixture.Fixture;
@@ -294,7 +294,7 @@ public class ApplicationContextConfigurator_Test extends TestCase {
}
}
- private static class TestServiceHandler implements IServiceHandler {
+ private static class TestServiceHandler implements ServiceHandler {
public void service() throws IOException, ServletException {
}
}
diff --git a/tests/org.eclipse.rap.rwt.test/src/org/eclipse/rap/rwt/internal/service/LifeCycleServiceHandler_Test.java b/tests/org.eclipse.rap.rwt.test/src/org/eclipse/rap/rwt/internal/service/LifeCycleServiceHandler_Test.java
index 8a407ed17a..1e169e2ccf 100644
--- a/tests/org.eclipse.rap.rwt.test/src/org/eclipse/rap/rwt/internal/service/LifeCycleServiceHandler_Test.java
+++ b/tests/org.eclipse.rap.rwt.test/src/org/eclipse/rap/rwt/internal/service/LifeCycleServiceHandler_Test.java
@@ -38,7 +38,7 @@ import org.eclipse.rap.rwt.internal.protocol.ProtocolUtil;
import org.eclipse.rap.rwt.internal.util.HTTP;
import org.eclipse.rap.rwt.lifecycle.IEntryPoint;
import org.eclipse.rap.rwt.lifecycle.ILifeCycle;
-import org.eclipse.rap.rwt.service.IServiceHandler;
+import org.eclipse.rap.rwt.service.ServiceHandler;
import org.eclipse.rap.rwt.service.ISessionStore;
import org.eclipse.rap.rwt.testfixture.Fixture;
import org.eclipse.rap.rwt.testfixture.Message;
@@ -77,7 +77,7 @@ public class LifeCycleServiceHandler_Test extends TestCase {
ContextProvider.getSessionStore();
ServiceContext context = ContextProvider.getContext();
for( int i = 0; i < THREAD_COUNT; i++ ) {
- IServiceHandler syncHandler = new TestHandler( getLifeCycleFactory(), mockStartupPage() );
+ ServiceHandler syncHandler = new TestHandler( getLifeCycleFactory(), mockStartupPage() );
Thread thread = new Thread( new Worker( context, syncHandler ) );
thread.setDaemon( true );
thread.start();
@@ -338,9 +338,9 @@ public class LifeCycleServiceHandler_Test extends TestCase {
private static class Worker implements Runnable {
private final ServiceContext context;
- private final IServiceHandler serviceHandler;
+ private final ServiceHandler serviceHandler;
- private Worker( ServiceContext context, IServiceHandler serviceHandler ) {
+ private Worker( ServiceContext context, ServiceHandler serviceHandler ) {
this.context = context;
this.serviceHandler = serviceHandler;
}
diff --git a/tests/org.eclipse.rap.rwt.test/src/org/eclipse/rap/rwt/service/ServiceManager_Test.java b/tests/org.eclipse.rap.rwt.test/src/org/eclipse/rap/rwt/service/ServiceManager_Test.java
index f98ce5b0d0..6595cada4b 100644
--- a/tests/org.eclipse.rap.rwt.test/src/org/eclipse/rap/rwt/service/ServiceManager_Test.java
+++ b/tests/org.eclipse.rap.rwt.test/src/org/eclipse/rap/rwt/service/ServiceManager_Test.java
@@ -16,20 +16,20 @@ import static org.mockito.Mockito.mock;
import junit.framework.TestCase;
import org.eclipse.rap.rwt.internal.service.ServiceManager;
-import org.eclipse.rap.rwt.service.IServiceHandler;
+import org.eclipse.rap.rwt.service.ServiceHandler;
import org.eclipse.rap.rwt.testfixture.Fixture;
public class ServiceManager_Test extends TestCase {
private static final String SERVICE_HANDLER_ID = "serviceHandlerId";
- private IServiceHandler lifeCycleServiceHandler;
+ private ServiceHandler lifeCycleServiceHandler;
private ServiceManager serviceManager;
@Override
protected void setUp() {
Fixture.setUp();
- lifeCycleServiceHandler = mock( IServiceHandler.class );
+ lifeCycleServiceHandler = mock( ServiceHandler.class );
serviceManager = new ServiceManager( lifeCycleServiceHandler );
}
@@ -39,7 +39,7 @@ public class ServiceManager_Test extends TestCase {
}
public void testRegisterServiceHandler() throws Exception {
- IServiceHandler serviceHandler = mock( IServiceHandler.class );
+ ServiceHandler serviceHandler = mock( ServiceHandler.class );
serviceManager.registerServiceHandler( SERVICE_HANDLER_ID, serviceHandler );
@@ -47,8 +47,8 @@ public class ServiceManager_Test extends TestCase {
}
public void testRegisterServiceHandlerTwice() throws Exception {
- IServiceHandler firstHandler = mock( IServiceHandler.class );
- IServiceHandler secondHandler = mock( IServiceHandler.class );
+ ServiceHandler firstHandler = mock( ServiceHandler.class );
+ ServiceHandler secondHandler = mock( ServiceHandler.class );
serviceManager.registerServiceHandler( SERVICE_HANDLER_ID, firstHandler );
serviceManager.registerServiceHandler( SERVICE_HANDLER_ID, secondHandler );
@@ -57,7 +57,7 @@ public class ServiceManager_Test extends TestCase {
}
public void testUnregisterServiceHandler() throws Exception {
- IServiceHandler serviceHandler = mock( IServiceHandler.class );
+ ServiceHandler serviceHandler = mock( ServiceHandler.class );
serviceManager.registerServiceHandler( SERVICE_HANDLER_ID, serviceHandler );
serviceManager.unregisterServiceHandler( SERVICE_HANDLER_ID );
@@ -66,7 +66,7 @@ public class ServiceManager_Test extends TestCase {
}
public void testClear() throws Exception {
- IServiceHandler serviceHandler = mock( IServiceHandler.class );
+ ServiceHandler serviceHandler = mock( ServiceHandler.class );
serviceManager.registerServiceHandler( SERVICE_HANDLER_ID, serviceHandler );
serviceManager.clear();
@@ -79,17 +79,17 @@ public class ServiceManager_Test extends TestCase {
}
public void testGetHandler_custom() throws Exception {
- IServiceHandler serviceHandler = mock( IServiceHandler.class );
+ ServiceHandler serviceHandler = mock( ServiceHandler.class );
serviceManager.registerServiceHandler( SERVICE_HANDLER_ID, serviceHandler );
- Fixture.fakeRequestParam( IServiceHandler.REQUEST_PARAM, SERVICE_HANDLER_ID );
- IServiceHandler handler = serviceManager.getHandler();
+ Fixture.fakeRequestParam( ServiceHandler.REQUEST_PARAM, SERVICE_HANDLER_ID );
+ ServiceHandler handler = serviceManager.getHandler();
assertSame( serviceHandler, handler );
}
public void testGetHandler_unknownId() throws Exception {
- Fixture.fakeRequestParam( IServiceHandler.REQUEST_PARAM, SERVICE_HANDLER_ID );
+ Fixture.fakeRequestParam( ServiceHandler.REQUEST_PARAM, SERVICE_HANDLER_ID );
try {
serviceManager.getHandler();

Back to the top