[grizzly~git:11b3081c] [master] + update copyright headers

  • From: oleksiys@...
  • To: commits@...
  • Subject: [grizzly~git:11b3081c] [master] + update copyright headers
  • Date: Fri, 1 Feb 2013 12:41:32 +0000

Project:    grizzly
Repository: git
Revision:   11b3081c9af64e8e9b452c649f079f646f6a7294
Author:     oleksiys
Date:       2013-02-01 12:40:30 UTC
Link:       

Log Message:
------------
+ minor update
[master] + implement feature #1362
http://java.net/jira/browse/GRIZZLY-1362
"Make possible to prioritize HTTP requests and process them accordingly"
[master] + update copyright headers


Revisions:
----------
29232bc4234736d7f209f684dfb2d07de2d20576
67a6b6b314d1da550920c5e12879a55f842ebf11
11b3081c9af64e8e9b452c649f079f646f6a7294


Modified Paths:
---------------
modules/grizzly/src/main/java/org/glassfish/grizzly/AbstractTransport.java
modules/comet/src/main/java/org/glassfish/grizzly/comet/CometAddOn.java
modules/comet/src/main/java/org/glassfish/grizzly/comet/CometContext.java
modules/grizzly/src/main/java/org/glassfish/grizzly/Context.java
modules/grizzly/src/main/java/org/glassfish/grizzly/nio/NIOTransportBuilder.java
modules/grizzly/src/main/java/org/glassfish/grizzly/nio/SelectorRunner.java
modules/grizzly/src/main/java/org/glassfish/grizzly/threadpool/DefaultWorkerThread.java
modules/grizzly/src/main/java/org/glassfish/grizzly/threadpool/WorkerThread.java
modules/http-server/src/main/java/org/glassfish/grizzly/http/server/HttpHandler.java
modules/http-server/src/main/java/org/glassfish/grizzly/http/server/HttpHandlerChain.java
modules/http-server/src/main/java/org/glassfish/grizzly/http/server/HttpServer.java
modules/http-server/src/main/java/org/glassfish/grizzly/http/server/HttpServerFilter.java
modules/http-server/src/main/java/org/glassfish/grizzly/http/server/HttpServerProbe.java
modules/http-server/src/main/java/org/glassfish/grizzly/http/server/HttpServerProbeNotifier.java
modules/http-server/src/main/java/org/glassfish/grizzly/http/server/NetworkListener.java
modules/http-server/src/main/java/org/glassfish/grizzly/http/server/Response.java
modules/http-server/src/main/java/org/glassfish/grizzly/http/server/jmx/HttpServerFilter.java
modules/config/src/main/java/org/glassfish/grizzly/config/Utils.java
modules/grizzly/src/main/java/org/glassfish/grizzly/ssl/SSLConnectionContext.java
modules/grizzly/src/main/java/org/glassfish/grizzly/ssl/SSLUtils.java
modules/grizzly/src/main/java/org/glassfish/grizzly/threadpool/jmx/ThreadPool.java
modules/http-server/src/main/java/org/glassfish/grizzly/http/server/filecache/jmx/FileCache.java
modules/spdy/src/main/java/org/glassfish/grizzly/spdy/frames/SettingsFrame.java
pom.xml


Added Paths:
------------
modules/grizzly/src/main/java/org/glassfish/grizzly/threadpool/Threads.java


Diffs:
------
diff --git 
a/modules/grizzly/src/main/java/org/glassfish/grizzly/AbstractTransport.java 
b/modules/grizzly/src/main/java/org/glassfish/grizzly/AbstractTransport.java
index a798b1d..01fa829 100644
--- 
a/modules/grizzly/src/main/java/org/glassfish/grizzly/AbstractTransport.java
+++ 
b/modules/grizzly/src/main/java/org/glassfish/grizzly/AbstractTransport.java
@@ -231,9 +231,9 @@ public abstract class AbstractTransport implements 
Transport {
      * {@inheritDoc}
      */
     @Override
-    public void setIOStrategy(IOStrategy IOStrategy) {
-        this.strategy = IOStrategy;
-        final ThreadPoolConfig strategyConfig = 
IOStrategy.createDefaultWorkerPoolConfig(this);
+    public void setIOStrategy(IOStrategy ioStrategy) {
+        this.strategy = ioStrategy;
+        final ThreadPoolConfig strategyConfig = 
ioStrategy.createDefaultWorkerPoolConfig(this);
         if (strategyConfig == null) {
             workerPoolConfig = null;
         } else {
diff --git 
a/modules/comet/src/main/java/org/glassfish/grizzly/comet/CometAddOn.java 
b/modules/comet/src/main/java/org/glassfish/grizzly/comet/CometAddOn.java
index eb8be78..da5b255 100644
--- a/modules/comet/src/main/java/org/glassfish/grizzly/comet/CometAddOn.java
+++ b/modules/comet/src/main/java/org/glassfish/grizzly/comet/CometAddOn.java
@@ -1,7 +1,7 @@
 /*df
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011-2013 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
@@ -40,11 +40,15 @@
 
 package org.glassfish.grizzly.comet;
 
+import org.glassfish.grizzly.Connection;
 import org.glassfish.grizzly.filterchain.FilterChainBuilder;
 import org.glassfish.grizzly.http.server.AddOn;
+import org.glassfish.grizzly.http.server.HttpHandler;
 import org.glassfish.grizzly.http.server.HttpServer;
 import org.glassfish.grizzly.http.server.HttpServerFilter;
+import org.glassfish.grizzly.http.server.HttpServerProbe;
 import org.glassfish.grizzly.http.server.NetworkListener;
+import org.glassfish.grizzly.http.server.Request;
 
 /**
  * Comet {@link AddOn} for the {@link HttpServer}.
@@ -57,10 +61,19 @@ public class CometAddOn implements AddOn {
     public void setup(final NetworkListener networkListener,
             final FilterChainBuilder builder) {
         
+        
         final int httpServerFilterIdx = 
builder.indexOfType(HttpServerFilter.class);
-        if (httpServerFilterIdx >= 0) {
-            builder.add(httpServerFilterIdx, new CometFilter());
-        }
-    }
+        final HttpServerFilter httpServerFilter =
+                (HttpServerFilter) builder.get(httpServerFilterIdx);
+        httpServerFilter.getMonitoringConfig().addProbes(new 
HttpServerProbe.Adapter() {
+            @Override
+            public void onBeforeServiceEvent(final HttpServerFilter filter,
+                    final Connection connection, final Request request,
+                    final HttpHandler httpHandler) {
+                CometContext.REQUEST_LOCAL.set(request);
+            }
+        });
 
+        CometEngine.getEngine().setCometSupported(true);
+    }    
 }
diff --git 
a/modules/comet/src/main/java/org/glassfish/grizzly/comet/CometContext.java 
b/modules/comet/src/main/java/org/glassfish/grizzly/comet/CometContext.java
index aa4b2db..1e7fbf9 100644
--- 
a/modules/comet/src/main/java/org/glassfish/grizzly/comet/CometContext.java
+++ 
b/modules/comet/src/main/java/org/glassfish/grizzly/comet/CometContext.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 2007-2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007-2013 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
@@ -53,9 +53,7 @@ import org.glassfish.grizzly.CompletionHandler;
 import org.glassfish.grizzly.Connection;
 import org.glassfish.grizzly.CloseType;
 import org.glassfish.grizzly.Closeable;
-import org.glassfish.grizzly.Grizzly;
 import org.glassfish.grizzly.ReadHandler;
-import org.glassfish.grizzly.attributes.Attribute;
 import org.glassfish.grizzly.http.server.Request;
 import org.glassfish.grizzly.http.server.Response;
 import org.glassfish.grizzly.http.server.TimeoutHandler;
@@ -108,8 +106,9 @@ public class CometContext<E> {
         + " invoking that method is the same as the Servlet.service() 
thread.";
     protected final static Logger logger = 
Logger.getLogger(CometContext.class.getName());
     private final Map<Object,Object> attributes;
+      
+    protected final static ThreadLocal<Request> REQUEST_LOCAL = new 
ThreadLocal<Request>();
     
-    protected final static ThreadLocal<Connection> connection = new 
ThreadLocal<Connection>();
     /**
      * The context path associated with this instance.
      */
@@ -231,10 +230,10 @@ public class CometContext<E> {
         if (!CometEngine.getEngine().isCometEnabled()) {
             throw new IllegalStateException(COMET_NOT_ENABLED);
         }
-        Attribute<Request> httpRequestInProcessAttr = 
Grizzly.DEFAULT_ATTRIBUTE_BUILDER
-            .createAttribute("HttpServerFilter.Request");
-        final Connection c = connection.get();
-        final Response response = 
httpRequestInProcessAttr.get(c).getResponse();
+        final Request request = REQUEST_LOCAL.get();
+        final Response response = request.getResponse();
+        final Connection c = request.getContext().getConnection();
+        
         handler.setResponse(response);
         handler.setCometContext(this);
         try {
diff --git 
a/modules/comet/src/main/java/org/glassfish/grizzly/comet/CometFilter.java 
b/modules/comet/src/main/java/org/glassfish/grizzly/comet/CometFilter.java
deleted file mode 100644
index 079fa97..0000000
--- a/modules/comet/src/main/java/org/glassfish/grizzly/comet/CometFilter.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright (c) 2011-2012 Oracle and/or its affiliates. All rights reserved.
- *
- * The contents of this file are subject to the terms of either the GNU
- * General Public License Version 2 only ("GPL") or the Common Development
- * and Distribution License("CDDL") (collectively, the "License").  You
- * may not use this file except in compliance with the License.  You can
- * obtain a copy of the License at
- * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
- * or packager/legal/LICENSE.txt.  See the License for the specific
- * language governing permissions and limitations under the License.
- *
- * When distributing the software, include this License Header Notice in each
- * file and include the License file at packager/legal/LICENSE.txt.
- *
- * GPL Classpath Exception:
- * Oracle designates this particular file as subject to the "Classpath"
- * exception as provided by Oracle in the GPL Version 2 section of the 
License
- * file that accompanied this code.
- *
- * Modifications:
- * If applicable, add the following below the License Header, with the fields
- * enclosed by brackets [] replaced by your own identifying information:
- * "Portions Copyright [year] [name of copyright owner]"
- *
- * Contributor(s):
- * If you wish your version of this file to be governed by only the CDDL or
- * only the GPL Version 2, indicate your decision by adding "[Contributor]
- * elects to include this software in this distribution under the [CDDL or 
GPL
- * Version 2] license."  If you don't indicate a single choice of license, a
- * recipient has the option to distribute your version of this file under
- * either the CDDL, the GPL Version 2 or to extend the choice of license to
- * its licensees as provided above.  However, if you add GPL Version 2 code
- * and therefore, elected the GPL Version 2 license, then the option applies
- * only if the new code is made subject to such option by the copyright
- * holder.
- */
-
-package org.glassfish.grizzly.comet;
-
-import java.io.IOException;
-
-import org.glassfish.grizzly.filterchain.BaseFilter;
-import org.glassfish.grizzly.filterchain.FilterChain;
-import org.glassfish.grizzly.filterchain.FilterChainContext;
-import org.glassfish.grizzly.filterchain.NextAction;
-
-public class CometFilter extends BaseFilter {
-    @Override
-    public void onFilterChainConstructed(final FilterChain filterChain) {
-        CometEngine.getEngine().setCometSupported(true);
-    }
-
-    @Override
-    public NextAction handleRead(final FilterChainContext ctx) throws 
IOException {
-        updateThreadLocals(ctx);
-        return ctx.getInvokeAction();
-    }
-
-    private void updateThreadLocals(final FilterChainContext ctx) {
-        CometContext.connection.set(ctx.getConnection());
-    }
-}
diff --git a/modules/grizzly/src/main/java/org/glassfish/grizzly/Context.java 
b/modules/grizzly/src/main/java/org/glassfish/grizzly/Context.java
index 8b8bc84..f19ab70 100644
--- a/modules/grizzly/src/main/java/org/glassfish/grizzly/Context.java
+++ b/modules/grizzly/src/main/java/org/glassfish/grizzly/Context.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 2008-2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008-2013 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
@@ -174,6 +174,7 @@ public class Context implements AttributeStorage, 
Cacheable {
      * Set the processing {@link Event}.
      *
      * @param event the processing {@link Event}.
+     * @param handler the {@link EventProcessingHandler} to handle context's 
life-cycle events.
      */
     public void setEvent(final Event event,
             final EventProcessingHandler handler) {
@@ -221,10 +222,16 @@ public class Context implements AttributeStorage, 
Cacheable {
         this.processor = processor;
     }
 
+    /**
+     * Returns the {@link EventProcessingHandler} to handle context's 
life-cycle events.
+     */
     protected EventProcessingHandler getProcessingHandler() {
         return eventProcessingHandler;
     }
 
+    /**
+     * Sets the {@link EventProcessingHandler} to handle context's 
life-cycle events.
+     */
     protected void setProcessingHandler(final EventProcessingHandler 
processingHandler) {
         this.eventProcessingHandler = processingHandler;
     }
diff --git 
a/modules/grizzly/src/main/java/org/glassfish/grizzly/nio/NIOTransportBuilder.java
 
b/modules/grizzly/src/main/java/org/glassfish/grizzly/nio/NIOTransportBuilder.java
index bb6f289..694c9af 100644
--- 
a/modules/grizzly/src/main/java/org/glassfish/grizzly/nio/NIOTransportBuilder.java
+++ 
b/modules/grizzly/src/main/java/org/glassfish/grizzly/nio/NIOTransportBuilder.java
@@ -42,8 +42,8 @@ package org.glassfish.grizzly.nio;
 
 import java.nio.channels.spi.SelectorProvider;
 import org.glassfish.grizzly.IOStrategy;
-import org.glassfish.grizzly.Processor;
 import org.glassfish.grizzly.Transport;
+import org.glassfish.grizzly.asyncqueue.AsyncQueueWriter;
 import org.glassfish.grizzly.attributes.AttributeBuilder;
 import org.glassfish.grizzly.filterchain.FilterChain;
 import org.glassfish.grizzly.filterchain.FilterChainBuilder;
@@ -128,6 +128,16 @@ public abstract class NIOTransportBuilder<T extends 
NIOTransportBuilder> {
     }
 
     /**
+     * Sets the {@link ThreadPoolConfig} that will be used to construct the
+     *  {@link java.util.concurrent.ExecutorService} for 
<code>IOStrategies</code>
+     *  that require worker threads
+     */
+    public T setWorkerThreadPoolConfig(final ThreadPoolConfig 
threadPoolConfig) {
+        transport.setWorkerThreadPoolConfig(threadPoolConfig);
+        return getThis();
+    }
+    
+    /**
      * @return the {@link ThreadPoolConfig} that will be used to construct 
the
      *  {@link java.util.concurrent.ExecutorService} which will run the 
{@link NIOTransport}'s
      *  {@link org.glassfish.grizzly.nio.SelectorRunner}s.
@@ -137,6 +147,16 @@ public abstract class NIOTransportBuilder<T extends 
NIOTransportBuilder> {
     }
 
     /**
+     * Sets the {@link ThreadPoolConfig} that will be used to construct the
+     *  {@link java.util.concurrent.ExecutorService} which will run the 
{@link NIOTransport}'s
+     *  {@link org.glassfish.grizzly.nio.SelectorRunner}s.
+     */
+    public T setSelectorThreadPoolConfig(final ThreadPoolConfig 
threadPoolConfig) {
+        transport.setKernelThreadPoolConfig(threadPoolConfig);
+        return getThis();
+    }
+
+    /**
      * @return the {@link IOStrategy} that will be used by the created 
{@link NIOTransport}.
      */
     public IOStrategy getIOStrategy() {
diff --git 
a/modules/grizzly/src/main/java/org/glassfish/grizzly/nio/SelectorRunner.java 
b/modules/grizzly/src/main/java/org/glassfish/grizzly/nio/SelectorRunner.java
index ec701e0..3691226 100644
--- 
a/modules/grizzly/src/main/java/org/glassfish/grizzly/nio/SelectorRunner.java
+++ 
b/modules/grizzly/src/main/java/org/glassfish/grizzly/nio/SelectorRunner.java
@@ -65,7 +65,7 @@ import org.glassfish.grizzly.Grizzly;
 import org.glassfish.grizzly.Transport.State;
 import org.glassfish.grizzly.impl.FutureImpl;
 import org.glassfish.grizzly.localization.LogMessages;
-import org.glassfish.grizzly.threadpool.WorkerThread;
+import org.glassfish.grizzly.threadpool.Threads;
 import org.glassfish.grizzly.utils.Futures;
 import org.glassfish.grizzly.utils.StateHolder;
 
@@ -179,10 +179,7 @@ public final class SelectorRunner implements Runnable {
     }
     
     public void postpone() {
-        final Thread currentThread = Thread.currentThread();
-        if (currentThread instanceof WorkerThread) {
-            ((WorkerThread) currentThread).setSelectorThread(false);
-        }
+        Threads.setService(false);
         
         runnerThreadActivityCounter.compareAndSet(1, 0);
         selectorRunnerThread = null;
@@ -261,10 +258,7 @@ public final class SelectorRunner implements Runnable {
         }
 
         setRunnerThread(currentThread);
-        final boolean isWorkerThread = currentThread instanceof WorkerThread;
-        if (isWorkerThread) {
-            ((WorkerThread) currentThread).setSelectorThread(true);
-        }
+        Threads.setService(true);
         
         final StateHolder<State> transportStateHolder = transport.getState();
 
@@ -298,9 +292,7 @@ public final class SelectorRunner implements Runnable {
                 }
             }
 
-            if (isWorkerThread) {
-                ((WorkerThread) currentThread).setSelectorThread(false);
-            }
+            Threads.setService(false);
         }
     }
 
diff --git 
a/modules/grizzly/src/main/java/org/glassfish/grizzly/threadpool/DefaultWorkerThread.java
 
b/modules/grizzly/src/main/java/org/glassfish/grizzly/threadpool/DefaultWorkerThread.java
index bb188cc..9b3e3c4 100644
--- 
a/modules/grizzly/src/main/java/org/glassfish/grizzly/threadpool/DefaultWorkerThread.java
+++ 
b/modules/grizzly/src/main/java/org/glassfish/grizzly/threadpool/DefaultWorkerThread.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 2008-2011 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008-2013 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
@@ -64,8 +64,6 @@ public class DefaultWorkerThread extends Thread implements 
WorkerThread {
     private long transactionTimeoutMillis =
             WorkerThread.UNLIMITED_TRANSACTION_TIMEOUT;
 
-    private boolean isSelectorThread;
-
     public DefaultWorkerThread(AttributeBuilder attrBuilder,
                                String name,
                                ThreadLocalPool pool,
@@ -131,14 +129,4 @@ public class DefaultWorkerThread extends Thread 
implements WorkerThread {
         this.transactionTimeoutMillis =
                 TimeUnit.MILLISECONDS.convert(timeout, timeunit);
     }
-    
-    @Override
-    public boolean isSelectorThread() {
-        return isSelectorThread;
-    }
-
-    @Override
-    public void setSelectorThread(boolean isSelectorThread) {
-        this.isSelectorThread = isSelectorThread;
-    }
 }
diff --git 
a/modules/grizzly/src/main/java/org/glassfish/grizzly/threadpool/Threads.java 
b/modules/grizzly/src/main/java/org/glassfish/grizzly/threadpool/Threads.java
new file mode 100644
index 0000000..c1640e5
--- /dev/null
+++ 
b/modules/grizzly/src/main/java/org/glassfish/grizzly/threadpool/Threads.java
@@ -0,0 +1,63 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved.
+ *
+ * The contents of this file are subject to the terms of either the GNU
+ * General Public License Version 2 only ("GPL") or the Common Development
+ * and Distribution License("CDDL") (collectively, the "License").  You
+ * may not use this file except in compliance with the License.  You can
+ * obtain a copy of the License at
+ * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
+ * or packager/legal/LICENSE.txt.  See the License for the specific
+ * language governing permissions and limitations under the License.
+ *
+ * When distributing the software, include this License Header Notice in each
+ * file and include the License file at packager/legal/LICENSE.txt.
+ *
+ * GPL Classpath Exception:
+ * Oracle designates this particular file as subject to the "Classpath"
+ * exception as provided by Oracle in the GPL Version 2 section of the 
License
+ * file that accompanied this code.
+ *
+ * Modifications:
+ * If applicable, add the following below the License Header, with the fields
+ * enclosed by brackets [] replaced by your own identifying information:
+ * "Portions Copyright [year] [name of copyright owner]"
+ *
+ * Contributor(s):
+ * If you wish your version of this file to be governed by only the CDDL or
+ * only the GPL Version 2, indicate your decision by adding "[Contributor]
+ * elects to include this software in this distribution under the [CDDL or 
GPL
+ * Version 2] license."  If you don't indicate a single choice of license, a
+ * recipient has the option to distribute your version of this file under
+ * either the CDDL, the GPL Version 2 or to extend the choice of license to
+ * its licensees as provided above.  However, if you add GPL Version 2 code
+ * and therefore, elected the GPL Version 2 license, then the option applies
+ * only if the new code is made subject to such option by the copyright
+ * holder.
+ */
+package org.glassfish.grizzly.threadpool;
+
+/**
+ * Set of {@link Thread} utilities.
+ * 
+ * @author Alexey Stashok
+ */
+public class Threads {
+    private static final ThreadLocal<Boolean> SERVICE_THREAD =
+            new ThreadLocal<Boolean>();
+    
+    public static boolean isService() {
+        return Boolean.TRUE.equals(SERVICE_THREAD.get());
+    }
+    
+    public static void setService(final boolean isService) {
+        if (isService) {
+            SERVICE_THREAD.set(isService);
+        } else {
+            SERVICE_THREAD.remove();
+        }
+    }
+    
+}
diff --git 
a/modules/grizzly/src/main/java/org/glassfish/grizzly/threadpool/WorkerThread.java
 
b/modules/grizzly/src/main/java/org/glassfish/grizzly/threadpool/WorkerThread.java
index 87b221c..310b3c3 100644
--- 
a/modules/grizzly/src/main/java/org/glassfish/grizzly/threadpool/WorkerThread.java
+++ 
b/modules/grizzly/src/main/java/org/glassfish/grizzly/threadpool/WorkerThread.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 2008-2010 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008-2013 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
@@ -60,9 +60,4 @@ public interface WorkerThread extends Runnable, 
AttributeStorage {
 
     public long getTransactionTimeout(TimeUnit timeunit);
     public void setTransactionTimeout(long timeout, TimeUnit timeunit);
-
-    public boolean isSelectorThread();
-
-    public void setSelectorThread(boolean isSelectorThread);
-
 }
diff --git 
a/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/HttpHandler.java
 
b/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/HttpHandler.java
index 2030374..e116792 100644
--- 
a/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/HttpHandler.java
+++ 
b/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/HttpHandler.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 2008-2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008-2013 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
@@ -40,22 +40,25 @@
 
 package org.glassfish.grizzly.http.server;
 
-import org.glassfish.grizzly.Grizzly;
-import org.glassfish.grizzly.http.HttpRequestPacket;
-import org.glassfish.grizzly.http.io.OutputBuffer;
-import org.glassfish.grizzly.http.server.util.HtmlHelper;
-import org.glassfish.grizzly.http.util.Header;
-import org.glassfish.grizzly.http.util.HttpStatus;
-
 import java.io.CharConversionException;
 import java.io.IOException;
 import java.nio.ByteBuffer;
 import java.nio.charset.Charset;
+import java.util.concurrent.ExecutorService;
 import java.util.logging.Level;
 import java.util.logging.Logger;
+import org.glassfish.grizzly.Connection;
+import org.glassfish.grizzly.Grizzly;
+import org.glassfish.grizzly.filterchain.FilterChainContext;
+import org.glassfish.grizzly.http.HttpRequestPacket;
+import org.glassfish.grizzly.http.io.OutputBuffer;
 import org.glassfish.grizzly.http.server.util.DispatcherHelper;
+import org.glassfish.grizzly.http.server.util.HtmlHelper;
 import org.glassfish.grizzly.http.server.util.MappingData;
+import org.glassfish.grizzly.http.util.Header;
+import org.glassfish.grizzly.http.util.HttpStatus;
 import org.glassfish.grizzly.http.util.RequestURIRef;
+import org.glassfish.grizzly.threadpool.Threads;
 import org.glassfish.grizzly.utils.Charsets;
 
 /**
@@ -137,11 +140,11 @@ public abstract class HttpHandler {
      * @throws Exception if an error occurs serving a static resource or
      *  from the invocation of {@link #service(Request, Response)}
      */
-    public final void doHandle(Request request, Response response) throws 
Exception {
+    boolean doHandle(final Request request, final Response response) throws 
Exception {
 
         if (request.requiresAcknowledgement()) {
             if (!sendAcknowledgment(request, response)) {
-                return;
+                return true;
             }
         }
 
@@ -158,7 +161,7 @@ public abstract class HttpHandler {
                 } catch (CharConversionException e) {
                     response.setStatus(HttpStatus.INTERNAL_SERVER_ERROR_500);
                     response.setDetailMessage("Invalid URI: " + 
e.getMessage());
-                    return;
+                    return true;
                 }
             }
 
@@ -166,12 +169,65 @@ public abstract class HttpHandler {
                     allowCustomStatusMessage);
             
             request.parseSessionId();
-            service(request, response);
+            
+            return runService(request, response);
         } catch (Exception t) {
             LOGGER.log(Level.FINE, "service exception", t);
             response.setStatus(HttpStatus.INTERNAL_SERVER_ERROR_500);
             response.setDetailMessage("Internal Error");
         }
+        
+        return true;
+    }
+
+    private boolean runService(final Request request, final Response 
response)
+            throws Exception {
+        
+        final ExecutorService threadPool = getThreadPool(request);
+        final HttpServerFilter httpServerFilter = request.getServerFilter();
+        final Connection connection = request.getContext().getConnection();
+        
+        if (threadPool == null) {
+            final SuspendStatus suspendStatus = response.initSuspendStatus();
+            
+            HttpServerProbeNotifier.notifyBeforeService(
+                    httpServerFilter, connection, request, HttpHandler.this);
+            
+            service(request, response);
+            return !suspendStatus.getAndInvalidate();
+        } else {
+            final FilterChainContext ctx = request.getContext();
+            ctx.suspend();
+            
+            threadPool.execute(new Runnable() {
+
+                @Override
+                public void run() {
+                    final SuspendStatus suspendStatus = 
response.initSuspendStatus();
+
+                    boolean wasSuspended;
+                    try {
+                        HttpServerProbeNotifier.notifyBeforeService(
+                                httpServerFilter, connection, request,
+                                HttpHandler.this);
+                        
+                        service(request, response);
+                        wasSuspended = suspendStatus.getAndInvalidate();
+                    } catch (Exception e) {
+                        LOGGER.log(Level.FINE, "service exception", e);
+                        
response.setStatus(HttpStatus.INTERNAL_SERVER_ERROR_500);
+                        response.setDetailMessage("Internal Error");
+                        wasSuspended = false;
+                    }
+                    
+                    if (!wasSuspended) {
+                        ctx.resume();
+                    }
+                }
+            });
+            
+            return false;
+        }
     }
     
     
@@ -366,4 +422,27 @@ public abstract class HttpHandler {
 
     protected void setDispatcherHelper(final DispatcherHelper 
dispatcherHelper) {
     }
+    
+    /**
+     * Returns the <tt>HttpHandler</tt> preferred {@link ExecutorService} to 
process
+     * passed {@link Request}. The <tt>null</tt> return value means process 
in 
+     * current thread.
+     * 
+     * The default implementation returns <tt>null</tt> if current thread is 
not
+     * {@link Transport} service thread ({@link Threads#isService()}). 
Otherwise
+     * returns worker thread pool of the {@link Transport} this {@link 
Request}
+     * belongs to ({@link 
org.glassfish.grizzly.Transport#getWorkerThreadPool()}).
+     * 
+     * @param request the {@link Request} to be processed.
+     * @return the <tt>HttpHandler</tt> preferred {@link ExecutorService} to 
process
+     * passed {@link Request}. The <tt>null</tt> return value means process 
in 
+     * current thread.
+     */
+    protected ExecutorService getThreadPool(final Request request) {
+        if (!Threads.isService()) {
+            return null; // Execute in the current thread
+        }
+        
+        return 
request.getContext().getConnection().getTransport().getWorkerThreadPool();
+    }
 }
diff --git 
a/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/HttpHandlerChain.java
 
b/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/HttpHandlerChain.java
index dc402e7..f4f7b8a 100644
--- 
a/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/HttpHandlerChain.java
+++ 
b/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/HttpHandlerChain.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 2008-2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008-2013 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
@@ -39,25 +39,23 @@
  */
 package org.glassfish.grizzly.http.server;
 
-import java.io.IOException;
 import java.util.Map;
+import java.util.Map.Entry;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 import org.glassfish.grizzly.Grizzly;
 import org.glassfish.grizzly.http.server.jmx.JmxEventListener;
 import org.glassfish.grizzly.http.server.jmx.Monitorable;
+import org.glassfish.grizzly.http.server.util.DispatcherHelper;
+import org.glassfish.grizzly.http.server.util.Mapper;
+import org.glassfish.grizzly.http.server.util.MappingData;
 import org.glassfish.grizzly.http.util.DataChunk;
 import org.glassfish.grizzly.http.util.HttpStatus;
 import org.glassfish.grizzly.http.util.RequestURIRef;
-import org.glassfish.grizzly.http.server.util.Mapper;
-import org.glassfish.grizzly.http.server.util.MappingData;
 import org.glassfish.grizzly.monitoring.jmx.JmxObject;
 
-import java.util.Map.Entry;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import org.glassfish.grizzly.http.server.util.DispatcherHelper;
-
 /**
  * The HttpHandlerChain class allows the invocation of multiple {@link 
HttpHandler}s
  * every time a new HTTP request is ready to be handled. Requests are mapped
@@ -170,35 +168,24 @@ public class HttpHandlerChain extends HttpHandler 
implements JmxEventListener {
     }
 
     /**
-     * Skip 100-Continue processing in HttpHandlerChain. It's going to be
-     * delegated to one of the children HttpHandler.
+     * {@inheritDoc}
      */
     @Override
-    protected boolean sendAcknowledgment(Request request, Response response)
-            throws IOException {
-        return true;
-    }
-
-    // ---------------------------------------------------------- Public 
Methods
-    
-    /**
-     * Map the {@link Request} to the proper {@link HttpHandler}
-     * @param request The {@link Request}
-     * @param response The {@link Response}
-     */
-    @Override
-    public void service(final Request request, final Response response) 
throws Exception {
+    boolean doHandle(final Request request, final Response response)
+            throws Exception {
         try {
             final HttpHandler rootHttpHandlerLocal = rootHttpHandler;
             
             if (rootHttpHandlerLocal != null) {
                 // use default path values (don't call updatePaths)
-                rootHttpHandlerLocal.doHandle(request, response);
-                return;
+                return rootHttpHandlerLocal.doHandle(request, response);
             }
             
             final RequestURIRef uriRef = 
request.getRequest().getRequestURIRef();
-            final DataChunk decodedURI = uriRef.getDecodedRequestURIBC();
+            uriRef.setDefaultURIEncoding(getRequestURIEncoding());
+            final DataChunk decodedURI = uriRef.getDecodedRequestURIBC(
+                    isAllowEncodedSlash(), isAllowEncodedBackSlash());
+            
             final MappingData mappingData = request.obtainMappingData();
 
             mapper.mapUriWithSemicolon(request.getRequest().serverName(),
@@ -217,7 +204,7 @@ public class HttpHandlerChain extends HttpHandler 
implements JmxEventListener {
 
                 updatePaths(request, mappingData);
 
-                httpHandler.doHandle(request, response);
+                return httpHandler.doHandle(request, response);
             } else {
                 response.setStatus(HttpStatus.NOT_FOUND_404);
                 customizedErrorPage(request, response);
@@ -234,6 +221,20 @@ public class HttpHandlerChain extends HttpHandler 
implements JmxEventListener {
                 }
             }
         }
+        
+        return true;
+    }
+    
+    // ---------------------------------------------------------- Public 
Methods
+    
+    /**
+     * Map the {@link Request} to the proper {@link HttpHandler}
+     * @param request The {@link Request}
+     * @param response The {@link Response}
+     */
+    @Override
+    public void service(final Request request, final Response response) 
throws Exception {
+        throw new IllegalStateException("Method doesn't have to be called");
     }
 
     /**
diff --git 
a/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/HttpServer.java
 
b/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/HttpServer.java
index 0a8fc7e..29b7dc5 100644
--- 
a/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/HttpServer.java
+++ 
b/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/HttpServer.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 2008-2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008-2013 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
@@ -606,7 +606,7 @@ public class HttpServer {
 
             final ServerFilterConfiguration config = new 
ServerFilterConfiguration(serverConfig);
 
-            final HttpServerFilter webServerFilter = new HttpServerFilter(
+            final HttpServerFilter httpServerFilter = new HttpServerFilter(
                     config,
                     delayedExecutor);
             
@@ -620,12 +620,12 @@ public class HttpServer {
             
             config.setTraceEnabled(config.isTraceEnabled() || 
listener.isTraceEnabled());
             
-            webServerFilter.setHttpHandler(httpHandlerChain);
+            httpServerFilter.setHttpHandler(httpHandlerChain);
             
-            webServerFilter.getMonitoringConfig().addProbes(
+            httpServerFilter.getMonitoringConfig().addProbes(
                     
serverConfig.getMonitoringConfig().getWebServerConfig().getProbes());
 
-            builder.add(webServerFilter);
+            builder.add(httpServerFilter);
 
             final AddOn[] addons = listener.getAddOnSet().getArray();
             if (addons != null) {
diff --git 
a/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/HttpServerFilter.java
 
b/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/HttpServerFilter.java
index 5dae7b6..e4a906e 100644
--- 
a/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/HttpServerFilter.java
+++ 
b/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/HttpServerFilter.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 2010-2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010-2013 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
@@ -156,13 +156,13 @@ public class HttpServerFilter extends BaseFilter
                 final Response handlerResponse = 
handlerRequest.getResponse();
 
                 handlerRequest.initialize(request, ctx, this);
-                final SuspendStatus suspendStatus = 
handlerResponse.initialize(
-                        handlerRequest, response, ctx, 
suspendedResponseQueue, this);
+                handlerResponse.initialize(handlerRequest, response, ctx,
+                        suspendedResponseQueue, this);
 
                 HttpServerProbeNotifier.notifyRequestReceive(this, 
connection,
                         handlerRequest);
 
-                boolean wasSuspended;
+                boolean wasSuspended = false;
                 
                 try {
                     ctx.setMessage(handlerResponse);
@@ -173,7 +173,8 @@ public class HttpServerFilter extends BaseFilter
                     } else {
                         final HttpHandler httpHandlerLocal = httpHandler;
                         if (httpHandlerLocal != null) {
-                            httpHandlerLocal.doHandle(handlerRequest, 
handlerResponse);
+                            wasSuspended = !httpHandlerLocal.doHandle(
+                                    handlerRequest, handlerResponse);
                         }
                     }
                 } catch (Exception t) {
@@ -194,9 +195,6 @@ public class HttpServerFilter extends BaseFilter
                 } catch (Throwable t) {
                     LOGGER.log(Level.WARNING, "Unexpected error", t);
                     throw new IllegalStateException(t);
-                } finally {
-                    // don't forget to invalidate the suspendStatus
-                    wasSuspended = suspendStatus.getAndInvalidate();
                 }
                 
                 if (!wasSuspended) {
diff --git 
a/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/HttpServerProbe.java
 
b/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/HttpServerProbe.java
index d97e431..23fbb20 100644
--- 
a/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/HttpServerProbe.java
+++ 
b/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/HttpServerProbe.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 2010-2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010-2013 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
@@ -113,7 +113,18 @@ public interface HttpServerProbe {
     public void onRequestFailedEvent(HttpServerFilter filter,
             Connection connection, Request request, Throwable failure);
 
-
+    /**
+     * Method will be called, before invoking
+     * {@link HttpHandler#service(org.glassfish.grizzly.http.server.Request, 
org.glassfish.grizzly.http.server.Response)}.
+     *
+     * @param filter {@link HttpServerFilter}, the event belongs to.
+     * @param connection {@link Connection}, the event belongs to.
+     * @param request received {@link Request}.
+     * @param httpHandler {@link HttpHandler} to be invoked.
+     */
+    public void onBeforeServiceEvent(HttpServerFilter filter,
+            Connection connection, Request request, HttpHandler httpHandler);
+    
     // ---------------------------------------------------------- Nested 
Classes
 
 
@@ -164,5 +175,11 @@ public interface HttpServerProbe {
          */
         @Override
         public void onRequestFailedEvent(HttpServerFilter filter, Connection 
connection, Request request, Throwable failure) {}
+
+        /**
+         * {@inheritDoc}
+         */
+        @Override
+        public void onBeforeServiceEvent(HttpServerFilter filter, Connection 
connection, Request request, HttpHandler httpHandler) {}
     }
 }
diff --git 
a/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/HttpServerProbeNotifier.java
 
b/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/HttpServerProbeNotifier.java
index bb3f3d9..33436b5 100644
--- 
a/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/HttpServerProbeNotifier.java
+++ 
b/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/HttpServerProbeNotifier.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 2010-2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010-2013 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
@@ -157,4 +157,25 @@ final class HttpServerProbeNotifier {
             }
         }
     }
+    
+    /**
+     * Notify registered {@link HttpServerProbe}s before invoking
+     * {@link HttpHandler#service(org.glassfish.grizzly.http.server.Request, 
org.glassfish.grizzly.http.server.Response)}.
+     *
+     * @param filter {@link HttpServerFilter}, the event belongs to.
+     * @param connection {@link Connection}, the event belongs to.
+     * @param response {@link Response}.
+     * @param httpHandler {@link HttpHandler}.
+     */
+    static void notifyBeforeService(final HttpServerFilter filter,
+            final Connection connection, final Request request,
+            final HttpHandler httpHandler) {
+
+        final HttpServerProbe[] probes = 
filter.monitoringConfig.getProbesUnsafe();
+        if (probes != null) {
+            for (HttpServerProbe probe : probes) {
+                probe.onBeforeServiceEvent(filter, connection, request, 
httpHandler);
+            }
+        }
+    }    
 }
diff --git 
a/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/NetworkListener.java
 
b/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/NetworkListener.java
index 64a433c..600f0ef 100644
--- 
a/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/NetworkListener.java
+++ 
b/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/NetworkListener.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 2010-2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010-2013 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
@@ -59,6 +59,8 @@ import 
org.glassfish.grizzly.nio.transport.TCPNIOServerConnection;
 import org.glassfish.grizzly.nio.transport.TCPNIOTransport;
 import org.glassfish.grizzly.nio.transport.TCPNIOTransportBuilder;
 import org.glassfish.grizzly.ssl.SSLEngineConfigurator;
+import org.glassfish.grizzly.strategies.SameThreadIOStrategy;
+import org.glassfish.grizzly.threadpool.ThreadPoolConfig;
 import org.glassfish.grizzly.utils.ArraySet;
 
 public class NetworkListener {
@@ -120,8 +122,22 @@ public class NetworkListener {
     /**
      * The {@link TCPNIOTransport} used by this <code>NetworkListener</code>
      */
-    private TCPNIOTransport transport =
-        TCPNIOTransportBuilder.newInstance().build();
+    private TCPNIOTransport transport;
+    
+    {
+        final TCPNIOTransportBuilder builder = 
TCPNIOTransportBuilder.newInstance();
+        final int coresCount = Runtime.getRuntime().availableProcessors() * 
2;
+        
+        transport = builder
+                .setIOStrategy(SameThreadIOStrategy.getInstance())
+                .setWorkerThreadPoolConfig(ThreadPoolConfig.newConfig()
+                .setPoolName("Grizzly-worker")
+                .setCorePoolSize(coresCount)
+                .setMaxPoolSize(coresCount)
+                .setMemoryManager(builder.getMemoryManager()))
+                .build();
+    }
+    
     /**
      * Flag indicating whether or not this listener is secure.  Defaults to 
<code>false</code>
      */
@@ -860,7 +876,8 @@ public class NetworkListener {
      * Sets the time, in seconds, within which a request must complete its
      * processing.  A value less than or equal to zero will disable this
      * timeout. Note that this configuration option is only considered when 
the
-     * transport is configured to use the {@link 
org.glassfish.grizzly.strategies.WorkerThreadIOStrategy}.
+     * transport's {@link 
org.glassfish.grizzly.Transport#getWorkerThreadPool()}
+     * thread pool is used to run a {@link HttpHandler}.
      *
      * @param transactionTimeout timeout in seconds
      */
diff --git 
a/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/Response.java
 
b/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/Response.java
index e3fa381..91273a3 100755
--- 
a/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/Response.java
+++ 
b/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/Response.java
@@ -120,20 +120,6 @@ public class Response {
 
     private static final Logger LOGGER = Grizzly.logger(Response.class);
 
-//    private static final ThreadCache.CachedTypeIndex<Response> CACHE_IDX =
-//            ThreadCache.obtainIndex(Response.class, 16);
-    private static final ThreadLocal<Response> current = new 
ThreadLocal<Response>();
-
-//    public static Response create() {
-//        final Response response =
-//                ThreadCache.takeFromCache(CACHE_IDX);
-//        if (response != null) {
-//            return response;
-//        }
-//
-//        return new Response();
-//    }
-
     static DelayQueue<SuspendTimeout> createDelayQueue(
             final DelayedExecutor delayedExecutor) {
         return delayedExecutor.createDelayQueue(new DelayQueueWorker(),
@@ -269,7 +255,7 @@ public class Response {
     
     // --------------------------------------------------------- Public 
Methods
 
-    public SuspendStatus initialize(final Request request,
+    public void initialize(final Request request,
                            final HttpResponsePacket response,
                            final FilterChainContext ctx,
                            final DelayedExecutor.DelayQueue<SuspendTimeout> 
delayQueue,
@@ -282,6 +268,9 @@ public class Response {
         this.ctx = ctx;
         this.httpContext = HttpContext.get(ctx);
         this.delayQueue = delayQueue;
+    }
+
+    SuspendStatus initSuspendStatus() {
         suspendStatus = new SuspendStatus();
         return suspendStatus;
     }
@@ -1780,14 +1769,6 @@ public class Response {
         }
     }
 
-    public static Response getCurrent() {
-        return current.get();
-    }
-
-    public static void setCurrent(Response response) {
-        current.set(response);
-    }
-
     public boolean isSendFileEnabled() {
         return sendFileEnabled;
     }
diff --git 
a/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/jmx/HttpServerFilter.java
 
b/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/jmx/HttpServerFilter.java
index dc98e9a..b438669 100644
--- 
a/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/jmx/HttpServerFilter.java
+++ 
b/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/jmx/HttpServerFilter.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 2010-2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010-2013 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
@@ -159,7 +159,7 @@ public class HttpServerFilter extends JmxObject {
     // ---------------------------------------------------------- Nested 
Classes
 
 
-    private final class JmxWebServerProbe implements HttpServerProbe {
+    private final class JmxWebServerProbe extends HttpServerProbe.Adapter {
 
 
         // ----------------------------------------- Methods from 
HttpServerProbe
diff --git 
a/modules/config/src/main/java/org/glassfish/grizzly/config/Utils.java 
b/modules/config/src/main/java/org/glassfish/grizzly/config/Utils.java
index 9d75477..58779cc 100644
--- a/modules/config/src/main/java/org/glassfish/grizzly/config/Utils.java
+++ b/modules/config/src/main/java/org/glassfish/grizzly/config/Utils.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 2009-2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009-2013 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
diff --git 
a/modules/grizzly/src/main/java/org/glassfish/grizzly/ssl/SSLConnectionContext.java
 
b/modules/grizzly/src/main/java/org/glassfish/grizzly/ssl/SSLConnectionContext.java
index a398fad..446ccd7 100644
--- 
a/modules/grizzly/src/main/java/org/glassfish/grizzly/ssl/SSLConnectionContext.java
+++ 
b/modules/grizzly/src/main/java/org/glassfish/grizzly/ssl/SSLConnectionContext.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012-2013 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
diff --git 
a/modules/grizzly/src/main/java/org/glassfish/grizzly/ssl/SSLUtils.java 
b/modules/grizzly/src/main/java/org/glassfish/grizzly/ssl/SSLUtils.java
index 675628a..2373bc9 100644
--- a/modules/grizzly/src/main/java/org/glassfish/grizzly/ssl/SSLUtils.java
+++ b/modules/grizzly/src/main/java/org/glassfish/grizzly/ssl/SSLUtils.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 2008-2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008-2013 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
diff --git 
a/modules/grizzly/src/main/java/org/glassfish/grizzly/threadpool/jmx/ThreadPool.java
 
b/modules/grizzly/src/main/java/org/glassfish/grizzly/threadpool/jmx/ThreadPool.java
index 249fc7c..e72c6eb 100644
--- 
a/modules/grizzly/src/main/java/org/glassfish/grizzly/threadpool/jmx/ThreadPool.java
+++ 
b/modules/grizzly/src/main/java/org/glassfish/grizzly/threadpool/jmx/ThreadPool.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011-2013 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
diff --git 
a/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/filecache/jmx/FileCache.java
 
b/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/filecache/jmx/FileCache.java
index 52976f1..6e868ff 100644
--- 
a/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/filecache/jmx/FileCache.java
+++ 
b/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/filecache/jmx/FileCache.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS 
[truncated due to length]



[grizzly~git:11b3081c] [master] + update copyright headers

oleksiys 02/01/2013
Terms of Use; Privacy Policy; Copyright ©2013-2015 (revision 20150626.29986a4)
 
 
Close
loading
Please Confirm
Close