comparison artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java @ 247:3a1209f214f5

Added instance variable to hold a call context listener. artifacts/trunk@1688 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 14 Apr 2011 11:24:03 +0000
parents a8a06bbe306c
children c47a640cfdae
comparison
equal deleted inserted replaced
246:a8a06bbe306c 247:3a1209f214f5
395 * This artifacts should not be removed from the database by the 395 * This artifacts should not be removed from the database by the
396 * database cleaner. 396 * database cleaner.
397 */ 397 */
398 protected HashSet<Integer> backgroundIds; 398 protected HashSet<Integer> backgroundIds;
399 399
400 protected CallContext.Listener callContextListener;
401
400 /** 402 /**
401 * Default constructor. 403 * Default constructor.
402 */ 404 */
403 public ArtifactDatabaseImpl() { 405 public ArtifactDatabaseImpl() {
404 } 406 }
431 433
432 context = bootstrap.getContext(); 434 context = bootstrap.getContext();
433 exportSecret = bootstrap.getExportSecret(); 435 exportSecret = bootstrap.getExportSecret();
434 436
435 wireWithBackend(backend); 437 wireWithBackend(backend);
438 }
439
440 public CallContext.Listener getCallContextListener() {
441 return callContextListener;
442 }
443
444 public void setCallContextListener(
445 CallContext.Listener callContextListener
446 ) {
447 this.callContextListener = callContextListener;
436 } 448 }
437 449
438 /** 450 /**
439 * Used to extract the artifact collection factory from bootstrap. 451 * Used to extract the artifact collection factory from bootstrap.
440 * 452 *
1443 cc.postCall(); 1455 cc.postCall();
1444 } 1456 }
1445 } 1457 }
1446 1458
1447 protected void initCallContext(CallContext cc) { 1459 protected void initCallContext(CallContext cc) {
1448 logger.info("Implement me!"); 1460 logger.debug("initCallContext");
1461 if (callContextListener != null) {
1462 callContextListener.init(cc);
1463 }
1449 } 1464 }
1450 1465
1451 protected void closeCallContext(CallContext cc) { 1466 protected void closeCallContext(CallContext cc) {
1452 logger.info("Implement me!"); 1467 logger.debug("closeCallContext");
1468 if (callContextListener != null) {
1469 callContextListener.close(cc);
1470 }
1453 } 1471 }
1454 } 1472 }
1455 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 1473 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org