]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.message/src/org/simantics/message/ILogger.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.message / src / org / simantics / message / ILogger.java
1 /*******************************************************************************\r
2  * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
3  * in Industry THTH ry.\r
4  * All rights reserved. This program and the accompanying materials\r
5  * are made available under the terms of the Eclipse Public License v1.0\r
6  * which accompanies this distribution, and is available at\r
7  * http://www.eclipse.org/legal/epl-v10.html\r
8  *\r
9  * Contributors:\r
10  *     VTT Technical Research Centre of Finland - initial API and implementation\r
11  *******************************************************************************/\r
12 package org.simantics.message;\r
13 \r
14 import org.eclipse.core.runtime.IStatus;\r
15 \r
16 /**\r
17  * A log to which status events can be written. Logs appear on individual\r
18  * plug-ins and on the platform itself. Clients can register log listeners which\r
19  * will receive notification of all log events as they come in.\r
20  * \r
21  * @author Tuukka Lehtonen\r
22  * @noimplement This interface is not intended to be implemented by clients.\r
23  */\r
24 public interface ILogger {\r
25 \r
26     /**\r
27      * Adds the given log listener to this log.  Subsequently the log listener will\r
28      * receive notification of all log events passing through this log.\r
29      * This method has no affect if the identical listener is already registered on this log.\r
30      *\r
31      * @param listener the listener to add to this log\r
32      */\r
33     public void addLogListener(ILogListener listener);\r
34 \r
35     /**\r
36      * Returns an identifier name for this log.\r
37      *\r
38      * @return the identifier name for this log\r
39      */\r
40     public String getName();\r
41 \r
42     /**\r
43      * Logs the given status.  The status is distributed to the log listeners\r
44      * installed on this log and then to the log listeners installed on the platform.\r
45      *\r
46      * @param status the status to log\r
47      */\r
48     public void log(IStatus status);\r
49 \r
50     /**\r
51      * Removes the given log listener to this log.  Subsequently the log listener will\r
52      * no longer receive notification of log events passing through this log.  \r
53      * This method has no affect if the identical listener is not registered on this log.\r
54      *\r
55      * @param listener the listener to remove\r
56      */\r
57     public void removeLogListener(ILogListener listener);\r
58 \r
59 }\r