]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.common/src/org/simantics/db/common/procedure/wrapper/SyncToAsyncMultiListener.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.db.common / src / org / simantics / db / common / procedure / wrapper / SyncToAsyncMultiListener.java
index c782bb3a966bee0532923f9866592199c397ecf0..d22cb550fbc024603a149bbc278cbfca60e0f068 100644 (file)
@@ -1,75 +1,75 @@
-/*******************************************************************************\r
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
- * in Industry THTH ry.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- *     VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
-package org.simantics.db.common.procedure.wrapper;\r
-\r
-import org.simantics.db.AsyncReadGraph;\r
-import org.simantics.db.ReadGraph;\r
-import org.simantics.db.common.request.ReadRequest;\r
-import org.simantics.db.exception.DatabaseException;\r
-import org.simantics.db.procedure.AsyncMultiListener;\r
-import org.simantics.db.procedure.SyncMultiListener;\r
-\r
-final public class SyncToAsyncMultiListener<T> implements AsyncMultiListener<T> {\r
-\r
-       final private SyncMultiListener<T> procedure;\r
-\r
-       public SyncToAsyncMultiListener(SyncMultiListener<T> procedure) {\r
-               this.procedure = procedure;\r
-       }\r
-       \r
-       @Override\r
-       final public void execute(AsyncReadGraph graph, final T result) {\r
-               graph.asyncRequest(new ReadRequest() {\r
-\r
-                       @Override\r
-                       public void run(ReadGraph graph) throws DatabaseException {\r
-                               procedure.execute(graph, result);\r
-                       }\r
-                       \r
-               });\r
-       }\r
-\r
-       @Override\r
-       final public void finished(AsyncReadGraph graph) {\r
-               graph.asyncRequest(new ReadRequest() {\r
-\r
-                       @Override\r
-                       public void run(ReadGraph graph) throws DatabaseException {\r
-                               procedure.finished(graph);\r
-                       }\r
-                       \r
-               });\r
-       }\r
-\r
-       @Override\r
-       final public void exception(AsyncReadGraph graph, final Throwable t) {\r
-        graph.asyncRequest(new ReadRequest() {\r
-\r
-            @Override\r
-            public void run(ReadGraph graph) throws DatabaseException {\r
-                procedure.exception(graph, t);\r
-            }\r
-            \r
-        });\r
-       }\r
-\r
-    @Override\r
-    public boolean isDisposed() {\r
-        return procedure.isDisposed();\r
-    }\r
-\r
-    @Override\r
-    public String toString() {\r
-        return "SyncToAsyncMultiListener -> " + procedure;\r
-   }\r
-    \r
-}\r
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 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:
+ *     VTT Technical Research Centre of Finland - initial API and implementation
+ *******************************************************************************/
+package org.simantics.db.common.procedure.wrapper;
+
+import org.simantics.db.AsyncReadGraph;
+import org.simantics.db.ReadGraph;
+import org.simantics.db.common.request.ReadRequest;
+import org.simantics.db.exception.DatabaseException;
+import org.simantics.db.procedure.AsyncMultiListener;
+import org.simantics.db.procedure.SyncMultiListener;
+
+final public class SyncToAsyncMultiListener<T> implements AsyncMultiListener<T> {
+
+       final private SyncMultiListener<T> procedure;
+
+       public SyncToAsyncMultiListener(SyncMultiListener<T> procedure) {
+               this.procedure = procedure;
+       }
+       
+       @Override
+       final public void execute(AsyncReadGraph graph, final T result) {
+               graph.asyncRequest(new ReadRequest() {
+
+                       @Override
+                       public void run(ReadGraph graph) throws DatabaseException {
+                               procedure.execute(graph, result);
+                       }
+                       
+               });
+       }
+
+       @Override
+       final public void finished(AsyncReadGraph graph) {
+               graph.asyncRequest(new ReadRequest() {
+
+                       @Override
+                       public void run(ReadGraph graph) throws DatabaseException {
+                               procedure.finished(graph);
+                       }
+                       
+               });
+       }
+
+       @Override
+       final public void exception(AsyncReadGraph graph, final Throwable t) {
+        graph.asyncRequest(new ReadRequest() {
+
+            @Override
+            public void run(ReadGraph graph) throws DatabaseException {
+                procedure.exception(graph, t);
+            }
+            
+        });
+       }
+
+    @Override
+    public boolean isDisposed() {
+        return procedure.isDisposed();
+    }
+
+    @Override
+    public String toString() {
+        return "SyncToAsyncMultiListener -> " + procedure;
+   }
+    
+}