You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@mina.apache.org by mjkai <mj...@sina.com> on 2012/02/10 09:56:26 UTC

break or contiue

version 2.0.4
class  : org.apache.mina.core.polling.AbstractPollingIoAcceptor 
Method:private void processHandles(Iterator<H> handles) throws Exception 

        /**
         * This method will process new sessions for the Worker class.  All
         * keys that have had their status updates as per the Selector.selectedKeys()
         * method will be processed here.  Only keys that are ready to accept
         * connections are handled here.
         * <p/>
         * Session objects are created by making new instances of SocketSessionImpl
         * and passing the session object to the SocketIoProcessor class.
         */
        @SuppressWarnings("unchecked")
        private void processHandles(Iterator<H> handles) throws Exception {
            while (handles.hasNext()) {
                H handle = handles.next();
                handles.remove();
                // Associates a new created connection to a processor,
                // and get back a session
                S session = accept(processor, handle);
                
                if (session == null) {
                    break;
                }
                initSession(session, null, null);
                // add the session to the SocketIoProcessor
                session.getProcessor().add(session);
            }
        }



Question:  
                if (session == null) {
                    break;
                }

break?  continue?


2012-02-10 



maojk

Re: Re: break or contiue

Posted by mjkai <mj...@sina.com>.
hi:
i have create in JIRA.

https://issues.apache.org/jira/browse/DIRMINA-887 


2012-02-10 



mjkai 



发件人: Emmanuel Lécharny 
发送时间: 2012-02-10  18:43:45 
收件人: users 
抄送: 
主题: Re: break or contiue 
 
Le 2/10/12 9:56 AM, mjkai a écrit :
> version 2.0.4
> class  : org.apache.mina.core.polling.AbstractPollingIoAcceptor
> Method:private void processHandles(Iterator<H>  handles) throws Exception
>
>          /**
>           * This method will process new sessions for the Worker class.  All
>           * keys that have had their status updates as per the Selector.selectedKeys()
>           * method will be processed here.  Only keys that are ready to accept
>           * connections are handled here.
>           *<p/>
>           * Session objects are created by making new instances of SocketSessionImpl
>           * and passing the session object to the SocketIoProcessor class.
>           */
>          @SuppressWarnings("unchecked")
>          private void processHandles(Iterator<H>  handles) throws Exception {
>              while (handles.hasNext()) {
>                  H handle = handles.next();
>                  handles.remove();
>                  // Associates a new created connection to a processor,
>                  // and get back a session
>                  S session = accept(processor, handle);
>
>                  if (session == null) {
>                      break;
>                  }
>                  initSession(session, null, null);
>                  // add the session to the SocketIoProcessor
>                  session.getProcessor().add(session);
>              }
>          }
>
>
>
> Question:
>                  if (session == null) {
>                      break;
>                  }
>
> break?  continue?
Continue, most certainly... JIRA :)
Thanks !
-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com

Re: break or contiue

Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 2/10/12 9:56 AM, mjkai a écrit :
> version 2.0.4
> class  : org.apache.mina.core.polling.AbstractPollingIoAcceptor
> Method:private void processHandles(Iterator<H>  handles) throws Exception
>
>          /**
>           * This method will process new sessions for the Worker class.  All
>           * keys that have had their status updates as per the Selector.selectedKeys()
>           * method will be processed here.  Only keys that are ready to accept
>           * connections are handled here.
>           *<p/>
>           * Session objects are created by making new instances of SocketSessionImpl
>           * and passing the session object to the SocketIoProcessor class.
>           */
>          @SuppressWarnings("unchecked")
>          private void processHandles(Iterator<H>  handles) throws Exception {
>              while (handles.hasNext()) {
>                  H handle = handles.next();
>                  handles.remove();
>                  // Associates a new created connection to a processor,
>                  // and get back a session
>                  S session = accept(processor, handle);
>
>                  if (session == null) {
>                      break;
>                  }
>                  initSession(session, null, null);
>                  // add the session to the SocketIoProcessor
>                  session.getProcessor().add(session);
>              }
>          }
>
>
>
> Question:
>                  if (session == null) {
>                      break;
>                  }
>
> break?  continue?

Continue, most certainly... JIRA :)

Thanks !
-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com