You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by pr...@apache.org on 2006/11/05 17:38:37 UTC
svn commit: r471456 - in /directory/branches/mina/1.2: ./ core/
core/src/main/java/org/apache/mina/common/
core/src/main/java/org/apache/mina/filter/executor/
core/src/main/java/org/apache/mina/transport/socket/nio/
core/src/main/java/org/apache/mina/t...
Author: proyal
Date: Sun Nov 5 08:38:36 2006
New Revision: 471456
URL: http://svn.apache.org/viewvc?view=rev&rev=471456
Log:
start of mina-1.2 branch, an API-compatible version of 1.0 requiring java5
Added:
directory/branches/mina/1.2/
- copied from r471453, directory/branches/mina/1.0/
Removed:
directory/branches/mina/1.2/java5/
Modified:
directory/branches/mina/1.2/core/pom.xml
directory/branches/mina/1.2/core/src/main/java/org/apache/mina/common/ExecutorThreadModel.java
directory/branches/mina/1.2/core/src/main/java/org/apache/mina/filter/executor/ExecutorFilter.java
directory/branches/mina/1.2/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramAcceptor.java
directory/branches/mina/1.2/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramConnector.java
directory/branches/mina/1.2/core/src/main/java/org/apache/mina/transport/socket/nio/SocketAcceptor.java
directory/branches/mina/1.2/core/src/main/java/org/apache/mina/transport/socket/nio/SocketConnector.java
directory/branches/mina/1.2/core/src/main/java/org/apache/mina/transport/socket/nio/SocketIoProcessor.java
directory/branches/mina/1.2/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java
directory/branches/mina/1.2/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorDelegate.java
directory/branches/mina/1.2/core/src/main/java/org/apache/mina/util/ExpiringMap.java
directory/branches/mina/1.2/core/src/main/java/org/apache/mina/util/NewThreadExecutor.java
directory/branches/mina/1.2/core/src/test/java/org/apache/mina/filter/executor/ExecutorFilterRegressionTest.java
directory/branches/mina/1.2/example/pom.xml
directory/branches/mina/1.2/filter-codec-netty/pom.xml
directory/branches/mina/1.2/filter-compression/ (props changed)
directory/branches/mina/1.2/filter-compression/pom.xml
directory/branches/mina/1.2/filter-ssl/pom.xml
directory/branches/mina/1.2/integration-jmx/ (props changed)
directory/branches/mina/1.2/integration-jmx/pom.xml
directory/branches/mina/1.2/integration-spring/pom.xml
directory/branches/mina/1.2/integration-spring/src/main/java/org/apache/mina/integration/spring/ExecutorThreadModelFactoryBean.java
directory/branches/mina/1.2/integration-spring/src/main/java/org/apache/mina/integration/spring/ThreadPoolExecutorFactoryBean.java
directory/branches/mina/1.2/integration-spring/src/test/java/org/apache/mina/integration/spring/ExecutorThreadModelFactoryBeanTest.java
directory/branches/mina/1.2/pom.xml
Modified: directory/branches/mina/1.2/core/pom.xml
URL: http://svn.apache.org/viewvc/directory/branches/mina/1.2/core/pom.xml?view=diff&rev=471456&r1=471453&r2=471456
==============================================================================
--- directory/branches/mina/1.2/core/pom.xml (original)
+++ directory/branches/mina/1.2/core/pom.xml Sun Nov 5 08:38:36 2006
@@ -4,7 +4,7 @@
<parent>
<groupId>org.apache.mina</groupId>
<artifactId>build</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.1.0-SNAPSHOT</version>
</parent>
<artifactId>mina-core</artifactId>
<name>Apache MINA Core API</name>
@@ -19,13 +19,6 @@
<artifactId>slf4j-simple</artifactId>
<version>1.0</version>
<scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>backport-util-concurrent</groupId>
- <artifactId>backport-util-concurrent</artifactId>
- <version>2.2</version>
- <scope>compile</scope>
</dependency>
<dependency>
Modified: directory/branches/mina/1.2/core/src/main/java/org/apache/mina/common/ExecutorThreadModel.java
URL: http://svn.apache.org/viewvc/directory/branches/mina/1.2/core/src/main/java/org/apache/mina/common/ExecutorThreadModel.java?view=diff&rev=471456&r1=471453&r2=471456
==============================================================================
--- directory/branches/mina/1.2/core/src/main/java/org/apache/mina/common/ExecutorThreadModel.java (original)
+++ directory/branches/mina/1.2/core/src/main/java/org/apache/mina/common/ExecutorThreadModel.java Sun Nov 5 08:38:36 2006
@@ -6,16 +6,16 @@
* 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.
- *
+ * under the License.
+ *
*/
package org.apache.mina.common;
@@ -24,10 +24,10 @@
import org.apache.mina.filter.executor.ExecutorFilter;
-import edu.emory.mathcs.backport.java.util.concurrent.Executor;
-import edu.emory.mathcs.backport.java.util.concurrent.ThreadFactory;
-import edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor;
-import edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.Executor;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.atomic.AtomicInteger;
/**
* A {@link ThreadModel} which represents a thread model with an {@link Executor}
@@ -35,7 +35,7 @@
* per service. The default underlying {@link Executor} is {@link ThreadPoolExecutor},
* so you can safely downcast the returned {@link Executor} of {@link #getExecutor()} to
* {@link ThreadPoolExecutor} by default.
- *
+ *
* @author The Apache Directory Project (mina-dev@directory.apache.org)
* @version $Rev$, $Date$
*/
@@ -46,13 +46,13 @@
* Without this map, we might create extremely many thread pools that leads the system to
* coma. */
private static final Map service2model = new HashMap();
-
+
/**
* Returns a {@link ExecutorThreadModel} instance for the specified <tt>serviceName</tt>.
* Please note that all returned instances will be managed globally; the same instance
* will be returned if you specified the same service name. Please try to specify
* different names for different services.
- *
+ *
* @param serviceName the name of the service that needs thread pooling
*/
public static ExecutorThreadModel getInstance( String serviceName )
@@ -72,10 +72,10 @@
service2model.put( serviceName, model );
}
}
-
+
return model;
}
-
+
private final String threadNamePrefix;
private final ExecutorFilter defaultFilter;
private ExecutorFilter filter = new ExecutorFilter();
@@ -83,7 +83,7 @@
private ExecutorThreadModel( String threadNamePrefix )
{
this.threadNamePrefix = threadNamePrefix;
-
+
// Create the default filter
defaultFilter = new ExecutorFilter();
ThreadPoolExecutor tpe = ( ThreadPoolExecutor ) defaultFilter.getExecutor();
@@ -101,7 +101,7 @@
}
};
tpe.setThreadFactory( newThreadFactory );
-
+
// Set to default.
setExecutor( null );
}
@@ -115,12 +115,12 @@
{
return filter.getExecutor();
}
-
+
/**
* Changes the underlying {@link Executor} of this model.
* Previous settings such as the number of threads should be configured again.
* Only newly created {@link IoSession}s will be affected.
- *
+ *
* @param executor <tt>null</tt> to revert to the default setting
*/
public void setExecutor( Executor executor )
Modified: directory/branches/mina/1.2/core/src/main/java/org/apache/mina/filter/executor/ExecutorFilter.java
URL: http://svn.apache.org/viewvc/directory/branches/mina/1.2/core/src/main/java/org/apache/mina/filter/executor/ExecutorFilter.java?view=diff&rev=471456&r1=471453&r2=471456
==============================================================================
--- directory/branches/mina/1.2/core/src/main/java/org/apache/mina/filter/executor/ExecutorFilter.java (original)
+++ directory/branches/mina/1.2/core/src/main/java/org/apache/mina/filter/executor/ExecutorFilter.java Sun Nov 5 08:38:36 2006
@@ -6,16 +6,16 @@
* 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.
- *
+ * under the License.
+ *
*/
package org.apache.mina.filter.executor;
@@ -31,10 +31,10 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import edu.emory.mathcs.backport.java.util.concurrent.Executor;
-import edu.emory.mathcs.backport.java.util.concurrent.LinkedBlockingQueue;
-import edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor;
-import edu.emory.mathcs.backport.java.util.concurrent.TimeUnit;
+import java.util.concurrent.Executor;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
/**
* A filter that forward events to {@link Executor} in
@@ -62,7 +62,7 @@
{
this( new ThreadPoolExecutor(16, 16, 60, TimeUnit.SECONDS, new LinkedBlockingQueue() ) );
}
-
+
/**
* Creates a new instance with the specified <tt>executor</tt>.
*/
Modified: directory/branches/mina/1.2/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramAcceptor.java
URL: http://svn.apache.org/viewvc/directory/branches/mina/1.2/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramAcceptor.java?view=diff&rev=471456&r1=471453&r2=471456
==============================================================================
--- directory/branches/mina/1.2/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramAcceptor.java (original)
+++ directory/branches/mina/1.2/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramAcceptor.java Sun Nov 5 08:38:36 2006
@@ -6,16 +6,16 @@
* 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.
- *
+ * under the License.
+ *
*/
package org.apache.mina.transport.socket.nio;
@@ -24,11 +24,11 @@
import org.apache.mina.transport.socket.nio.support.DatagramAcceptorDelegate;
import org.apache.mina.util.NewThreadExecutor;
-import edu.emory.mathcs.backport.java.util.concurrent.Executor;
+import java.util.concurrent.Executor;
/**
* {@link IoAcceptor} for datagram transport (UDP/IP).
- *
+ *
* @author The Apache Directory Project (mina-dev@directory.apache.org)
* @version $Rev$, $Date$
*/
@@ -44,22 +44,22 @@
/**
* Creates a new instance.
- *
+ *
* @param executor Executor to use for launching threads
*/
public DatagramAcceptor( Executor executor )
{
init( new DatagramAcceptorDelegate( this, executor ) );
}
-
+
/**
* Sets the config this acceptor will use by default.
- *
+ *
* @param defaultConfig the default config.
* @throws NullPointerException if the specified value is <code>null</code>.
*/
public void setDefaultConfig( DatagramAcceptorConfig defaultConfig )
{
( ( DatagramAcceptorDelegate ) delegate ).setDefaultConfig( defaultConfig );
- }
+ }
}
Modified: directory/branches/mina/1.2/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramConnector.java
URL: http://svn.apache.org/viewvc/directory/branches/mina/1.2/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramConnector.java?view=diff&rev=471456&r1=471453&r2=471456
==============================================================================
--- directory/branches/mina/1.2/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramConnector.java (original)
+++ directory/branches/mina/1.2/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramConnector.java Sun Nov 5 08:38:36 2006
@@ -6,16 +6,16 @@
* 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.
- *
+ * under the License.
+ *
*/
package org.apache.mina.transport.socket.nio;
@@ -23,18 +23,18 @@
import org.apache.mina.common.support.DelegatedIoConnector;
import org.apache.mina.transport.socket.nio.support.DatagramConnectorDelegate;
import org.apache.mina.util.NewThreadExecutor;
-import edu.emory.mathcs.backport.java.util.concurrent.Executor;
+import java.util.concurrent.Executor;
/**
* {@link IoConnector} for datagram transport (UDP/IP).
- *
+ *
* @author The Apache Directory Project (mina-dev@directory.apache.org)
* @version $Rev$, $Date$
*/
public class DatagramConnector extends DelegatedIoConnector
{
/**
- * Creates a new instance using a NewThreadExecutor
+ * Creates a new instance using a NewThreadExecutor
*/
public DatagramConnector()
{
@@ -43,17 +43,17 @@
/**
* Creates a new instance.
- *
+ *
* @param executor Executor to use for launching threads
*/
public DatagramConnector( Executor executor )
{
init( new DatagramConnectorDelegate( this, executor ) );
}
-
+
/**
* Sets the default config this connector should use.
- *
+ *
* @param defaultConfig the default config.
* @throws NullPointerException if the specified value is <code>null</code>.
*/
Modified: directory/branches/mina/1.2/core/src/main/java/org/apache/mina/transport/socket/nio/SocketAcceptor.java
URL: http://svn.apache.org/viewvc/directory/branches/mina/1.2/core/src/main/java/org/apache/mina/transport/socket/nio/SocketAcceptor.java?view=diff&rev=471456&r1=471453&r2=471456
==============================================================================
--- directory/branches/mina/1.2/core/src/main/java/org/apache/mina/transport/socket/nio/SocketAcceptor.java (original)
+++ directory/branches/mina/1.2/core/src/main/java/org/apache/mina/transport/socket/nio/SocketAcceptor.java Sun Nov 5 08:38:36 2006
@@ -6,16 +6,16 @@
* 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.
- *
+ * under the License.
+ *
*/
package org.apache.mina.transport.socket.nio;
@@ -41,7 +41,7 @@
import org.apache.mina.util.Queue;
import org.apache.mina.util.NewThreadExecutor;
import org.apache.mina.util.NamePreservingRunnable;
-import edu.emory.mathcs.backport.java.util.concurrent.Executor;
+import java.util.concurrent.Executor;
/**
* {@link IoAcceptor} for socket transport (TCP/IP).
@@ -369,7 +369,7 @@
/**
* Sets the config this acceptor will use by default.
- *
+ *
* @param defaultConfig the default config.
* @throws NullPointerException if the specified value is <code>null</code>.
*/
Modified: directory/branches/mina/1.2/core/src/main/java/org/apache/mina/transport/socket/nio/SocketConnector.java
URL: http://svn.apache.org/viewvc/directory/branches/mina/1.2/core/src/main/java/org/apache/mina/transport/socket/nio/SocketConnector.java?view=diff&rev=471456&r1=471453&r2=471456
==============================================================================
--- directory/branches/mina/1.2/core/src/main/java/org/apache/mina/transport/socket/nio/SocketConnector.java (original)
+++ directory/branches/mina/1.2/core/src/main/java/org/apache/mina/transport/socket/nio/SocketConnector.java Sun Nov 5 08:38:36 2006
@@ -6,16 +6,16 @@
* 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.
- *
+ * under the License.
+ *
*/
package org.apache.mina.transport.socket.nio;
@@ -41,7 +41,7 @@
import org.apache.mina.util.Queue;
import org.apache.mina.util.NewThreadExecutor;
import org.apache.mina.util.NamePreservingRunnable;
-import edu.emory.mathcs.backport.java.util.concurrent.Executor;
+import java.util.concurrent.Executor;
/**
* {@link IoConnector} for socket transport (TCP/IP).
@@ -74,7 +74,7 @@
private int workerTimeout = 60; // 1 min.
/**
- * Create a connector with a single processing thread using a NewThreadExecutor
+ * Create a connector with a single processing thread using a NewThreadExecutor
*/
public SocketConnector()
{
@@ -234,7 +234,7 @@
/**
* Sets the config this connector will use by default.
- *
+ *
* @param defaultConfig the default config.
* @throws NullPointerException if the specified value is <code>null</code>.
*/
@@ -246,7 +246,7 @@
}
this.defaultConfig = defaultConfig;
}
-
+
private synchronized void startupWorker() throws IOException
{
if( worker == null )
@@ -379,7 +379,7 @@
{
throw ( IOException ) new IOException( "Failed to create a session." ).initCause( e );
}
-
+
// Set the ConnectFuture of the specified session, which will be
// removed and notified by AbstractIoFilterChain eventually.
session.setAttribute( AbstractIoFilterChain.CONNECT_FUTURE, connectFuture );
Modified: directory/branches/mina/1.2/core/src/main/java/org/apache/mina/transport/socket/nio/SocketIoProcessor.java
URL: http://svn.apache.org/viewvc/directory/branches/mina/1.2/core/src/main/java/org/apache/mina/transport/socket/nio/SocketIoProcessor.java?view=diff&rev=471456&r1=471453&r2=471456
==============================================================================
--- directory/branches/mina/1.2/core/src/main/java/org/apache/mina/transport/socket/nio/SocketIoProcessor.java (original)
+++ directory/branches/mina/1.2/core/src/main/java/org/apache/mina/transport/socket/nio/SocketIoProcessor.java Sun Nov 5 08:38:36 2006
@@ -6,16 +6,16 @@
* 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.
- *
+ * under the License.
+ *
*/
package org.apache.mina.transport.socket.nio;
@@ -25,6 +25,7 @@
import java.nio.channels.SocketChannel;
import java.util.Iterator;
import java.util.Set;
+import java.util.concurrent.Executor;
import org.apache.mina.common.ByteBuffer;
import org.apache.mina.common.ExceptionMonitor;
@@ -33,7 +34,6 @@
import org.apache.mina.common.WriteTimeoutException;
import org.apache.mina.util.NamePreservingRunnable;
import org.apache.mina.util.Queue;
-import edu.emory.mathcs.backport.java.util.concurrent.Executor;
/**
* Performs all I/O operations for sockets which is connected or bound. This class is used by MINA internally.
@@ -510,7 +510,7 @@
SelectionKey key = session.getSelectionKey();
// Retry later if session is not yet fully initialized.
- // (In case that Session.suspend??() or session.resume??() is
+ // (In case that Session.suspend??() or session.resume??() is
// called before addSession() is processed)
if( key == null )
{
Modified: directory/branches/mina/1.2/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java
URL: http://svn.apache.org/viewvc/directory/branches/mina/1.2/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java?view=diff&rev=471456&r1=471453&r2=471456
==============================================================================
--- directory/branches/mina/1.2/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java (original)
+++ directory/branches/mina/1.2/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java Sun Nov 5 08:38:36 2006
@@ -6,16 +6,16 @@
* 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.
- *
+ * under the License.
+ *
*/
package org.apache.mina.transport.socket.nio.support;
@@ -48,11 +48,11 @@
import org.apache.mina.util.NamePreservingRunnable;
import org.apache.mina.util.Queue;
-import edu.emory.mathcs.backport.java.util.concurrent.Executor;
+import java.util.concurrent.Executor;
/**
* {@link IoAcceptor} for datagram transport (UDP/IP).
- *
+ *
* @author The Apache Directory Project (mina-dev@directory.apache.org)
* @version $Rev$, $Date$
*/
@@ -70,7 +70,7 @@
private final Queue cancelQueue = new Queue();
private final Queue flushingSessions = new Queue();
private Worker worker;
-
+
/**
* Creates a new instance.
*/
@@ -93,7 +93,7 @@
if( address != null && !( address instanceof InetSocketAddress ) )
throw new IllegalArgumentException( "Unexpected address type: "
+ address.getClass() );
-
+
RegistrationRequest request = new RegistrationRequest( address, handler, config );
synchronized( this )
{
@@ -104,7 +104,7 @@
startupWorker();
}
selector.wakeup();
-
+
synchronized( request )
{
while( !request.done )
@@ -118,7 +118,7 @@
}
}
}
-
+
if( request.exception != null )
{
throw ( IOException ) new IOException( "Failed to bind" ).initCause( request.exception );
@@ -152,7 +152,7 @@
}
}
selector.wakeup();
-
+
synchronized( request )
{
while( !request.done )
@@ -166,13 +166,13 @@
}
}
}
-
+
if( request.exception != null )
{
throw new RuntimeException( "Failed to unbind" , request.exception );
}
}
-
+
public void unbindAll()
{
List addresses;
@@ -180,13 +180,13 @@
{
addresses = new ArrayList( channels.keySet() );
}
-
+
for( Iterator i = addresses.iterator(); i.hasNext(); )
{
unbind( ( SocketAddress ) i.next() );
}
}
-
+
public IoSession newSession( SocketAddress remoteAddress, SocketAddress localAddress )
{
if( remoteAddress == null )
@@ -197,14 +197,14 @@
{
throw new NullPointerException( "localAddress" );
}
-
+
Selector selector = this.selector;
DatagramChannel ch = ( DatagramChannel ) channels.get( localAddress );
if( selector == null || ch == null )
{
throw new IllegalArgumentException( "Unknown localAddress: " + localAddress );
}
-
+
SelectionKey key = ch.keyFor( selector );
if( key == null )
{
@@ -229,11 +229,11 @@
req.address );
datagramSession.setRemoteAddress( remoteAddress );
datagramSession.setSelectionKey( key );
-
+
getSessionRecycler( req ).put( datagramSession );
session = datagramSession;
}
-
+
try
{
buildFilterChain( req, session );
@@ -243,7 +243,7 @@
{
ExceptionMonitor.getInstance().exceptionCaught( t );
}
-
+
return session;
}
@@ -260,7 +260,7 @@
}
return sessionRecycler;
}
-
+
public IoServiceListenerSupport getListeners()
{
return super.getListeners();
@@ -272,15 +272,15 @@
req.config.getFilterChainBuilder().buildFilterChain( session.getFilterChain() );
req.config.getThreadModel().buildFilterChain( session.getFilterChain() );
}
-
+
public IoServiceConfig getDefaultConfig()
{
return defaultConfig;
}
-
+
/**
* Sets the config this acceptor will use by default.
- *
+ *
* @param defaultConfig the default config.
* @throws NullPointerException if the specified value is <code>null</code>.
*/
@@ -292,7 +292,7 @@
}
this.defaultConfig = defaultConfig;
}
-
+
private synchronized void startupWorker() throws IOException
{
if( worker == null )
@@ -528,7 +528,7 @@
{
destination = session.getRemoteAddress();
}
-
+
int writtenBytes = ch.send( buf.buf(), destination );
if( writtenBytes == 0 )
@@ -606,7 +606,7 @@
{
channels.put( req.address, ch );
}
-
+
getListeners().fireServiceActivated(
this, req.address, req.handler, req.config);
}
@@ -650,7 +650,7 @@
{
request = ( CancellationRequest ) cancelQueue.pop();
}
-
+
if( request == null )
{
break;
@@ -702,7 +702,7 @@
}
}
}
-
+
public void updateTrafficMask( DatagramSessionImpl session )
{
// There's no point in changing the traffic mask for sessions originating
@@ -716,9 +716,9 @@
private final IoHandler handler;
private final IoServiceConfig config;
- private Throwable exception;
+ private Throwable exception;
private boolean done;
-
+
private RegistrationRequest( SocketAddress address, IoHandler handler, IoServiceConfig config )
{
this.address = ( InetSocketAddress ) address;
@@ -733,7 +733,7 @@
private boolean done;
private RegistrationRequest registrationRequest;
private RuntimeException exception;
-
+
private CancellationRequest( SocketAddress address )
{
this.address = address;
Modified: directory/branches/mina/1.2/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorDelegate.java
URL: http://svn.apache.org/viewvc/directory/branches/mina/1.2/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorDelegate.java?view=diff&rev=471456&r1=471453&r2=471456
==============================================================================
--- directory/branches/mina/1.2/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorDelegate.java (original)
+++ directory/branches/mina/1.2/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorDelegate.java Sun Nov 5 08:38:36 2006
@@ -6,16 +6,16 @@
* 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.
- *
+ * under the License.
+ *
*/
package org.apache.mina.transport.socket.nio.support;
@@ -46,11 +46,11 @@
import org.apache.mina.util.NamePreservingRunnable;
import org.apache.mina.util.Queue;
-import edu.emory.mathcs.backport.java.util.concurrent.Executor;
+import java.util.concurrent.Executor;
/**
* {@link IoConnector} for datagram transport (UDP/IP).
- *
+ *
* @author The Apache Directory Project (mina-dev@directory.apache.org)
* @version $Rev$, $Date$
*/
@@ -94,18 +94,18 @@
if( !( address instanceof InetSocketAddress ) )
throw new IllegalArgumentException( "Unexpected address type: "
+ address.getClass() );
-
+
if( localAddress != null && !( localAddress instanceof InetSocketAddress ) )
{
throw new IllegalArgumentException( "Unexpected local address type: "
+ localAddress.getClass() );
}
-
+
if( config == null )
{
config = getDefaultConfig();
}
-
+
DatagramChannel ch = null;
boolean initialized = false;
try
@@ -120,7 +120,7 @@
{
cfg = ( DatagramSessionConfig ) getDefaultConfig().getSessionConfig();
}
-
+
ch.socket().setReuseAddress( cfg.isReuseAddress() );
ch.socket().setBroadcast( cfg.isBroadcast() );
ch.socket().setReceiveBufferSize( cfg.getReceiveBufferSize() );
@@ -180,7 +180,7 @@
return DefaultConnectFuture.newFailedFuture( e );
}
-
+
synchronized( registerQueue )
{
registerQueue.push( request );
@@ -190,15 +190,15 @@
selector.wakeup();
return request;
}
-
+
public IoServiceConfig getDefaultConfig()
{
return defaultConfig;
}
-
+
/**
* Sets the config this connector will use by default.
- *
+ *
* @param defaultConfig the default config.
* @throws NullPointerException if the specified value is <code>null</code>.
*/
@@ -210,7 +210,7 @@
}
this.defaultConfig = defaultConfig;
}
-
+
private synchronized void startupWorker() throws IOException
{
if( worker == null )
@@ -276,7 +276,7 @@
}
selector.wakeup();
}
-
+
private void scheduleTrafficControl( DatagramSessionImpl session )
{
synchronized( trafficControllingSessions )
@@ -284,8 +284,8 @@
trafficControllingSessions.push( session );
}
}
-
- private void doUpdateTrafficMask()
+
+ private void doUpdateTrafficMask()
{
if( trafficControllingSessions.isEmpty() )
return;
@@ -304,7 +304,7 @@
SelectionKey key = session.getSelectionKey();
// Retry later if session is not yet fully initialized.
- // (In case that Session.suspend??() or session.resume??() is
+ // (In case that Session.suspend??() or session.resume??() is
// called before addSession() is processed)
if( key == null )
{
@@ -334,7 +334,7 @@
key.interestOps( ops & mask );
}
}
-
+
private class Worker implements Runnable
{
public void run()
@@ -428,7 +428,7 @@
}
}
}
-
+
private DatagramSessionImpl getRecycledSession( IoSession session )
{
IoSessionRecycler sessionRecycler = getSessionRecycler( session );
@@ -452,7 +452,7 @@
return null;
}
-
+
private IoSessionRecycler getSessionRecycler( IoSession session )
{
IoServiceConfig config = session.getServiceConfig();
@@ -614,7 +614,7 @@
req.config,
req.channel, req.handler,
req.channel.socket().getRemoteSocketAddress() );
-
+
// AbstractIoFilterChain will notify the connect future.
session.setAttribute( AbstractIoFilterChain.CONNECT_FUTURE, req );
@@ -697,7 +697,7 @@
{
ExceptionMonitor.getInstance().exceptionCaught( e );
}
-
+
getListeners().fireSessionDestroyed( session );
session.getCloseFuture().setClosed();
key.cancel();
Modified: directory/branches/mina/1.2/core/src/main/java/org/apache/mina/util/ExpiringMap.java
URL: http://svn.apache.org/viewvc/directory/branches/mina/1.2/core/src/main/java/org/apache/mina/util/ExpiringMap.java?view=diff&rev=471456&r1=471453&r2=471456
==============================================================================
--- directory/branches/mina/1.2/core/src/main/java/org/apache/mina/util/ExpiringMap.java (original)
+++ directory/branches/mina/1.2/core/src/main/java/org/apache/mina/util/ExpiringMap.java Sun Nov 5 08:38:36 2006
@@ -6,16 +6,16 @@
* 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.
- *
+ * under the License.
+ *
*/
package org.apache.mina.util;
@@ -24,14 +24,14 @@
import java.util.Map;
import java.util.Set;
-import edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap;
-import edu.emory.mathcs.backport.java.util.concurrent.CopyOnWriteArrayList;
-import edu.emory.mathcs.backport.java.util.concurrent.locks.ReadWriteLock;
-import edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantReadWriteLock;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
/**
* A map with expiration.
- *
+ *
* @author The Apache Directory Project (mina-dev@directory.apache.org)
*/
public class ExpiringMap implements Map
@@ -178,7 +178,7 @@
{
expirationListeners.remove( listener );
}
-
+
public Expirer getExpirer()
{
return expirer;
@@ -372,7 +372,7 @@
{
stateLock.readLock().unlock();
}
-
+
stateLock.writeLock().lock();
try
{
Modified: directory/branches/mina/1.2/core/src/main/java/org/apache/mina/util/NewThreadExecutor.java
URL: http://svn.apache.org/viewvc/directory/branches/mina/1.2/core/src/main/java/org/apache/mina/util/NewThreadExecutor.java?view=diff&rev=471456&r1=471453&r2=471456
==============================================================================
--- directory/branches/mina/1.2/core/src/main/java/org/apache/mina/util/NewThreadExecutor.java (original)
+++ directory/branches/mina/1.2/core/src/main/java/org/apache/mina/util/NewThreadExecutor.java Sun Nov 5 08:38:36 2006
@@ -18,11 +18,11 @@
*/
package org.apache.mina.util;
-import edu.emory.mathcs.backport.java.util.concurrent.Executor;
+import java.util.concurrent.Executor;
/**
* An Executor that just launches in a new thread.
- *
+ *
* @author The Apache Directory Project (mina-dev@directory.apache.org)
* @version $Rev: 446581 $, $Date: 2006-09-15 11:36:12Z $,
*/
Modified: directory/branches/mina/1.2/core/src/test/java/org/apache/mina/filter/executor/ExecutorFilterRegressionTest.java
URL: http://svn.apache.org/viewvc/directory/branches/mina/1.2/core/src/test/java/org/apache/mina/filter/executor/ExecutorFilterRegressionTest.java?view=diff&rev=471456&r1=471453&r2=471456
==============================================================================
--- directory/branches/mina/1.2/core/src/test/java/org/apache/mina/filter/executor/ExecutorFilterRegressionTest.java (original)
+++ directory/branches/mina/1.2/core/src/test/java/org/apache/mina/filter/executor/ExecutorFilterRegressionTest.java Sun Nov 5 08:38:36 2006
@@ -6,16 +6,16 @@
* 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.
- *
+ * under the License.
+ *
*/
package org.apache.mina.filter.executor;
@@ -37,28 +37,28 @@
import org.apache.mina.common.IoFilter.WriteRequest;
import org.apache.mina.common.support.BaseIoSession;
-import edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor;
-import edu.emory.mathcs.backport.java.util.concurrent.TimeUnit;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
public class ExecutorFilterRegressionTest extends TestCase
{
private ExecutorFilter filter;
-
+
public ExecutorFilterRegressionTest()
{
}
-
+
public void setUp() throws Exception
{
filter = new ExecutorFilter();
}
-
+
public void tearDown() throws Exception
{
( ( ThreadPoolExecutor ) filter.getExecutor() ).shutdown();
filter = null;
}
-
+
public void testEventOrder() throws Throwable
{
final EventOrderChecker nextFilter = new EventOrderChecker();
@@ -79,7 +79,7 @@
final int end = sessions.length - 1;
final ExecutorFilter filter = this.filter;
( ( ThreadPoolExecutor ) filter.getExecutor() ).setKeepAliveTime( 3, TimeUnit.SECONDS );
-
+
for( int i = 0; i < loop ; i++ )
{
Integer objI = new Integer( i );
@@ -94,15 +94,15 @@
throw nextFilter.throwable;
}
}
-
+
Thread.sleep( 1000 );
-
+
for( int i = end; i >= 0; i-- )
{
Assert.assertEquals( loop - 1, sessions[ i ].lastCount.intValue() );
}
}
-
+
private static class EventOrderCounter extends BaseIoSession
{
private Integer lastCount = null;
@@ -113,7 +113,7 @@
{
Assert.assertEquals( lastCount.intValue() + 1, newCount.intValue() );
}
-
+
lastCount = newCount;
}
@@ -186,7 +186,7 @@
return 0;
}
}
-
+
private static class EventOrderChecker implements NextFilter
{
private Throwable throwable;
@@ -238,7 +238,7 @@
{
}
}
-
+
public static void main( String[] args )
{
junit.textui.TestRunner.run( ExecutorFilterRegressionTest.class );
Modified: directory/branches/mina/1.2/example/pom.xml
URL: http://svn.apache.org/viewvc/directory/branches/mina/1.2/example/pom.xml?view=diff&rev=471456&r1=471453&r2=471456
==============================================================================
--- directory/branches/mina/1.2/example/pom.xml (original)
+++ directory/branches/mina/1.2/example/pom.xml Sun Nov 5 08:38:36 2006
@@ -4,7 +4,7 @@
<parent>
<groupId>org.apache.mina</groupId>
<artifactId>build</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.1.0-SNAPSHOT</version>
</parent>
<artifactId>mina-example</artifactId>
<name>Apache MINA Examples</name>
Modified: directory/branches/mina/1.2/filter-codec-netty/pom.xml
URL: http://svn.apache.org/viewvc/directory/branches/mina/1.2/filter-codec-netty/pom.xml?view=diff&rev=471456&r1=471453&r2=471456
==============================================================================
--- directory/branches/mina/1.2/filter-codec-netty/pom.xml (original)
+++ directory/branches/mina/1.2/filter-codec-netty/pom.xml Sun Nov 5 08:38:36 2006
@@ -4,7 +4,7 @@
<parent>
<groupId>org.apache.mina</groupId>
<artifactId>build</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.1.0-SNAPSHOT</version>
</parent>
<artifactId>mina-filter-codec-netty</artifactId>
<name>Apache MINA Netty Codec Filter</name>
Propchange: directory/branches/mina/1.2/filter-compression/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sun Nov 5 08:38:36 2006
@@ -1,5 +1,3 @@
-
+*.iml
target
-.settings
-.classpath
-.project
+
Modified: directory/branches/mina/1.2/filter-compression/pom.xml
URL: http://svn.apache.org/viewvc/directory/branches/mina/1.2/filter-compression/pom.xml?view=diff&rev=471456&r1=471453&r2=471456
==============================================================================
--- directory/branches/mina/1.2/filter-compression/pom.xml (original)
+++ directory/branches/mina/1.2/filter-compression/pom.xml Sun Nov 5 08:38:36 2006
@@ -4,7 +4,7 @@
<parent>
<groupId>org.apache.mina</groupId>
<artifactId>build</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.1.0-SNAPSHOT</version>
</parent>
<artifactId>mina-filter-compression</artifactId>
<name>Apache MINA Stream Compression Filter</name>
Modified: directory/branches/mina/1.2/filter-ssl/pom.xml
URL: http://svn.apache.org/viewvc/directory/branches/mina/1.2/filter-ssl/pom.xml?view=diff&rev=471456&r1=471453&r2=471456
==============================================================================
--- directory/branches/mina/1.2/filter-ssl/pom.xml (original)
+++ directory/branches/mina/1.2/filter-ssl/pom.xml Sun Nov 5 08:38:36 2006
@@ -4,7 +4,7 @@
<parent>
<groupId>org.apache.mina</groupId>
<artifactId>build</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.1.0-SNAPSHOT</version>
</parent>
<artifactId>mina-filter-ssl</artifactId>
<name>Apache MINA SSL Filter</name>
Propchange: directory/branches/mina/1.2/integration-jmx/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sun Nov 5 08:38:36 2006
@@ -1,5 +1,3 @@
-
+*.iml
target
-.settings
-.classpath
-.project
+
Modified: directory/branches/mina/1.2/integration-jmx/pom.xml
URL: http://svn.apache.org/viewvc/directory/branches/mina/1.2/integration-jmx/pom.xml?view=diff&rev=471456&r1=471453&r2=471456
==============================================================================
--- directory/branches/mina/1.2/integration-jmx/pom.xml (original)
+++ directory/branches/mina/1.2/integration-jmx/pom.xml Sun Nov 5 08:38:36 2006
@@ -4,7 +4,7 @@
<parent>
<groupId>org.apache.mina</groupId>
<artifactId>build</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.1.0-SNAPSHOT</version>
</parent>
<artifactId>mina-integration-jmx</artifactId>
<name>Apache MINA JMX integration</name>
Modified: directory/branches/mina/1.2/integration-spring/pom.xml
URL: http://svn.apache.org/viewvc/directory/branches/mina/1.2/integration-spring/pom.xml?view=diff&rev=471456&r1=471453&r2=471456
==============================================================================
--- directory/branches/mina/1.2/integration-spring/pom.xml (original)
+++ directory/branches/mina/1.2/integration-spring/pom.xml Sun Nov 5 08:38:36 2006
@@ -4,7 +4,7 @@
<parent>
<groupId>org.apache.mina</groupId>
<artifactId>build</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.1.0-SNAPSHOT</version>
</parent>
<artifactId>mina-integration-spring</artifactId>
<name>Apache MINA Spring Integration</name>
Modified: directory/branches/mina/1.2/integration-spring/src/main/java/org/apache/mina/integration/spring/ExecutorThreadModelFactoryBean.java
URL: http://svn.apache.org/viewvc/directory/branches/mina/1.2/integration-spring/src/main/java/org/apache/mina/integration/spring/ExecutorThreadModelFactoryBean.java?view=diff&rev=471456&r1=471453&r2=471456
==============================================================================
--- directory/branches/mina/1.2/integration-spring/src/main/java/org/apache/mina/integration/spring/ExecutorThreadModelFactoryBean.java (original)
+++ directory/branches/mina/1.2/integration-spring/src/main/java/org/apache/mina/integration/spring/ExecutorThreadModelFactoryBean.java Sun Nov 5 08:38:36 2006
@@ -6,16 +6,16 @@
* 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.
- *
+ * under the License.
+ *
*/
package org.apache.mina.integration.spring;
@@ -24,13 +24,13 @@
import org.springframework.beans.factory.InitializingBean;
import org.springframework.util.Assert;
-import edu.emory.mathcs.backport.java.util.concurrent.Executor;
+import java.util.concurrent.Executor;
/**
* Spring {@link FactoryBean} which makes it possible to set up a MINA
* {@link ExecutorThreadModel} using Spring. The <code>serviceName</code>
* property must be set using {@link #setServiceName(String)}.
- *
+ *
* @author The Apache Directory Project (mina-dev@directory.apache.org)
* @version $Rev$, $Date$
*/
@@ -43,9 +43,9 @@
* Sets the {@link Executor} to use. If not set a default {@link Executor}
* will be used by the {@link ExecutorThreadModel} created by this
* factory bean.
- *
+ *
* @param executor the executor.
- * @throws IllegalArgumentException if the specified value is
+ * @throws IllegalArgumentException if the specified value is
* <code>null</code>.
*/
public void setExecutor( Executor executor )
@@ -55,12 +55,12 @@
}
/**
- * Sets the name of the service as used in the call to
- * {@link ExecutorThreadModel#getInstance(String)}. This property is
+ * Sets the name of the service as used in the call to
+ * {@link ExecutorThreadModel#getInstance(String)}. This property is
* required.
- *
+ *
* @param executor the executor.
- * @throws IllegalArgumentException if the specified value is
+ * @throws IllegalArgumentException if the specified value is
* <code>null</code>.
*/
public void setServiceName( String serviceName )
Modified: directory/branches/mina/1.2/integration-spring/src/main/java/org/apache/mina/integration/spring/ThreadPoolExecutorFactoryBean.java
URL: http://svn.apache.org/viewvc/directory/branches/mina/1.2/integration-spring/src/main/java/org/apache/mina/integration/spring/ThreadPoolExecutorFactoryBean.java?view=diff&rev=471456&r1=471453&r2=471456
==============================================================================
--- directory/branches/mina/1.2/integration-spring/src/main/java/org/apache/mina/integration/spring/ThreadPoolExecutorFactoryBean.java (original)
+++ directory/branches/mina/1.2/integration-spring/src/main/java/org/apache/mina/integration/spring/ThreadPoolExecutorFactoryBean.java Sun Nov 5 08:38:36 2006
@@ -6,37 +6,37 @@
* 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.
- *
+ * under the License.
+ *
*/
package org.apache.mina.integration.spring;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.beans.factory.config.AbstractFactoryBean;
-import edu.emory.mathcs.backport.java.util.concurrent.BlockingQueue;
-import edu.emory.mathcs.backport.java.util.concurrent.Executors;
-import edu.emory.mathcs.backport.java.util.concurrent.LinkedBlockingQueue;
-import edu.emory.mathcs.backport.java.util.concurrent.RejectedExecutionHandler;
-import edu.emory.mathcs.backport.java.util.concurrent.SynchronousQueue;
-import edu.emory.mathcs.backport.java.util.concurrent.ThreadFactory;
-import edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor;
-import edu.emory.mathcs.backport.java.util.concurrent.TimeUnit;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.Executors;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.RejectedExecutionHandler;
+import java.util.concurrent.SynchronousQueue;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
/**
* Spring {@link FactoryBean} which enables the configuration of
* {@link ThreadPoolExecutor} instances using Spring. Most of this code
* has been copied from the <code>ThreadPoolTaskExecutor</code> class
- * available in Spring 2.0.
- *
+ * available in Spring 2.0.
+ *
* @author The Apache Directory Project (mina-dev@directory.apache.org)
* @version $Rev$, $Date$
*/
@@ -85,7 +85,7 @@
* <p>
* Any positive value will lead to a LinkedBlockingQueue instance; any other
* value will lead to a SynchronousQueue instance.
- *
+ *
* @see LinkedBlockingQueue
* @see SynchronousQueue
*/
@@ -97,7 +97,7 @@
/**
* Set the ThreadFactory to use for the ThreadPoolExecutor's thread pool.
* Default is the ThreadPoolExecutor's default thread factory.
- *
+ *
* @see Executors#defaultThreadFactory()
*/
public void setThreadFactory( ThreadFactory threadFactory )
@@ -109,21 +109,21 @@
/**
* Set the RejectedExecutionHandler to use for the ThreadPoolExecutor.
* Default is the ThreadPoolExecutor's default abort policy.
- *
+ *
* @see ThreadPoolExecutor.AbortPolicy
*/
public void setRejectedExecutionHandler(
RejectedExecutionHandler rejectedExecutionHandler )
{
- this.rejectedExecutionHandler = ( rejectedExecutionHandler != null
+ this.rejectedExecutionHandler = ( rejectedExecutionHandler != null
? rejectedExecutionHandler
: new ThreadPoolExecutor.AbortPolicy() );
}
-
+
protected Object createInstance() throws Exception
{
BlockingQueue queue = null;
- if( queueCapacity > 0 )
+ if( queueCapacity > 0 )
{
queue = new LinkedBlockingQueue( queueCapacity );
}
Modified: directory/branches/mina/1.2/integration-spring/src/test/java/org/apache/mina/integration/spring/ExecutorThreadModelFactoryBeanTest.java
URL: http://svn.apache.org/viewvc/directory/branches/mina/1.2/integration-spring/src/test/java/org/apache/mina/integration/spring/ExecutorThreadModelFactoryBeanTest.java?view=diff&rev=471456&r1=471453&r2=471456
==============================================================================
--- directory/branches/mina/1.2/integration-spring/src/test/java/org/apache/mina/integration/spring/ExecutorThreadModelFactoryBeanTest.java (original)
+++ directory/branches/mina/1.2/integration-spring/src/test/java/org/apache/mina/integration/spring/ExecutorThreadModelFactoryBeanTest.java Sun Nov 5 08:38:36 2006
@@ -6,16 +6,16 @@
* 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.
- *
+ * under the License.
+ *
*/
package org.apache.mina.integration.spring;
@@ -23,14 +23,14 @@
import org.apache.mina.common.ExecutorThreadModel;
-import edu.emory.mathcs.backport.java.util.concurrent.Executor;
-import edu.emory.mathcs.backport.java.util.concurrent.SynchronousQueue;
-import edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor;
-import edu.emory.mathcs.backport.java.util.concurrent.TimeUnit;
+import java.util.concurrent.Executor;
+import java.util.concurrent.SynchronousQueue;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
/**
* Tests {@link ExecutorThreadModelFactoryBean}.
- *
+ *
* @author The Apache Directory Project (mina-dev@directory.apache.org)
* @version $Rev$, $Date$
*/
@@ -46,7 +46,7 @@
ExecutorThreadModel threadModel = ( ExecutorThreadModel ) factory.getObject();
assertSame( executor, threadModel.getExecutor() );
}
-
+
public void testSuccessfulCreationWithoutExecutor() throws Exception
{
ExecutorThreadModelFactoryBean factory = new ExecutorThreadModelFactoryBean();
@@ -55,7 +55,7 @@
ExecutorThreadModel threadModel = ( ExecutorThreadModel ) factory.getObject();
assertTrue( threadModel.getExecutor() instanceof ThreadPoolExecutor );
}
-
+
public void testUnsuccessfulCreation() throws Exception
{
ExecutorThreadModelFactoryBean factory = new ExecutorThreadModelFactoryBean();
Modified: directory/branches/mina/1.2/pom.xml
URL: http://svn.apache.org/viewvc/directory/branches/mina/1.2/pom.xml?view=diff&rev=471456&r1=471453&r2=471456
==============================================================================
--- directory/branches/mina/1.2/pom.xml (original)
+++ directory/branches/mina/1.2/pom.xml Sun Nov 5 08:38:36 2006
@@ -7,7 +7,7 @@
<version>1.0.5</version>
</parent>
<groupId>org.apache.mina</groupId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.1.0-SNAPSHOT</version>
<artifactId>build</artifactId>
<name>Apache MINA</name>
<packaging>pom</packaging>
@@ -165,72 +165,24 @@
</activation>
<modules>
<module>core</module>
- <module>java5</module>
<module>filter-ssl</module>
<module>filter-codec-netty</module>
<module>filter-compression</module>
<module>integration-spring</module>
- <module>integration-jmx</module>
+ <module>integration-jmx</module>
<module>example</module>
</modules>
</profile>
-
- <profile>
- <id>jdk1.4</id>
- <activation>
- <jdk>1.4</jdk>
- </activation>
- <modules>
- <module>core</module>
- <module>filter-codec-netty</module>
- <module>filter-compression</module>
- </modules>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <phase>validate</phase>
- <configuration>
- <tasks>
- <echo>
-====================================================================
- W A R N I N G
- -------------
-
-Build with 1.4 jvm will not include modules:
-
- o mina-java5
- o mina-filter-ssl
- o mina-integration-spring
- o mina-example
- o mina-jmx
-
-Use JDK 1.5 to make sure these modules build.
-====================================================================
- </echo>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
-
+
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
- <source>1.4</source>
- <target>1.4</target>
+ <source>1.5</source>
+ <target>1.5</target>
<debug>true</debug>
<optimize>true</optimize>
<showDeprecations>true</showDeprecations>
@@ -329,7 +281,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
</plugin> -->
- <!-- This is no longer needed while it cannot do
+ <!-- This is no longer needed while it cannot do
fully connected multi module apidocs. -->
<!-- <plugin>
<groupId>org.apache.maven.plugins</groupId>