hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asan...@apache.org
Subject svn commit: r1144161 - in /httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http: impl/nio/reactor/IOSessionImpl.java impl/nio/reactor/SSLIOSession.java nio/reactor/IOSession.java
Date Fri, 08 Jul 2011 05:11:54 GMT
Author: asankha
Date: Fri Jul  8 05:11:54 2011
New Revision: 1144161

URL: http://svn.apache.org/viewvc?rev=1144161&view=rev
Log:
expose io session creation, last read/write and access times

Modified:
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/IOSessionImpl.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/reactor/IOSession.java

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/IOSessionImpl.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/IOSessionImpl.java?rev=1144161&r1=1144160&r2=1144161&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/IOSessionImpl.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/IOSessionImpl.java
Fri Jul  8 05:11:54 2011
@@ -265,19 +265,19 @@ public class IOSessionImpl implements IO
         this.attributes.put(name, obj);
     }
 
-    synchronized long getStartedTime() {
+    public synchronized long getStartedTime() {
         return this.startedTime;
     }
 
-    synchronized long getLastReadTime() {
+    public synchronized long getLastReadTime() {
         return this.lastReadTime;
     }
 
-    synchronized long getLastWriteTime() {
+    public synchronized long getLastWriteTime() {
         return this.lastWriteTime;
     }
 
-    synchronized long getLastAccessTime() {
+    public synchronized long getLastAccessTime() {
         return this.lastAccessTime;
     }
 

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java?rev=1144161&r1=1144160&r2=1144161&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java
Fri Jul  8 05:11:54 2011
@@ -450,6 +450,22 @@ public class SSLIOSession implements IOS
         this.session.setAttribute(name, obj);
     }
 
+    public long getStartedTime() {
+        return this.session.getStartedTime();
+    }
+
+    public long getLastReadTime() {
+        return this.session.getLastReadTime();
+    }
+
+    public long getLastWriteTime() {
+        return this.session.getLastWriteTime();
+    }
+
+    public long getLastAccessTime() {
+        return this.session.getLastAccessTime();
+    }
+
     @Override
     public String toString() {
         StringBuilder buffer = new StringBuilder();

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/reactor/IOSession.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/reactor/IOSession.java?rev=1144161&r1=1144160&r2=1144161&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/reactor/IOSession.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/reactor/IOSession.java
Fri Jul  8 05:11:54 2011
@@ -233,4 +233,27 @@ public interface IOSession {
      */
     Object removeAttribute(String name);
 
+    /**
+     * Return the IO Session start time in milliseconds
+     * @return IO Session start time in milliseconds
+     */
+    public long getStartedTime();
+
+    /**
+     * Return the IO Session last read time in milliseconds
+     * @return IO Session last read time in milliseconds
+     */
+    public long getLastReadTime();
+
+    /**
+     * Return the IO Session last write time in milliseconds
+     * @return IO Session last write time in milliseconds
+     */
+    public long getLastWriteTime();
+
+    /**
+     * Return the IO Session last access time in milliseconds
+     * @return IO Session last access time in milliseconds
+     */
+    public long getLastAccessTime();
 }



Mime
View raw message