Coverage Report - org.apache.camel.component.irc.IrcErrorLogger
 
Classes in this File Line Coverage Branch Coverage Complexity
IrcErrorLogger
0% 
N/A 
0
 
 1  
 /**
 2  
  * Licensed to the Apache Software Foundation (ASF) under one or more
 3  
  * contributor license agreements.  See the NOTICE file distributed with
 4  
  * this work for additional information regarding copyright ownership.
 5  
  * The ASF licenses this file to You under the Apache License, Version 2.0
 6  
  * (the "License"); you may not use this file except in compliance with
 7  
  * the License.  You may obtain a copy of the License at
 8  
  *
 9  
  *      http://www.apache.org/licenses/LICENSE-2.0
 10  
  *
 11  
  * Unless required by applicable law or agreed to in writing, software
 12  
  * distributed under the License is distributed on an "AS IS" BASIS,
 13  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 14  
  * See the License for the specific language governing permissions and
 15  
  * limitations under the License.
 16  
  */
 17  
 package org.apache.camel.component.irc;
 18  
 
 19  
 import org.apache.commons.logging.Log;
 20  
 import org.schwering.irc.lib.IRCEventAdapter;
 21  
 import org.schwering.irc.lib.IRCModeParser;
 22  
 import org.schwering.irc.lib.IRCUser;
 23  
 
 24  
 /**
 25  
  * A helper class which logs errors
 26  
  *
 27  
  * @version $Revision: 1.1 $
 28  
  */
 29  
 public class IrcErrorLogger extends IRCEventAdapter {
 30  
     private Log log;
 31  
 
 32  0
     public IrcErrorLogger(Log log) {
 33  0
         this.log = log;
 34  0
     }
 35  
 
 36  
     @Override
 37  
     public void onRegistered() {
 38  0
         super.onRegistered();
 39  0
         log.info("onRegistered");
 40  0
     }
 41  
 
 42  
     @Override
 43  
     public void onDisconnected() {
 44  0
         super.onDisconnected();
 45  0
         log.info("onDisconnected");
 46  0
     }
 47  
 
 48  
     @Override
 49  
     public void onMode(String string, IRCUser ircUser, IRCModeParser ircModeParser) {
 50  0
         super.onMode(string, ircUser, ircModeParser);
 51  0
         log.info("onMode.string = " + string);
 52  0
         log.info("onMode.ircUser = " + ircUser);
 53  0
         log.info("onMode.ircModeParser = " + ircModeParser);
 54  0
     }
 55  
 
 56  
     @Override
 57  
     public void onMode(IRCUser ircUser, String string, String string1) {
 58  0
         super.onMode(ircUser, string, string1);
 59  0
         log.info("onMode.ircUser = " + ircUser);
 60  0
         log.info("onMode.string = " + string);
 61  0
         log.info("onMode.string1 = " + string1);
 62  0
     }
 63  
 
 64  
     @Override
 65  
     public void onPing(String string) {
 66  0
         super.onPing(string);
 67  0
         log.info("onPing.string = " + string);
 68  0
     }
 69  
 
 70  
     @Override
 71  
     public void onError(String string) {
 72  0
         log.info("onError.string = " + string);
 73  0
     }
 74  
 
 75  
     @Override
 76  
     public void onError(int i, String string) {
 77  0
         super.onError(i, string);
 78  0
         log.error("onError.i = " + i);
 79  0
         log.error("onError.string = " + string);
 80  0
     }
 81  
 
 82  
     @Override
 83  
     public void unknown(String string, String string1, String string2, String string3) {
 84  0
         super.unknown(string, string1, string2, string3);
 85  0
         log.error("unknown.string = " + string);
 86  0
         log.error("unknown.string1 = " + string1);
 87  0
         log.error("unknown.string2 = " + string2);
 88  0
         log.error("unknown.string3 = " + string3);
 89  0
     }
 90  
 }