[ 
https://issues.apache.org/jira/browse/CAMEL-3351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12969154#action_12969154
 ] 

Tracy Snell edited comment on CAMEL-3351 at 12/7/10 9:42 PM:
-------------------------------------------------------------

I got carried away and made several changes and fixed a minor bug. Here are my 
notes:



IrcComponent:

- Removed IrcConfiguration member variable. Didn't make sense. Removed 
constructor with IrcConfiguration as the param.
- ircLogger moved to method.

IrcProducer:
- Changed doStart to call component.joinChannels instead of doing it in the 
start method. Ditto for IrcConsumer
  removing dupe code.
- Check to see if we're still connected before sending a message in process. If 
disconnected throw a RuntimeCamelException.
- Removed unused imports
- Add a listener so we can get error messages
- Change listener type from FilteredIRCEventAdapter to IRCEventAdapter and 
added getter/setter for easier testing
- doStop didn't remove the listener fixed. Added. This would've caused an NPE 
if a user was stopping individual routes.


IrcConsumer:
- Changed doStart to call component.joinChannels instead of doing it in the 
start method. 
- Removed unused imports
- Added check in onKick to see if we got kicked and rejoin if so
- Change listener type from FilteredIRCEventAdapter to IRCEventAdapter and 
added getter/setter for easier testing


IrcEndpoint:
- Extracted method getExchange. Same 2 lines of code in 9 methods. Slightly 
cleaner this way.
- Added handleIrcError to handle any IRC errors that the producer or consumer 
hit
- Added handleNickInUse to handle nick in use errors. On endpoint startup this 
would cause a failed connection. For the Consumer this would just mean we'd 
never consume anything. For the Producer sends would throw an NPE (now there's 
a check for a valid connection and RuntimeCamelException is thrown instead)
- Added method joinChannels
- Added method joinChannel


IrcConfiguration
- Add autoRejoin setting
- Changed key storage to a Dictionary.

Added several new tests using mockito




      was (Author: tjsnell):
    I got carried away and made several changes and fixed a minor bug. Here are 
my notes:



IrcComponent:


- Removed IrcConfiguration member variable. Didn't make sense. Removed 
constructor with IrcConfiguration as the param.
- ircLogger moved to method.




IrcProducer:
- Changed doStart to call component.joinChannels instead of doing it in the 
start method. Ditto for IrcConsumer
  removing dupe code.
- Check to see if we're still connected before sending a message in process. If 
disconnected throw a RuntimeCamelException.
- Removed unused imports
- Add a listener so we can get error messages
- Change listener type from FilteredIRCEventAdapter to IRCEventAdapter and 
added getter/setter for easier testing
- doStop didn't remove the listener fixed. Added. This would've caused an NPE 
if a user was stopping individual routes.


IrcConsumer:
- Changed doStart to call component.joinChannels instead of doing it in the 
start method. 
- Removed unused imports
- Added check in onKick to see if we got kicked and rejoin if so
- Change listener type from FilteredIRCEventAdapter to IRCEventAdapter and 
added getter/setter for easier testing


IrcEndpoint:
- Extracted method getExchange. Same 2 lines of code in 9 methods. Slightly 
cleaner this way.
- Added handleIrcError to handle any IRC errors that the producer or consumer 
hit
- Added handleNickInUse to handle nick in use errors. On endpoint startup this 
would cause a failed connection. For the Consumer this would just mean we'd 
never consume anything. For the Producer sends would throw an NPE (now there's 
a check for a valid connection and RuntimeCamelException is thrown instead)
- Added method joinChannels
- Added method joinChannel


IrcConfiguration
- Add autoRejoin setting
- Changed key storage to a Dictionary.



  
> camel-irc component silently fails on nick collision
> ----------------------------------------------------
>
>                 Key: CAMEL-3351
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3351
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-irc
>    Affects Versions: 2.5.0
>            Reporter: Tracy Snell
>            Assignee: Tracy Snell
>            Priority: Minor
>         Attachments: patchfile.txt
>
>
> When the camel-irc component connects to an irc server and there's a nick 
> collision it silently fails. Also note there is no camel-irc component in 
> Jira.

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

Reply via email to