Return-Path: Delivered-To: apmail-hc-commits-archive@www.apache.org Received: (qmail 77710 invoked from network); 19 Aug 2009 20:02:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 19 Aug 2009 20:02:29 -0000 Received: (qmail 31567 invoked by uid 500); 19 Aug 2009 20:02:48 -0000 Delivered-To: apmail-hc-commits-archive@hc.apache.org Received: (qmail 31535 invoked by uid 500); 19 Aug 2009 20:02:48 -0000 Mailing-List: contact commits-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list commits@hc.apache.org Received: (qmail 31526 invoked by uid 99); 19 Aug 2009 20:02:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Aug 2009 20:02:48 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Aug 2009 20:02:47 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id D032E2388908; Wed, 19 Aug 2009 20:02:26 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r805956 - in /httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio: NHttpConnectionBase.java SessionHttpContext.java Date: Wed, 19 Aug 2009 20:02:26 -0000 To: commits@hc.apache.org From: olegk@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090819200226.D032E2388908@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: olegk Date: Wed Aug 19 20:02:25 2009 New Revision: 805956 URL: http://svn.apache.org/viewvc?rev=805956&view=rev Log: HttpContext backed by IOSession context Added: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/SessionHttpContext.java (with props) Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java?rev=805956&r1=805955&r2=805956&view=diff ============================================================================== --- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java (original) +++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java Wed Aug 19 20:02:25 2009 @@ -70,7 +70,6 @@ import org.apache.http.params.HttpParams; import org.apache.http.protocol.HTTP; import org.apache.http.protocol.HttpContext; -import org.apache.http.protocol.SyncBasicHttpContext; /** * This class serves as a base for all {@link NHttpConnection} implementations @@ -130,7 +129,7 @@ throw new IllegalArgumentException("HTTP params may not be null"); } this.session = session; - this.context = new SyncBasicHttpContext(null); + this.context = new SessionHttpContext(session); int buffersize = HttpConnectionParams.getSocketBufferSize(params); int linebuffersize = buffersize; Added: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/SessionHttpContext.java URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/SessionHttpContext.java?rev=805956&view=auto ============================================================================== --- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/SessionHttpContext.java (added) +++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/SessionHttpContext.java Wed Aug 19 20:02:25 2009 @@ -0,0 +1,54 @@ +/* + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + * + */ + +package org.apache.http.impl.nio; + +import org.apache.http.nio.reactor.IOSession; +import org.apache.http.protocol.HttpContext; + +class SessionHttpContext implements HttpContext { + + private final IOSession iosession; + + public SessionHttpContext(final IOSession iosession) { + super(); + this.iosession = iosession; + } + + public Object getAttribute(final String id) { + return this.iosession.getAttribute(id); + } + + public Object removeAttribute(final String id) { + return this.iosession.removeAttribute(id); + } + + public void setAttribute(final String id, final Object obj) { + this.iosession.setAttribute(id, obj); + } + +} Propchange: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/SessionHttpContext.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/SessionHttpContext.java ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision HeadURL Propchange: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/SessionHttpContext.java ------------------------------------------------------------------------------ svn:mime-type = text/plain