blob: 3731c2816bba07d258015d3f0bdf1ae4a36e7be6 [file] [log] [blame]
Richard S. Hallf5931c12006-12-15 21:56:11 +00001/*
2 * $Header: /cvshome/build/org.osgi.service.log/src/org/osgi/service/log/LogListener.java,v 1.9 2006/06/16 16:31:49 hargrave Exp $
3 *
4 * Copyright (c) OSGi Alliance (2000, 2006). All Rights Reserved.
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * 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 */
18package org.osgi.service.log;
19
20import java.util.EventListener;
21
22/**
23 * Subscribes to <code>LogEntry</code> objects from the <code>LogReaderService</code>.
24 *
25 * <p>
26 * A <code>LogListener</code> object may be registered with the Log Reader Service
27 * using the <code>LogReaderService.addLogListener</code> method. After the
28 * listener is registered, the <code>logged</code> method will be called for each
29 * <code>LogEntry</code> object created. The <code>LogListener</code> object may be
30 * unregistered by calling the <code>LogReaderService.removeLogListener</code>
31 * method.
32 *
33 * @version $Revision: 1.9 $
34 * @see LogReaderService
35 * @see LogEntry
36 * @see LogReaderService#addLogListener(LogListener)
37 * @see LogReaderService#removeLogListener(LogListener)
38 */
39public interface LogListener extends EventListener {
40 /**
41 * Listener method called for each LogEntry object created.
42 *
43 * <p>
44 * As with all event listeners, this method should return to its caller as
45 * soon as possible.
46 *
47 * @param entry A <code>LogEntry</code> object containing log information.
48 * @see LogEntry
49 */
50 public void logged(LogEntry entry);
51}