You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by ni...@apache.org on 2006/11/22 16:10:50 UTC

svn commit: r478186 - in /mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio: ./ support/

Author: niklas
Date: Wed Nov 22 07:10:49 2006
New Revision: 478186

URL: http://svn.apache.org/viewvc?view=rev&rev=478186
Log:
Added setSessionConfig(...) methods to acceptors and connectors for the datagram and socket transports.

Modified:
    mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramAcceptor.java
    mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramConnector.java
    mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/SocketAcceptor.java
    mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/SocketConnector.java
    mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java
    mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorDelegate.java

Modified: mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramAcceptor.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramAcceptor.java?view=diff&rev=478186&r1=478185&r2=478186
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramAcceptor.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramAcceptor.java Wed Nov 22 07:10:49 2006
@@ -62,4 +62,15 @@
     {
         ( ( DatagramAcceptorDelegate ) delegate ).setSessionRecycler( sessionRecycler );
     }
+    
+    /**
+     * Sets the {@link DatagramSessionConfig} this acceptor will use for new sessions.
+     * 
+     * @param sessionConfig the config.
+     * @throws NullPointerException if the specified value is <code>null</code>.
+     */
+    public void setSessionConfig( DatagramSessionConfig sessionConfig )
+    {
+        ( ( DatagramAcceptorDelegate ) delegate ).setSessionConfig( sessionConfig );
+    }
 }

Modified: mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramConnector.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramConnector.java?view=diff&rev=478186&r1=478185&r2=478186
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramConnector.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramConnector.java Wed Nov 22 07:10:49 2006
@@ -62,4 +62,15 @@
     {
         ( ( DatagramConnectorDelegate ) delegate ).setSessionRecycler( sessionRecycler );
     }
+    
+    /**
+     * Sets the {@link DatagramSessionConfig} this connector will use for new sessions.
+     * 
+     * @param sessionConfig the config.
+     * @throws NullPointerException if the specified value is <code>null</code>.
+     */
+    public void setSessionConfig( DatagramSessionConfig sessionConfig )
+    {
+        ( ( DatagramConnectorDelegate ) delegate ).setSessionConfig( sessionConfig );
+    }
 }

Modified: mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/SocketAcceptor.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/SocketAcceptor.java?view=diff&rev=478186&r1=478185&r2=478186
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/SocketAcceptor.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/SocketAcceptor.java Wed Nov 22 07:10:49 2006
@@ -148,6 +148,21 @@
     }
 
     /**
+     * Sets the {@link SocketSessionConfig} this acceptor will use for new sessions.
+     * 
+     * @param sessionConfig the config.
+     * @throws NullPointerException if the specified value is <code>null</code>.
+     */
+    public void setSessionConfig( SocketSessionConfig sessionConfig )
+    {
+        if( sessionConfig == null )
+        {
+            throw new NullPointerException( "sessionConfig" );
+        }
+        this.sessionConfig = sessionConfig;
+    }
+    
+    /**
      * @see ServerSocket#getReuseAddress()
      */
     public boolean isReuseAddress()

Modified: mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/SocketConnector.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/SocketConnector.java?view=diff&rev=478186&r1=478185&r2=478186
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/SocketConnector.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/SocketConnector.java Wed Nov 22 07:10:49 2006
@@ -116,6 +116,21 @@
     }
 
     /**
+     * Sets the {@link SocketSessionConfig} this connector will use for new sessions.
+     * 
+     * @param sessionConfig the config.
+     * @throws NullPointerException if the specified value is <code>null</code>.
+     */
+    public void setSessionConfig( SocketSessionConfig sessionConfig )
+    {
+        if( sessionConfig == null )
+        {
+            throw new NullPointerException( "sessionConfig" );
+        }
+        this.sessionConfig = sessionConfig;
+    }
+
+	/**
      * How many seconds to keep the connection thread alive between connection requests
      *
      * @return Number of seconds to keep connection thread alive

Modified: mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java?view=diff&rev=478186&r1=478185&r2=478186
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java Wed Nov 22 07:10:49 2006
@@ -57,7 +57,7 @@
     private static volatile int nextId = 0;
 
     private IoSessionRecycler sessionRecycler = DEFAULT_RECYCLER;
-    private final IoSessionConfig sessionConfig = new DatagramSessionConfigImpl();
+    private IoSessionConfig sessionConfig = new DatagramSessionConfigImpl();
         
     private final IoAcceptor wrapper;
     private final Executor executor;
@@ -244,6 +244,21 @@
         return sessionConfig;
     }
 
+    /**
+     * Sets the {@link DatagramSessionConfig} this acceptor will use for new sessions.
+     * 
+     * @param sessionConfig the config.
+     * @throws NullPointerException if the specified value is <code>null</code>.
+     */
+    public void setSessionConfig( DatagramSessionConfig sessionConfig )
+    {
+        if( sessionConfig == null )
+        {
+            throw new NullPointerException( "sessionConfig" );
+        }
+        this.sessionConfig = sessionConfig;
+    }
+    
     public IoServiceListenerSupport getListeners()
     {
         return super.getListeners();

Modified: mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorDelegate.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorDelegate.java?view=diff&rev=478186&r1=478185&r2=478186
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorDelegate.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorDelegate.java Wed Nov 22 07:10:49 2006
@@ -59,7 +59,7 @@
     private static volatile int nextId = 0;
 
     private IoSessionRecycler sessionRecycler = DEFAULT_RECYCLER;
-    private final IoSessionConfig sessionConfig = new DatagramSessionConfigImpl();
+    private IoSessionConfig sessionConfig = new DatagramSessionConfigImpl();
 
     private final IoConnector wrapper;
     private final Executor executor;
@@ -181,6 +181,21 @@
         return sessionConfig;
     }
 
+    /**
+     * Sets the {@link DatagramSessionConfig} this connector will use for new sessions.
+     * 
+     * @param sessionConfig the config.
+     * @throws NullPointerException if the specified value is <code>null</code>.
+     */
+    public void setSessionConfig( DatagramSessionConfig sessionConfig )
+    {
+        if( sessionConfig == null )
+        {
+            throw new NullPointerException( "sessionConfig" );
+        }
+        this.sessionConfig = sessionConfig;
+    }
+    
     private synchronized void startupWorker() throws IOException
     {
         if( worker == null )



Re: svn commit: r478186 - in /mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio: ./ support/

Posted by Trustin Lee <tr...@gmail.com>.
On 11/27/06, Niklas Therning <ni...@trillian.se> wrote:
>
> I've added setSessionConfig() to IoService. BaseIoService now implements
> both getSessionConfig() and setSessionConfig(). SocketSessionConfigImpl
> and DatagramSessionConfigImpl have been renamed according to the above.
> And DefaultDatagramSessionConfig has been moved up from the support
> package. Finally, VmPipeSessionConfig and DefaultVmPipeSessionConfig
> have been added for the vmpipe transport.
>
> Please have a quick look at it and let me know what you think.


Sorry for responding late.  I found the access modifier of
DefaultSocketSessionConfig was package, so I changed it to public.  That's
all.  Everything's fine.  Thanks for the change!

Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP key fingerprints:
* E167 E6AF E73A CBCE EE41  4A29 544D DE48 FE95 4E7E
* B693 628E 6047 4F8F CFA4  455E 1C62 A7DC 0255 ECA6

Re: svn commit: r478186 - in /mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio: ./ support/

Posted by Niklas Therning <ni...@trillian.se>.
Trustin Lee wrote:
> On 11/23/06, Niklas Therning <ni...@trillian.se> wrote:
>>
>> Trustin Lee wrote:
>> > Shouldn't setSessionConfig() be in IoService rather than in each
>> > IoService
>> > implementations?  We could provide implementation classes such as
>> > DefaultSocketSessionConfig and DefaultDatagramSessionConfig.
>> >
>> > Trustin
>> The reason why I didn't add it to the IoService interface is that it
>> wouldn't be type safe. And I can't imagine when you would want to call
>> setSessionConfig() on an IoService reference without knowing the
>> concrete type (SocketConnector, SocketAcceptor, etc) of that IoService.
>> Also, there is no SessionConfig for vmpipe transport so it wouldn't make
>> any sense to have it for that transport (at least not now when there's
>> nothing to configure for vmpipe sessions).
>
>
> Someone might have received the configuration object and acceptor
> instance
> (not knowing it's implementation) from other party.  In this case,
> setSessionConfig() should be provided at least in IoAcceptor/Connector
> level, and if setSessionConfig() should exist in both interfaces, then it
> would be better to have it in IoService.  But I'm not sure this
> situation is
> practically possible.  It might be useless as you mentioned.
>
> But, I can change it, no problem. It would be more symmetric, since
>> there's already a getSessionConfig() in the interface. Then we need to
>> do the type check at runtime and we should maybe also provide a
>> VmPipeSessionConfig interface (which will be empty for now) for
>> consistency, right?
>
>
> Right.
>
> DefaultSocketSessionConfig etc would be good. Maybe we should just
>> rename SocketSessionConfingImpl and DatagramSessionConfigImpl?
>
>
> Yep. :)
>
> Trustin
I've added setSessionConfig() to IoService. BaseIoService now implements
both getSessionConfig() and setSessionConfig(). SocketSessionConfigImpl
and DatagramSessionConfigImpl have been renamed according to the above.
And DefaultDatagramSessionConfig has been moved up from the support
package. Finally, VmPipeSessionConfig and DefaultVmPipeSessionConfig
have been added for the vmpipe transport.

Please have a quick look at it and let me know what you think.

-- 
Niklas Therning
www.spamdrain.net


Re: svn commit: r478186 - in /mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio: ./ support/

Posted by Trustin Lee <tr...@gmail.com>.
On 11/23/06, Niklas Therning <ni...@trillian.se> wrote:
>
> Trustin Lee wrote:
> > Shouldn't setSessionConfig() be in IoService rather than in each
> > IoService
> > implementations?  We could provide implementation classes such as
> > DefaultSocketSessionConfig and DefaultDatagramSessionConfig.
> >
> > Trustin
> The reason why I didn't add it to the IoService interface is that it
> wouldn't be type safe. And I can't imagine when you would want to call
> setSessionConfig() on an IoService reference without knowing the
> concrete type (SocketConnector, SocketAcceptor, etc) of that IoService.
> Also, there is no SessionConfig for vmpipe transport so it wouldn't make
> any sense to have it for that transport (at least not now when there's
> nothing to configure for vmpipe sessions).


Someone might have received the configuration object and acceptor instance
(not knowing it's implementation) from other party.  In this case,
setSessionConfig() should be provided at least in IoAcceptor/Connector
level, and if setSessionConfig() should exist in both interfaces, then it
would be better to have it in IoService.  But I'm not sure this situation is
practically possible.  It might be useless as you mentioned.

But, I can change it, no problem. It would be more symmetric, since
> there's already a getSessionConfig() in the interface. Then we need to
> do the type check at runtime and we should maybe also provide a
> VmPipeSessionConfig interface (which will be empty for now) for
> consistency, right?


Right.

DefaultSocketSessionConfig etc would be good. Maybe we should just
> rename SocketSessionConfingImpl and DatagramSessionConfigImpl?


Yep. :)

Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP key fingerprints:
* E167 E6AF E73A CBCE EE41  4A29 544D DE48 FE95 4E7E
* B693 628E 6047 4F8F CFA4  455E 1C62 A7DC 0255 ECA6

Re: svn commit: r478186 - in /mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio: ./ support/

Posted by Niklas Therning <ni...@trillian.se>.
Trustin Lee wrote:
> Shouldn't setSessionConfig() be in IoService rather than in each
> IoService
> implementations?  We could provide implementation classes such as
> DefaultSocketSessionConfig and DefaultDatagramSessionConfig.
>
> Trustin
The reason why I didn't add it to the IoService interface is that it
wouldn't be type safe. And I can't imagine when you would want to call
setSessionConfig() on an IoService reference without knowing the
concrete type (SocketConnector, SocketAcceptor, etc) of that IoService.
Also, there is no SessionConfig for vmpipe transport so it wouldn't make
any sense to have it for that transport (at least not now when there's
nothing to configure for vmpipe sessions).

But, I can change it, no problem. It would be more symmetric, since
there's already a getSessionConfig() in the interface. Then we need to
do the type check at runtime and we should maybe also provide a
VmPipeSessionConfig interface (which will be empty for now) for
consistency, right?

DefaultSocketSessionConfig etc would be good. Maybe we should just
rename SocketSessionConfingImpl and DatagramSessionConfigImpl?

-- 
Niklas Therning
www.spamdrain.net


Re: svn commit: r478186 - in /mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio: ./ support/

Posted by Trustin Lee <tr...@gmail.com>.
Shouldn't setSessionConfig() be in IoService rather than in each IoService
implementations?  We could provide implementation classes such as
DefaultSocketSessionConfig and DefaultDatagramSessionConfig.

Trustin

On 11/23/06, niklas@apache.org <ni...@apache.org> wrote:
>
> Author: niklas
> Date: Wed Nov 22 07:10:49 2006
> New Revision: 478186
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=478186
> Log:
> Added setSessionConfig(...) methods to acceptors and connectors for the
> datagram and socket transports.
>
> Modified:
>
>     mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramAcceptor.java
>
>     mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramConnector.java
>
>     mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/SocketAcceptor.java
>
>     mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/SocketConnector.java
>
>     mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java
>
>     mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorDelegate.java
>
> Modified:
> mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramAcceptor.java
> URL:
> http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramAcceptor.java?view=diff&rev=478186&r1=478185&r2=478186
>
> ==============================================================================
> ---
> mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramAcceptor.java
> (original)
> +++
> mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramAcceptor.java
> Wed Nov 22 07:10:49 2006
> @@ -62,4 +62,15 @@
>      {
>          ( ( DatagramAcceptorDelegate ) delegate ).setSessionRecycler(
> sessionRecycler );
>      }
> +
> +    /**
> +     * Sets the {@link DatagramSessionConfig} this acceptor will use for
> new sessions.
> +     *
> +     * @param sessionConfig the config.
> +     * @throws NullPointerException if the specified value is
> <code>null</code>.
> +     */
> +    public void setSessionConfig( DatagramSessionConfig sessionConfig )
> +    {
> +        ( ( DatagramAcceptorDelegate ) delegate ).setSessionConfig(
> sessionConfig );
> +    }
> }
>
> Modified:
> mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramConnector.java
> URL:
> http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramConnector.java?view=diff&rev=478186&r1=478185&r2=478186
>
> ==============================================================================
> ---
> mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramConnector.java
> (original)
> +++
> mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramConnector.java
> Wed Nov 22 07:10:49 2006
> @@ -62,4 +62,15 @@
>      {
>          ( ( DatagramConnectorDelegate ) delegate ).setSessionRecycler(
> sessionRecycler );
>      }
> +
> +    /**
> +     * Sets the {@link DatagramSessionConfig} this connector will use for
> new sessions.
> +     *
> +     * @param sessionConfig the config.
> +     * @throws NullPointerException if the specified value is
> <code>null</code>.
> +     */
> +    public void setSessionConfig( DatagramSessionConfig sessionConfig )
> +    {
> +        ( ( DatagramConnectorDelegate ) delegate ).setSessionConfig(
> sessionConfig );
> +    }
> }
>
> Modified:
> mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/SocketAcceptor.java
> URL:
> http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/SocketAcceptor.java?view=diff&rev=478186&r1=478185&r2=478186
>
> ==============================================================================
> ---
> mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/SocketAcceptor.java
> (original)
> +++
> mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/SocketAcceptor.java
> Wed Nov 22 07:10:49 2006
> @@ -148,6 +148,21 @@
>      }
>
>      /**
> +     * Sets the {@link SocketSessionConfig} this acceptor will use for
> new sessions.
> +     *
> +     * @param sessionConfig the config.
> +     * @throws NullPointerException if the specified value is
> <code>null</code>.
> +     */
> +    public void setSessionConfig( SocketSessionConfig sessionConfig )
> +    {
> +        if( sessionConfig == null )
> +        {
> +            throw new NullPointerException( "sessionConfig" );
> +        }
> +        this.sessionConfig = sessionConfig;
> +    }
> +
> +    /**
>       * @see ServerSocket#getReuseAddress()
>       */
>      public boolean isReuseAddress()
>
> Modified:
> mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/SocketConnector.java
> URL:
> http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/SocketConnector.java?view=diff&rev=478186&r1=478185&r2=478186
>
> ==============================================================================
> ---
> mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/SocketConnector.java
> (original)
> +++
> mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/SocketConnector.java
> Wed Nov 22 07:10:49 2006
> @@ -116,6 +116,21 @@
>      }
>
>      /**
> +     * Sets the {@link SocketSessionConfig} this connector will use for
> new sessions.
> +     *
> +     * @param sessionConfig the config.
> +     * @throws NullPointerException if the specified value is
> <code>null</code>.
> +     */
> +    public void setSessionConfig( SocketSessionConfig sessionConfig )
> +    {
> +        if( sessionConfig == null )
> +        {
> +            throw new NullPointerException( "sessionConfig" );
> +        }
> +        this.sessionConfig = sessionConfig;
> +    }
> +
> +       /**
>       * How many seconds to keep the connection thread alive between
> connection requests
>       *
>       * @return Number of seconds to keep connection thread alive
>
> Modified:
> mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java
> URL:
> http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java?view=diff&rev=478186&r1=478185&r2=478186
>
> ==============================================================================
> ---
> mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java
> (original)
> +++
> mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java
> Wed Nov 22 07:10:49 2006
> @@ -57,7 +57,7 @@
>      private static volatile int nextId = 0;
>
>      private IoSessionRecycler sessionRecycler = DEFAULT_RECYCLER;
> -    private final IoSessionConfig sessionConfig = new
> DatagramSessionConfigImpl();
> +    private IoSessionConfig sessionConfig = new
> DatagramSessionConfigImpl();
>
>      private final IoAcceptor wrapper;
>      private final Executor executor;
> @@ -244,6 +244,21 @@
>          return sessionConfig;
>      }
>
> +    /**
> +     * Sets the {@link DatagramSessionConfig} this acceptor will use for
> new sessions.
> +     *
> +     * @param sessionConfig the config.
> +     * @throws NullPointerException if the specified value is
> <code>null</code>.
> +     */
> +    public void setSessionConfig( DatagramSessionConfig sessionConfig )
> +    {
> +        if( sessionConfig == null )
> +        {
> +            throw new NullPointerException( "sessionConfig" );
> +        }
> +        this.sessionConfig = sessionConfig;
> +    }
> +
>      public IoServiceListenerSupport getListeners()
>      {
>          return super.getListeners();
>
> Modified:
> mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorDelegate.java
> URL:
> http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorDelegate.java?view=diff&rev=478186&r1=478185&r2=478186
>
> ==============================================================================
> ---
> mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorDelegate.java
> (original)
> +++
> mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorDelegate.java
> Wed Nov 22 07:10:49 2006
> @@ -59,7 +59,7 @@
>      private static volatile int nextId = 0;
>
>      private IoSessionRecycler sessionRecycler = DEFAULT_RECYCLER;
> -    private final IoSessionConfig sessionConfig = new
> DatagramSessionConfigImpl();
> +    private IoSessionConfig sessionConfig = new
> DatagramSessionConfigImpl();
>
>      private final IoConnector wrapper;
>      private final Executor executor;
> @@ -181,6 +181,21 @@
>          return sessionConfig;
>      }
>
> +    /**
> +     * Sets the {@link DatagramSessionConfig} this connector will use for
> new sessions.
> +     *
> +     * @param sessionConfig the config.
> +     * @throws NullPointerException if the specified value is
> <code>null</code>.
> +     */
> +    public void setSessionConfig( DatagramSessionConfig sessionConfig )
> +    {
> +        if( sessionConfig == null )
> +        {
> +            throw new NullPointerException( "sessionConfig" );
> +        }
> +        this.sessionConfig = sessionConfig;
> +    }
> +
>      private synchronized void startupWorker() throws IOException
>      {
>          if( worker == null )
>
>
>


-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP key fingerprints:
* E167 E6AF E73A CBCE EE41  4A29 544D DE48 FE95 4E7E
* B693 628E 6047 4F8F CFA4  455E 1C62 A7DC 0255 ECA6