1 /*******************************************************************************
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
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
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.db.common.processor;
14 import java.util.Collection;
16 import org.simantics.db.RequestProcessor;
17 import org.simantics.db.Resource;
18 import org.simantics.db.Session;
19 import org.simantics.db.exception.DatabaseException;
20 import org.simantics.db.procedure.AsyncListener;
21 import org.simantics.db.procedure.AsyncMultiListener;
22 import org.simantics.db.procedure.AsyncMultiProcedure;
23 import org.simantics.db.procedure.AsyncProcedure;
24 import org.simantics.db.procedure.Listener;
25 import org.simantics.db.procedure.MultiListener;
26 import org.simantics.db.procedure.MultiProcedure;
27 import org.simantics.db.procedure.Procedure;
28 import org.simantics.db.procedure.SyncListener;
29 import org.simantics.db.procedure.SyncMultiListener;
30 import org.simantics.db.procedure.SyncMultiProcedure;
31 import org.simantics.db.procedure.SyncProcedure;
32 import org.simantics.db.request.AsyncMultiRead;
33 import org.simantics.db.request.AsyncRead;
34 import org.simantics.db.request.DelayedWrite;
35 import org.simantics.db.request.DelayedWriteResult;
36 import org.simantics.db.request.ExternalRead;
37 import org.simantics.db.request.MultiRead;
38 import org.simantics.db.request.Read;
39 import org.simantics.db.request.ReadInterface;
40 import org.simantics.db.request.Write;
41 import org.simantics.db.request.WriteInterface;
42 import org.simantics.db.request.WriteOnly;
43 import org.simantics.db.request.WriteOnlyResult;
44 import org.simantics.db.request.WriteResult;
45 import org.simantics.utils.datastructures.Callback;
47 public class ProcessorBase implements RequestProcessor {
50 public <T> void asyncRequest(AsyncMultiRead<T> request, AsyncMultiProcedure<T> procedure) {
51 throw new UnsupportedOperationException();
55 public <T> void asyncRequest(AsyncRead<T> request, AsyncProcedure<T> procedure) {
56 throw new UnsupportedOperationException();
60 public void asyncRequest(Write request, Callback<DatabaseException> callback) {
61 throw new UnsupportedOperationException();
65 public void asyncRequest(DelayedWrite request, Callback<DatabaseException> callback) {
66 throw new UnsupportedOperationException();
70 public void asyncRequest(WriteOnly request, Callback<DatabaseException> callback) {
71 throw new UnsupportedOperationException();
75 public <T> Collection<T> syncRequest(AsyncMultiRead<T> request, final AsyncMultiProcedure<T> procedure) {
76 throw new UnsupportedOperationException();
80 public <T> T syncRequest(AsyncRead<T> request, final AsyncProcedure<T> procedure) {
81 throw new UnsupportedOperationException();
86 public void syncRequest(Write request) {
87 throw new UnsupportedOperationException();
91 public void syncRequest(WriteOnly request) {
92 throw new UnsupportedOperationException();
96 public Session getSession() {
97 throw new UnsupportedOperationException();
101 public <T> void asyncRequest(AsyncRead<T> request) {
102 throw new UnsupportedOperationException();
106 public <T> void asyncRequest(AsyncRead<T> request,
107 Procedure<T> procedure) {
108 throw new UnsupportedOperationException();
112 public <T> void asyncRequest(AsyncMultiRead<T> request) {
113 throw new UnsupportedOperationException();
117 public <T> void asyncRequest(AsyncMultiRead<T> request,
118 MultiProcedure<T> procedure) {
119 throw new UnsupportedOperationException();
123 public <T> T syncRequest(AsyncRead<T> request) {
124 throw new UnsupportedOperationException();
128 public <T> T syncRequest(AsyncRead<T> request,
129 Procedure<T> procedure) {
130 throw new UnsupportedOperationException();
134 public <T> Collection<T> syncRequest(AsyncMultiRead<T> request) {
135 throw new UnsupportedOperationException();
139 public <T> Collection<T> syncRequest(AsyncMultiRead<T> request,
140 MultiProcedure<T> procedure) {
141 throw new UnsupportedOperationException();
145 public <T> T syncRequest(Read<T> request) {
146 throw new UnsupportedOperationException();
150 public <T> T syncRequest(Read<T> request,
151 final AsyncProcedure<T> procedure) {
152 throw new UnsupportedOperationException();
156 public <T> void asyncRequest(Read<T> request) {
157 throw new UnsupportedOperationException();
161 public <T> void asyncRequest(Read<T> request,
162 AsyncProcedure<T> procedure) {
163 throw new UnsupportedOperationException();
167 public <T> T syncRequest(Read<T> request, Procedure<T> procedure) {
168 throw new UnsupportedOperationException();
172 public <T> Collection<T> syncRequest(final MultiRead<T> request) throws DatabaseException {
173 throw new UnsupportedOperationException();
177 public <T> Collection<T> syncRequest(MultiRead<T> request, AsyncMultiProcedure<T> procedure) {
178 throw new UnsupportedOperationException();
182 public <T> Collection<T> syncRequest(MultiRead<T> request, MultiProcedure<T> procedure) {
183 throw new UnsupportedOperationException();
187 public <T> void asyncRequest(Read<T> request, Procedure<T> procedure) {
188 throw new UnsupportedOperationException();
192 public <T> void asyncRequest(MultiRead<T> request) {
193 throw new UnsupportedOperationException();
197 public <T> void asyncRequest(MultiRead<T> request, AsyncMultiProcedure<T> procedure) {
198 throw new UnsupportedOperationException();
202 public <T> void asyncRequest(MultiRead<T> request, MultiProcedure<T> procedure) {
203 throw new UnsupportedOperationException();
207 public void asyncRequest(Write r) {
208 throw new UnsupportedOperationException();
212 public void asyncRequest(WriteOnly r) {
213 throw new UnsupportedOperationException();
217 public <T> T getService(Class<T> api) {
218 throw new UnsupportedOperationException();
222 public <T> T peekService(Class<T> api) {
223 throw new UnsupportedOperationException();
227 public boolean hasService(Class<?> api) {
228 throw new UnsupportedOperationException();
232 public <T> void registerService(Class<T> api, T service) {
233 throw new UnsupportedOperationException();
237 // public <T> T syncRequest(Read<T> arg0, AsyncListener<T> arg1) {
238 // throw new UnsupportedOperationException();
242 public <T> T syncRequest(Read<T> arg0, SyncListener<T> arg1) {
243 throw new UnsupportedOperationException();
247 public <T> T syncRequest(Read<T> arg0, Listener<T> arg1) {
248 throw new UnsupportedOperationException();
252 public <T> T syncRequest(Read<T> arg0, SyncProcedure<T> arg1) {
253 throw new UnsupportedOperationException();
257 public <T> T syncRequest(AsyncRead<T> arg0, AsyncListener<T> arg1) {
258 throw new UnsupportedOperationException();
262 public <T> T syncRequest(AsyncRead<T> arg0, SyncListener<T> arg1) {
263 throw new UnsupportedOperationException();
267 public <T> T syncRequest(AsyncRead<T> arg0, Listener<T> arg1) {
268 throw new UnsupportedOperationException();
272 public <T> T syncRequest(AsyncRead<T> arg0, SyncProcedure<T> arg1) {
273 throw new UnsupportedOperationException();
277 public <T> void asyncRequest(Read<T> arg0, AsyncListener<T> arg1) {
278 throw new UnsupportedOperationException();
282 public <T> void asyncRequest(Read<T> arg0, SyncListener<T> arg1) {
283 throw new UnsupportedOperationException();
287 public <T> void asyncRequest(Read<T> arg0, Listener<T> arg1) {
288 throw new UnsupportedOperationException();
292 public <T> void asyncRequest(Read<T> arg0, SyncProcedure<T> arg1) {
293 throw new UnsupportedOperationException();
297 public <T> void asyncRequest(AsyncRead<T> arg0, AsyncListener<T> arg1) {
298 throw new UnsupportedOperationException();
302 public <T> void asyncRequest(AsyncRead<T> arg0, SyncListener<T> arg1) {
303 throw new UnsupportedOperationException();
307 public <T> void asyncRequest(AsyncRead<T> arg0, Listener<T> arg1) {
308 throw new UnsupportedOperationException();
312 public <T> void asyncRequest(AsyncRead<T> arg0, SyncProcedure<T> arg1) {
313 throw new UnsupportedOperationException();
317 public <T> Collection<T> syncRequest(MultiRead<T> arg0, AsyncMultiListener<T> arg1) {
318 throw new UnsupportedOperationException();
322 public <T> Collection<T> syncRequest(MultiRead<T> arg0, SyncMultiListener<T> arg1) {
323 throw new UnsupportedOperationException();
327 public <T> Collection<T> syncRequest(MultiRead<T> arg0, MultiListener<T> arg1) {
328 throw new UnsupportedOperationException();
332 public <T> Collection<T> syncRequest(MultiRead<T> arg0, SyncMultiProcedure<T> arg1) {
333 throw new UnsupportedOperationException();
337 public <T> Collection<T> syncRequest(AsyncMultiRead<T> arg0,
338 AsyncMultiListener<T> arg1) {
339 throw new UnsupportedOperationException();
343 public <T> Collection<T> syncRequest(AsyncMultiRead<T> arg0, SyncMultiListener<T> arg1) {
344 throw new UnsupportedOperationException();
348 public <T> Collection<T> syncRequest(AsyncMultiRead<T> arg0,
349 MultiListener<T> arg1) {
350 throw new UnsupportedOperationException();
354 public <T> Collection<T> syncRequest(AsyncMultiRead<T> arg0, SyncMultiProcedure<T> arg1) {
355 throw new UnsupportedOperationException();
359 public <T> void asyncRequest(MultiRead<T> arg0, AsyncMultiListener<T> arg1) {
360 throw new UnsupportedOperationException();
364 public <T> void asyncRequest(MultiRead<T> arg0, SyncMultiListener<T> arg1) {
365 throw new UnsupportedOperationException();
369 public <T> void asyncRequest(MultiRead<T> arg0, MultiListener<T> arg1) {
370 throw new UnsupportedOperationException();
374 public <T> void asyncRequest(MultiRead<T> arg0, SyncMultiProcedure<T> arg1) {
375 throw new UnsupportedOperationException();
379 public <T> void asyncRequest(AsyncMultiRead<T> arg0,
380 AsyncMultiListener<T> arg1) {
381 throw new UnsupportedOperationException();
385 public <T> void asyncRequest(AsyncMultiRead<T> arg0, SyncMultiListener<T> arg1) {
386 throw new UnsupportedOperationException();
390 public <T> void asyncRequest(AsyncMultiRead<T> arg0,
391 MultiListener<T> arg1) {
392 throw new UnsupportedOperationException();
396 public <T> void asyncRequest(AsyncMultiRead<T> arg0, SyncMultiProcedure<T> arg1) {
397 throw new UnsupportedOperationException();
401 public <T> void asyncRequest(ExternalRead<T> request, Procedure<T> procedure) {
402 throw new UnsupportedOperationException();
406 public <T> T syncRequest(ExternalRead<T> request) {
407 throw new UnsupportedOperationException();
411 public <T> T syncRequest(ExternalRead<T> request, Listener<T> procedure) {
412 throw new UnsupportedOperationException();
416 public <T> T syncRequest(ExternalRead<T> request, Procedure<T> procedure) {
417 throw new UnsupportedOperationException();
421 public <T> void asyncRequest(ExternalRead<T> request) {
422 throw new UnsupportedOperationException();
426 public <T> void asyncRequest(ExternalRead<T> request, Listener<T> procedure) {
427 throw new UnsupportedOperationException();
431 public void syncRequest(DelayedWrite request) throws DatabaseException {
432 throw new UnsupportedOperationException();
436 public void asyncRequest(DelayedWrite request) {
437 throw new UnsupportedOperationException();
441 public <T> T syncRequest(WriteResult<T> request) throws DatabaseException {
442 throw new UnsupportedOperationException();
446 public <T> T syncRequest(DelayedWriteResult<T> request)
447 throws DatabaseException {
448 throw new UnsupportedOperationException();
452 public <T> T syncRequest(WriteOnlyResult<T> r) throws DatabaseException {
453 throw new UnsupportedOperationException();
457 public <T> void asyncRequest(WriteResult<T> r, Procedure<T> procedure) {
458 throw new UnsupportedOperationException();
462 public <T> void asyncRequest(DelayedWriteResult<T> r, Procedure<T> procedure) {
463 throw new UnsupportedOperationException();
467 public <T> void asyncRequest(WriteOnlyResult<T> r, Procedure<T> procedure) {
468 throw new UnsupportedOperationException();
472 public Resource getRootLibrary() {
473 throw new UnsupportedOperationException();
477 public <T> void async(ReadInterface<T> r, Procedure<T> procedure) {
478 throw new UnsupportedOperationException();
482 public <T> void async(ReadInterface<T> r, AsyncProcedure<T> procedure) {
483 throw new UnsupportedOperationException();
487 public <T> void async(ReadInterface<T> r, SyncProcedure<T> procedure) {
488 throw new UnsupportedOperationException();
492 public <T> void async(ReadInterface<T> r, Listener<T> procedure) {
493 throw new UnsupportedOperationException();
497 public <T> void async(ReadInterface<T> r, AsyncListener<T> procedure) {
498 throw new UnsupportedOperationException();
502 public <T> void async(ReadInterface<T> r, SyncListener<T> procedure) {
503 throw new UnsupportedOperationException();
507 public <T> T sync(ReadInterface<T> r) throws DatabaseException {
508 throw new UnsupportedOperationException();
512 public <T> T sync(WriteInterface<T> r) throws DatabaseException {
513 throw new UnsupportedOperationException();
517 public <T> void async(WriteInterface<T> r, Procedure<T> procedure) {
518 throw new UnsupportedOperationException();
522 public <T> void async(WriteInterface<T> r) {
523 throw new UnsupportedOperationException();
527 public Object getModificationCounter() {
528 throw new UnsupportedOperationException();