comparison artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java @ 311:1d517e051e95

Made backend listeners loadable at boot time. artifacts/trunk@2436 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 01 Aug 2011 14:17:09 +0000
parents a077bb098eb4
children ddc35c950e97
comparison
equal deleted inserted replaced
310:63122b9dee1d 311:1d517e051e95
476 context.put(GLOBAL_CONTEXT_KEY, this); 476 context.put(GLOBAL_CONTEXT_KEY, this);
477 477
478 exportSecret = bootstrap.getExportSecret(); 478 exportSecret = bootstrap.getExportSecret();
479 479
480 wireWithBackend(backend); 480 wireWithBackend(backend);
481
482 setupBackendListeners(bootstrap);
481 } 483 }
482 484
483 public CallContext.Listener getCallContextListener() { 485 public CallContext.Listener getCallContextListener() {
484 return callContextListener; 486 return callContextListener;
485 } 487 }
544 546
545 547
546 protected void setupHooks(FactoryBootstrap bootstrap) { 548 protected void setupHooks(FactoryBootstrap bootstrap) {
547 setPostFeedHook(bootstrap.getPostFeedHooks()); 549 setPostFeedHook(bootstrap.getPostFeedHooks());
548 setPostAdvanceHook(bootstrap.getPostAdvanceHooks()); 550 setPostAdvanceHook(bootstrap.getPostAdvanceHooks());
551 }
552
553 protected void setupBackendListeners(FactoryBootstrap bootstrap) {
554 List<BackendListener> bls = bootstrap.getBackendListeners();
555 if (bls != null) {
556 for (BackendListener listener: bls) {
557 listener.setup(context);
558 }
559 backend.addAllListeners(bls);
560 }
549 } 561 }
550 562
551 protected void setupLifetimeListeners(FactoryBootstrap bootstrap) { 563 protected void setupLifetimeListeners(FactoryBootstrap bootstrap) {
552 this.lifetimeListeners = bootstrap.getLifetimeListeners(); 564 this.lifetimeListeners = bootstrap.getLifetimeListeners();
553 } 565 }

http://dive4elements.wald.intevation.org