You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Emmanuel Lecharny (JIRA)" <ji...@apache.org> on 2010/01/14 19:33:54 UTC

[jira] Commented: (DIRMINA-745) IoServiceListener inconsistent

    [ https://issues.apache.org/jira/browse/DIRMINA-745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12800292#action_12800292 ] 

Emmanuel Lecharny commented on DIRMINA-745:
-------------------------------------------

I would add that it's quite easy to discover if a service is client or server based :

if ( service instanceof IoConnector) {
  // This is a client
} else {
  // this is a server
}

> IoServiceListener inconsistent
> ------------------------------
>
>                 Key: DIRMINA-745
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-745
>             Project: MINA
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.0-RC1
>            Reporter: Haug Bürger
>
> The IoService is the base class/interface for SocketAcceptor and SocketConnector. I can add the same listener to both of them. The issue is that the listener method are called at different times.
> SocketConnector:
> Nothing is called until a connection is established.
> SocketAcceptor:
> serviceActivated() is called as soon as the service is started, there is no connection.
> What is the abstraction? What is a service with a client connection? How can I write code that doesn't know if the IoService is client or server based?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.