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