directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r332566 - in /directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/support: SocketAcceptorDelegate.java SocketConnectorDelegate.java SocketIoProcessor.java
Date Fri, 11 Nov 2005 14:34:40 GMT
Author: trustin
Date: Fri Nov 11 06:34:37 2005
New Revision: 332566

URL: http://svn.apache.org/viewcvs?rev=332566&view=rev
Log:
Added more constructor parameters to SocketIoProcessor for better thread names

Modified:
    directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/support/SocketAcceptorDelegate.java
    directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/support/SocketConnectorDelegate.java
    directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/support/SocketIoProcessor.java

Modified: directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/support/SocketAcceptorDelegate.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/support/SocketAcceptorDelegate.java?rev=332566&r1=332565&r2=332566&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/support/SocketAcceptorDelegate.java
(original)
+++ directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/support/SocketAcceptorDelegate.java
Fri Nov 11 06:34:37 2005
@@ -51,6 +51,7 @@
     private static volatile int nextId = 0;
 
     private final int id = nextId ++ ;
+    private final String threadName = "SocketAcceptor-" + id;
 
     private final IoSessionManagerFilterChain filters = new SocketSessionManagerFilterChain(
this );
     
@@ -65,8 +66,7 @@
     private final Queue cancelQueue = new Queue();
     
     private Worker worker;
-    private final SocketIoProcessor ioProcessor = new SocketIoProcessor( this );
-
+    private final SocketIoProcessor ioProcessor = new SocketIoProcessor( this, threadName
+ "-1" );
 
     /**
      * Creates a new instance.
@@ -207,7 +207,7 @@
     {
         public Worker()
         {
-            super( "SocketAcceptor-" + id );
+            super( SocketAcceptorDelegate.this.threadName );
         }
 
         public void run()

Modified: directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/support/SocketConnectorDelegate.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/support/SocketConnectorDelegate.java?rev=332566&r1=332565&r2=332566&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/support/SocketConnectorDelegate.java
(original)
+++ directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/support/SocketConnectorDelegate.java
Fri Nov 11 06:34:37 2005
@@ -51,6 +51,7 @@
     private static volatile int nextId = 0;
 
     private final int id = nextId++;
+    private final String threadName = "SocketConnector-" + id;
 
     private final IoSessionManagerFilterChain filters = new SocketSessionManagerFilterChain(
this );
 
@@ -60,7 +61,7 @@
 
     private Worker worker;
     
-    private final SocketIoProcessor ioProcessor = new SocketIoProcessor( this );
+    private final SocketIoProcessor ioProcessor = new SocketIoProcessor( this, threadName
+ "-1" );
 
     /**
      * Creates a new instance.
@@ -260,7 +261,7 @@
     {
         public Worker()
         {
-            super( "SocketConnector-" + id );
+            super( SocketConnectorDelegate.this.threadName );
         }
 
         public void run()

Modified: directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/support/SocketIoProcessor.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/support/SocketIoProcessor.java?rev=332566&r1=332565&r2=332566&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/support/SocketIoProcessor.java
(original)
+++ directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/support/SocketIoProcessor.java
Fri Nov 11 06:34:37 2005
@@ -42,6 +42,7 @@
 class SocketIoProcessor
 {
     private final IoSessionManager parent;
+    private final String threadName;
     private Selector selector;
 
     private final Queue newSessions = new Queue();
@@ -53,9 +54,10 @@
 
     private long lastIdleCheckTime = System.currentTimeMillis();
 
-    SocketIoProcessor( IoSessionManager parent )
+    SocketIoProcessor( IoSessionManager parent, String threadName )
     {
         this.parent = parent;
+        this.threadName = threadName;
     }
 
     void addNew( SocketSessionImpl session ) throws IOException
@@ -534,7 +536,7 @@
     {
         public Worker()
         {
-            super( "SocketIoProcessor" );
+            super( SocketIoProcessor.this.threadName );
         }
 
         public void run()



Mime
View raw message