X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.db%2Fsrc%2Forg%2Fsimantics%2Fdb%2Fservice%2FEventSupport.java;fp=bundles%2Forg.simantics.db%2Fsrc%2Forg%2Fsimantics%2Fdb%2Fservice%2FEventSupport.java;h=7d7995b44625a9f49f04361a02147aa3d736db50;hp=0000000000000000000000000000000000000000;hb=090aaaa7349a99f59b70cd1fbcdd08c270aca2a2;hpb=b3e3a3bce47f28aaf7b47311f2b5e0c715501291 diff --git a/bundles/org.simantics.db/src/org/simantics/db/service/EventSupport.java b/bundles/org.simantics.db/src/org/simantics/db/service/EventSupport.java new file mode 100644 index 000000000..7d7995b44 --- /dev/null +++ b/bundles/org.simantics.db/src/org/simantics/db/service/EventSupport.java @@ -0,0 +1,37 @@ +/******************************************************************************* + * Copyright (c) 2019 Association for Decentralized Information Management + * in Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Semantum Oy - initial API and implementation + *******************************************************************************/ +package org.simantics.db.service; + +/** + * Interface for listening DB events. + * + * Note: At the moment, only "purge" is supported. + * + * @author luukkainen + * + */ +public interface EventSupport { + + public void addListener(EventListener l); + + public void removeListener(EventListener l); + + + public interface EventListener extends java.util.EventListener { + /** + * + * @param type Type of the event. + * @param data Data related to the event, may be null. + */ + public void event(String type, Object data); + } +}