directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nik...@apache.org
Subject svn commit: r366009 - in /directory/trunk/mina-spring/src: main/java/org/apache/mina/integration/spring/support/AbstractIoAcceptorFactoryBean.java test/java/org/apache/mina/integration/spring/support/AbstractIoAcceptorFactoryBeanTest.java
Date Wed, 04 Jan 2006 22:29:34 GMT
Author: niklas
Date: Wed Jan  4 14:29:26 2006
New Revision: 366009

URL: http://svn.apache.org/viewcvs?rev=366009&view=rev
Log:
Added the 'disconnectClientsOnUnbind' property to
AbstractIoAcceptorFactoryBean.


Modified:
    directory/trunk/mina-spring/src/main/java/org/apache/mina/integration/spring/support/AbstractIoAcceptorFactoryBean.java
    directory/trunk/mina-spring/src/test/java/org/apache/mina/integration/spring/support/AbstractIoAcceptorFactoryBeanTest.java

Modified: directory/trunk/mina-spring/src/main/java/org/apache/mina/integration/spring/support/AbstractIoAcceptorFactoryBean.java
URL: http://svn.apache.org/viewcvs/directory/trunk/mina-spring/src/main/java/org/apache/mina/integration/spring/support/AbstractIoAcceptorFactoryBean.java?rev=366009&r1=366008&r2=366009&view=diff
==============================================================================
--- directory/trunk/mina-spring/src/main/java/org/apache/mina/integration/spring/support/AbstractIoAcceptorFactoryBean.java
(original)
+++ directory/trunk/mina-spring/src/main/java/org/apache/mina/integration/spring/support/AbstractIoAcceptorFactoryBean.java
Wed Jan  4 14:29:26 2006
@@ -48,6 +48,7 @@
 {
 
     protected Binding[] bindings = new Binding[ 0 ];
+    protected boolean disconnectClientsOnUnbind = true;
 
     /**
      * Creates the {@link IoAcceptor} configured by this factory bean.
@@ -69,6 +70,8 @@
     {
         IoAcceptor acceptor = createIoAcceptor();
 
+        acceptor.setDisconnectClientsOnUnbind( disconnectClientsOnUnbind );
+        
         initIoSessionManager( acceptor );
         initIoAcceptor( acceptor );
 
@@ -172,6 +175,18 @@
     {
         Assert.notNull( bindings, "Property 'bindings' may not be null" );
         this.bindings = bindings;
+    }
+
+    /**
+     * Sets the <code>disconnectClientsOnUnbind</code> property of the
+     * {@link IoAcceptor} this factory bean will create.
+     * 
+     * @param disconnectClientsOnUnbind the property value.
+     * @see IoAcceptor#setDisconnectClientsOnUnbind(boolean)
+     */
+    public void setDisconnectClientsOnUnbind( boolean disconnectClientsOnUnbind )
+    {
+        this.disconnectClientsOnUnbind = disconnectClientsOnUnbind;
     }
 
     /**

Modified: directory/trunk/mina-spring/src/test/java/org/apache/mina/integration/spring/support/AbstractIoAcceptorFactoryBeanTest.java
URL: http://svn.apache.org/viewcvs/directory/trunk/mina-spring/src/test/java/org/apache/mina/integration/spring/support/AbstractIoAcceptorFactoryBeanTest.java?rev=366009&r1=366008&r2=366009&view=diff
==============================================================================
--- directory/trunk/mina-spring/src/test/java/org/apache/mina/integration/spring/support/AbstractIoAcceptorFactoryBeanTest.java
(original)
+++ directory/trunk/mina-spring/src/test/java/org/apache/mina/integration/spring/support/AbstractIoAcceptorFactoryBeanTest.java
Wed Jan  4 14:29:26 2006
@@ -124,6 +124,7 @@
          */
         factory.createIoAcceptor();
         mockFactory.setReturnValue( ioAcceptor );
+        ioAcceptor.setDisconnectClientsOnUnbind( true );
         factory.initIoSessionManager( ioAcceptor );
         ioAcceptor.bind( new DummySocketAddress( ":110" ), popHandler, builder1 );
         mockIoAcceptor.setMatcher( new IoAcceptorBindArgumentsMatcher() );
@@ -137,6 +138,7 @@
         mockIoAcceptor.replay();
         mockFactory.replay();
 
+        factory.setDisconnectClientsOnUnbind( true );
         factory.setBindings( bindings );
         Object o = factory.createInstance();
 



Mime
View raw message