You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Haug Bürger (JIRA)" <ji...@apache.org> on 2009/11/02 17:00:59 UTC
[jira] Created: (DIRMINA-745) IoServiceListener inconsistent
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.
[jira] Resolved: (DIRMINA-745) IoServiceListener inconsistent
Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRMINA-745?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Emmanuel Lecharny resolved DIRMINA-745.
---------------------------------------
Resolution: Not A Problem
There is a major difference between an Acceptor and a Connector.
When you are using a connector, you are interested to be informed when the connection has been established, everything else is quite irrelevant.
When you set up a server, at some point, you want to know that the acceptor is ready to receive incoming connection. This is the reason why the listener is invoked at this moment.
> 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.
[jira] Commented: (DIRMINA-745) IoServiceListener inconsistent
Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
[ 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.