You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Trustin Lee <tr...@gmail.com> on 2007/08/14 16:17:33 UTC

[IMPORTANT] Big changes in trunk

Hi community,

Today, I made big changes in trunk.  The following is the summarized
list of the changes:

Changes visible to users:
=========================
The following changes will affect MINA-based application code
directly.  They are mostly renaming, so simple replace operation will
fix most compilation errors.

* Renamed TransportType to IoServiceMetadata because it stands what it
does more precisely.
* Added IoServiceMetadata.hasFragmentation()
* Removed static fields in IoServiceMetadata which caused bad coupling
* Removed IoSession.getTransportType() because IoServiceMetadata can
be retrieved via IoSession.getService().getMetadata()
* Renamed ExpiringSessionRecycler to ExpiringIoSessionRecycler to get
aligned with its parent name: IoSessionRecycler
* Renamed SessionLog to IoSessionLogger to make its name get aligned
with IoSession type and SLF4J Logger type

Changes not visible to most users:
==================================
These are somewhat internal changes, which is often used to create a
new transport.

* Removed all cyclic dependencies except for test code.
* All classes in *.support package have been moved to its parent
class, and they became package-private.
* Renamed Base* to Abstract* which sounds more familiar to most developers
* Renamed DelegatedIoAcceptor to IoAcceptorWrapper and
DelegatedIoConnector to IoConnectorWrapper respectively
* Renamed SessionIdleStatusChecker to IdleStatusChecker to make its
name get aligned with IdleStatus type
* Renamed SimpleProtocolEncoderOutput to AbstractProtocolEncoderOutput
* Renamed SimpleProtocolDecoderOutput to AbstractProtocolDecoderOutput
* Simplified AbstractProtocolDecoderOutput so anyone can extend it,
and moved complicated part to ProtocolCodecFilter

All the changes above make good sense IMHO, but please let me know if
I made any mistake.  I will revert back very quickly.

Additionally, I'd like to make the following change tomorrow morning:

* IoServiceMetadata.getEnvelopeType() needs to be replaced with
getEnvelopedTypes() which returns a set of classes (i.e.
Set<Class<?>>), because the socket transport can understand two
envelope types now; ByteBuffer and FileRegion.

Thanks,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Re: [IMPORTANT] Big changes in trunk

Posted by peter royal <pr...@apache.org>.
On Aug 14, 2007, at 7:17 AM, Trustin Lee wrote:
> All the changes above make good sense IMHO, but please let me know if
> I made any mistake.  I will revert back very quickly.

Looks good! (aside from naming nit raised in response to that  
specific commit)

-pete


-- 
proyal@apache.org - http://fotap.org/~osi




Re: [IMPORTANT] Big changes in trunk

Posted by Julien Vermillard <jv...@archean.fr>.
On Tue, 14 Aug 2007 23:17:33 +0900
"Trustin Lee" <tr...@gmail.com> wrote:

> Hi community,
> 
> Today, I made big changes in trunk.  The following is the summarized

Seen that, totally broken my sandbox :)
> list of the changes:
>
> Changes visible to users:
> =========================
> The following changes will affect MINA-based application code
> directly.  They are mostly renaming, so simple replace operation will
> fix most compilation errors.
> 
> * Renamed TransportType to IoServiceMetadata because it stands what it
> does more precisely.

Why not, the TransportType class role wasn't very clear anyway.

> * Added IoServiceMetadata.hasFragmentation()

Good idea.

> * Removed static fields in IoServiceMetadata which caused bad coupling

Nice change, it was a bit annoying to see all those hard-coded thing
when you try to add a new TransportType

> * Removed IoSession.getTransportType() because IoServiceMetadata can
> be retrieved via IoSession.getService().getMetadata()

Never seen it ;) Yes a good move, I don't think a IoService will mix
IoSession of different TransportType.

> * Renamed ExpiringSessionRecycler to ExpiringIoSessionRecycler to get
> aligned with its parent name: IoSessionRecycler
Smart move.
> * Renamed SessionLog to IoSessionLogger to make its name get aligned
> with IoSession type and SLF4J Logger type
Smart move.
> 
> Changes not visible to most users:
> ==================================
> These are somewhat internal changes, which is often used to create a
> new transport.
> 
> * Removed all cyclic dependencies except for test code.
> * All classes in *.support package have been moved to its parent
> class, and they became package-private.
> * Renamed Base* to Abstract* which sounds more familiar to most
> developers
> * Renamed DelegatedIoAcceptor to IoAcceptorWrapper and
> DelegatedIoConnector to IoConnectorWrapper respectively
> * Renamed SessionIdleStatusChecker to IdleStatusChecker to make its
> name get aligned with IdleStatus type
> * Renamed SimpleProtocolEncoderOutput to AbstractProtocolEncoderOutput
> * Renamed SimpleProtocolDecoderOutput to AbstractProtocolDecoderOutput
> * Simplified AbstractProtocolDecoderOutput so anyone can extend it,
> and moved complicated part to ProtocolCodecFilter
> 
> All the changes above make good sense IMHO, but please let me know if
> I made any mistake.  I will revert back very quickly.

That's sounding very good and it's mostly class name changes, so I
think the impact will be minimal. I'll try to test SerialConnector
asap since no automated was possible.

> 
> Additionally, I'd like to make the following change tomorrow morning:
> 
> * IoServiceMetadata.getEnvelopeType() needs to be replaced with
> getEnvelopedTypes() which returns a set of classes (i.e.
> Set<Class<?>>), because the socket transport can understand two
> envelope types now; ByteBuffer and FileRegion.

Will take a look for see if it can help me to add sendFile() support in
APRConnnector.

The list of change sound reasonable, since 2.0 is mainly an API rework.
Anyway it's not shocking me becasue for migrating user code from 1.X to
2.x you already needed to modify your code for incorporate the API
changes.

Julien