Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.equinox.http.jetty/src')
-rw-r--r--bundles/org.eclipse.equinox.http.jetty/src/org/eclipse/equinox/http/jetty/JettyConstants.java6
-rw-r--r--bundles/org.eclipse.equinox.http.jetty/src/org/eclipse/equinox/http/jetty/internal/Activator.java13
-rw-r--r--bundles/org.eclipse.equinox.http.jetty/src/org/eclipse/equinox/http/jetty/internal/EquinoxStdErrLog.java17
-rw-r--r--bundles/org.eclipse.equinox.http.jetty/src/org/eclipse/equinox/http/jetty/internal/HttpServerManager.java16
4 files changed, 40 insertions, 12 deletions
diff --git a/bundles/org.eclipse.equinox.http.jetty/src/org/eclipse/equinox/http/jetty/JettyConstants.java b/bundles/org.eclipse.equinox.http.jetty/src/org/eclipse/equinox/http/jetty/JettyConstants.java
index e9483bfef..c6e62912b 100644
--- a/bundles/org.eclipse.equinox.http.jetty/src/org/eclipse/equinox/http/jetty/JettyConstants.java
+++ b/bundles/org.eclipse.equinox.http.jetty/src/org/eclipse/equinox/http/jetty/JettyConstants.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2016 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation 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
@@ -73,24 +73,28 @@ public interface JettyConstants {
* @deprecated
* @since 1.3
*/
+ @Deprecated
public static final String MULTIPART_FILESIZETHRESHOLD = "multipart.fileSizeThreshold"; //$NON-NLS-1$
/**
* @deprecated
* @since 1.3
*/
+ @Deprecated
public static final String MULTIPART_LOCATION = "multipart.location"; //$NON-NLS-1$
/**
* @deprecated
* @since 1.3
*/
+ @Deprecated
public static final String MULTIPART_MAXFILESIZE = "multipart.maxFileSize"; //$NON-NLS-1$
/**
* @deprecated
* @since 1.3
*/
+ @Deprecated
public static final String MULTIPART_MAXREQUESTSIZE = "multipart.maxRequestSize"; //$NON-NLS-1$
/**
diff --git a/bundles/org.eclipse.equinox.http.jetty/src/org/eclipse/equinox/http/jetty/internal/Activator.java b/bundles/org.eclipse.equinox.http.jetty/src/org/eclipse/equinox/http/jetty/internal/Activator.java
index f9e59b27e..fe3cf8c71 100644
--- a/bundles/org.eclipse.equinox.http.jetty/src/org/eclipse/equinox/http/jetty/internal/Activator.java
+++ b/bundles/org.eclipse.equinox.http.jetty/src/org/eclipse/equinox/http/jetty/internal/Activator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2016 Cognos Incorporated, IBM Corporation and others.
+ * Copyright (c) 2005, 2017 Cognos Incorporated, IBM Corporation 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
@@ -47,9 +47,9 @@ public class Activator implements BundleActivator {
private static HttpServerManager staticServerManager;
private HttpServerManager httpServerManager;
- @SuppressWarnings("rawtypes")
- private ServiceRegistration registration;
+ private ServiceRegistration<ManagedServiceFactory> registration;
+ @Override
public void start(BundleContext context) throws Exception {
File jettyWorkDir = new File(context.getDataFile(""), JETTY_WORK_DIR); //$NON-NLS-1$
jettyWorkDir.mkdir();
@@ -62,10 +62,10 @@ public class Activator implements BundleActivator {
httpServerManager.updated(DEFAULT_PID, defaultSettings);
}
- Dictionary<String, Object> dictionary = new Hashtable<String, Object>();
+ Dictionary<String, Object> dictionary = new Hashtable<>();
dictionary.put(Constants.SERVICE_PID, MANAGED_SERVICE_FACTORY_PID);
- registration = context.registerService(ManagedServiceFactory.class.getName(), httpServerManager, dictionary);
+ registration = context.registerService(ManagedServiceFactory.class, httpServerManager, dictionary);
setStaticServerManager(httpServerManager);
}
@@ -85,6 +85,7 @@ public class Activator implements BundleActivator {
return false;
}
+ @Override
public void stop(BundleContext context) throws Exception {
setStaticServerManager(null);
registration.unregister();
@@ -95,7 +96,7 @@ public class Activator implements BundleActivator {
}
private Dictionary<String, Object> createDefaultSettings(BundleContext context) {
- Dictionary<String, Object> defaultSettings = new Hashtable<String, Object>();
+ Dictionary<String, Object> defaultSettings = new Hashtable<>();
// PID
defaultSettings.put(Constants.SERVICE_PID, DEFAULT_PID);
diff --git a/bundles/org.eclipse.equinox.http.jetty/src/org/eclipse/equinox/http/jetty/internal/EquinoxStdErrLog.java b/bundles/org.eclipse.equinox.http.jetty/src/org/eclipse/equinox/http/jetty/internal/EquinoxStdErrLog.java
index 75a79799e..c0a22a3e0 100644
--- a/bundles/org.eclipse.equinox.http.jetty/src/org/eclipse/equinox/http/jetty/internal/EquinoxStdErrLog.java
+++ b/bundles/org.eclipse.equinox.http.jetty/src/org/eclipse/equinox/http/jetty/internal/EquinoxStdErrLog.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 IBM Corporation and others
+ * Copyright (c) 2011, 2017 IBM Corporation 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
@@ -75,6 +75,7 @@ public class EquinoxStdErrLog implements Logger {
this.realLogger.setDebugEnabled(true);
}
+ @Override
public org.eclipse.jetty.util.log.Logger getLogger(String name) {
if ((name == null && this.localName == null) || (name != null && name.equals(this.localName)))
return this;
@@ -82,6 +83,7 @@ public class EquinoxStdErrLog implements Logger {
}
// debugSOO = slf4j.getMethod("debug", new Class[]{String.class,Object.class,Object.class});
+ @Override
public void debug(String msg, Object... arg0) {
if (threshold > DEBUG)
return;
@@ -90,6 +92,7 @@ public class EquinoxStdErrLog implements Logger {
}
// debugST = slf4j.getMethod("debug", new Class[]{String.class,Throwable.class});
+ @Override
public void debug(String msg, Throwable th) {
if (threshold > DEBUG)
return;
@@ -98,6 +101,7 @@ public class EquinoxStdErrLog implements Logger {
}
// infoSOO = slf4j.getMethod("info", new Class[]{String.class,Object.class,Object.class});
+ @Override
public void info(String msg, Object... arg0) {
if (threshold > INFO)
return;
@@ -106,6 +110,7 @@ public class EquinoxStdErrLog implements Logger {
}
// warnSOO = slf4j.getMethod("warn", new Class[]{String.class,Object.class,Object.class});
+ @Override
public void warn(String msg, Object... arg0) {
if (threshold > WARN)
return;
@@ -114,6 +119,7 @@ public class EquinoxStdErrLog implements Logger {
}
// warnST = slf4j.getMethod("warn", new Class[]{String.class,Throwable.class});
+ @Override
public void warn(String msg, Throwable th) {
if (threshold > WARN)
return;
@@ -133,47 +139,56 @@ public class EquinoxStdErrLog implements Logger {
realLogger.warn("ERROR: " + msg, th); //$NON-NLS-1$
}
+ @Override
public String getName() {
return realLogger.getName();
}
+ @Override
public void warn(Throwable thrown) {
if (threshold > WARN)
return;
realLogger.warn(thrown);
}
+ @Override
public void info(Throwable thrown) {
if (threshold > INFO)
return;
realLogger.info(thrown);
}
+ @Override
public void info(String msg, Throwable thrown) {
if (threshold > INFO)
return;
realLogger.info(msg, thrown);
}
+ @Override
public boolean isDebugEnabled() {
return threshold == DEBUG;
}
+ @Override
public void setDebugEnabled(boolean enabled) {
threshold = DEBUG;
}
+ @Override
public void debug(Throwable thrown) {
if (threshold > DEBUG)
return;
realLogger.debug(thrown);
}
+ @Override
public void ignore(Throwable ignored) {
// Just post this to debug
debug(ignored);
}
+ @Override
public void debug(String msg, long value) {
if (threshold > DEBUG)
return;
diff --git a/bundles/org.eclipse.equinox.http.jetty/src/org/eclipse/equinox/http/jetty/internal/HttpServerManager.java b/bundles/org.eclipse.equinox.http.jetty/src/org/eclipse/equinox/http/jetty/internal/HttpServerManager.java
index 8929003b4..c830b3045 100644
--- a/bundles/org.eclipse.equinox.http.jetty/src/org/eclipse/equinox/http/jetty/internal/HttpServerManager.java
+++ b/bundles/org.eclipse.equinox.http.jetty/src/org/eclipse/equinox/http/jetty/internal/HttpServerManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2016 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation 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
@@ -41,13 +41,14 @@ public class HttpServerManager implements ManagedServiceFactory {
private static final String DIR_PREFIX = "pid_"; //$NON-NLS-1$
private static final String INTERNAL_CONTEXT_CLASSLOADER = "org.eclipse.equinox.http.jetty.internal.ContextClassLoader"; //$NON-NLS-1$
- private Map<String, Server> servers = new HashMap<String, Server>();
+ private Map<String, Server> servers = new HashMap<>();
private File workDir;
public HttpServerManager(File workDir) {
this.workDir = workDir;
}
+ @Override
public synchronized void deleted(String pid) {
Server server = servers.remove(pid);
if (server != null) {
@@ -62,12 +63,13 @@ public class HttpServerManager implements ManagedServiceFactory {
}
}
+ @Override
public String getName() {
return this.getClass().getName();
}
- @SuppressWarnings("unchecked")
- public synchronized void updated(String pid, @SuppressWarnings("rawtypes") Dictionary dictionary) throws ConfigurationException {
+ @Override
+ public synchronized void updated(String pid, Dictionary<String, ?> dictionary) throws ConfigurationException {
deleted(pid);
Server server = new Server(new QueuedThreadPool(Details.getInt(dictionary, JettyConstants.HTTP_MAXTHREADS, 200), Details.getInt(dictionary, JettyConstants.HTTP_MINTHREADS, 8)));
@@ -243,6 +245,7 @@ public class HttpServerManager implements ManagedServiceFactory {
private ClassLoader contextLoader;
private Method method;
+ @Override
public void init(ServletConfig config) throws ServletException {
ServletContext context = config.getServletContext();
contextLoader = (ClassLoader) context.getAttribute(INTERNAL_CONTEXT_CLASSLOADER);
@@ -264,6 +267,7 @@ public class HttpServerManager implements ManagedServiceFactory {
}
}
+ @Override
public void destroy() {
Thread thread = Thread.currentThread();
ClassLoader current = thread.getContextClassLoader();
@@ -276,6 +280,7 @@ public class HttpServerManager implements ManagedServiceFactory {
contextLoader = null;
}
+ @Override
public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException {
Thread thread = Thread.currentThread();
ClassLoader current = thread.getContextClassLoader();
@@ -287,14 +292,17 @@ public class HttpServerManager implements ManagedServiceFactory {
}
}
+ @Override
public ServletConfig getServletConfig() {
return httpServiceServlet.getServletConfig();
}
+ @Override
public String getServletInfo() {
return httpServiceServlet.getServletInfo();
}
+ @Override
public void sessionIdChanged(HttpSessionEvent event, String oldSessionId) {
Thread thread = Thread.currentThread();
ClassLoader current = thread.getContextClassLoader();

Back to the top