]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.db/src/org/simantics/db/service/EventSupport.java
Fixed multiple issues causing dangling references to discarded queries
[simantics/platform.git] / bundles / org.simantics.db / src / org / simantics / db / service / EventSupport.java
1 /*******************************************************************************
2  * Copyright (c) 2019 Association for Decentralized Information Management
3  * in Industry THTH ry.
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  *     Semantum Oy - initial API and implementation
11  *******************************************************************************/
12 package org.simantics.db.service;
13
14 /**
15  * Interface for listening DB events.
16  * 
17  * Note: At the moment, only "purge" is supported.
18  * 
19  * @author luukkainen
20  *
21  */
22 public interface EventSupport {
23     
24     public void addListener(EventListener l);
25     
26     public void removeListener(EventListener l);
27
28     
29     public interface EventListener extends java.util.EventListener {
30         /**
31          * 
32          * @param type Type of the event.
33          * @param data Data related to the event, may be null.
34          */
35         public void event(String type, Object data);
36     }
37 }