KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > slide > util > event > EventLogger


1 package org.apache.slide.util.event;
2
3 import org.apache.slide.event.GlobalListener;
4 import org.apache.slide.event.VetoException;
5 import org.apache.slide.event.VetoableEventMethod;
6 import org.apache.slide.event.EventMethod;
7 import org.apache.slide.common.Domain;
8 import org.apache.slide.util.logger.Logger;
9
10 import java.util.EventObject JavaDoc;
11
12 /*
13  * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/util/event/EventLogger.java,v 1.1 2004/02/11 12:58:31 ozeigermann Exp $
14  * $Revision: 1.1 $
15  * $Date: 2004/02/11 12:58:31 $
16  *
17  * ====================================================================
18  *
19  * Copyright 1999-2004 The Apache Software Foundation
20  *
21  * Licensed under the Apache License, Version 2.0 (the "License");
22  * you may not use this file except in compliance with the License.
23  * You may obtain a copy of the License at
24  *
25  * http://www.apache.org/licenses/LICENSE-2.0
26  *
27  * Unless required by applicable law or agreed to in writing, software
28  * distributed under the License is distributed on an "AS IS" BASIS,
29  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
30  * See the License for the specific language governing permissions and
31  * limitations under the License.
32  *
33  */

34
35 public class EventLogger implements GlobalListener {
36     protected static final String JavaDoc LOG_CHANNEL = EventLogger.class.getName();
37
38     public void vetoableEventFired(VetoableEventMethod method, EventObject JavaDoc event) throws VetoException {
39         Domain.log("Recieved vetoable event with name '"+method.getId()+"': "+event, LOG_CHANNEL, Logger.INFO);
40     }
41
42     public void eventFired(EventMethod method, EventObject JavaDoc event) {
43         Domain.log("Recieved event with name '"+method.getId()+"': "+event, LOG_CHANNEL, Logger.INFO);
44     }
45 }
Popular Tags