2006/1/26, peter royal <[EMAIL PROTECTED]>:
Thanks! :)
It's because IoSessionConfigs are shared by both IoSession implementations and IoServiceConfig implementations. For example, SocketAcceptorConfig.getSessionConfig() and SocketSessionImpl.getConfig() will return SocketSessionConfig. The former won't throw any exception until a new session is created because it just contains the default values of the new sessions. The latter will throw SocketException because it *really* modifies socket parameters. I just wrapped SocketException with RuntimeIOException because the SocketException is rarely thrown for convenience. Does this make sense?
Thanks,
TrustinI like this change! Very nice!
Thanks! :)
One issue, why do you need to wrap exceptions in SocketSessionImpl in
the RuntimeIOException.. why not just have the SocketSessionConfig
interface declare to throw the exception when necessary? Seems like
unnecessary wrapping to me.
It's because IoSessionConfigs are shared by both IoSession implementations and IoServiceConfig implementations. For example, SocketAcceptorConfig.getSessionConfig() and SocketSessionImpl.getConfig() will return SocketSessionConfig. The former won't throw any exception until a new session is created because it just contains the default values of the new sessions. The latter will throw SocketException because it *really* modifies socket parameters. I just wrapped SocketException with RuntimeIOException because the SocketException is rarely thrown for convenience. Does this make sense?
Thanks,
--
what we call human nature is actually human habit
--
http://gleamynode.net/
PGP Key ID: 0x854B996C
