Package no.kommune.bergen.soa.svarut

Examples of no.kommune.bergen.soa.svarut.DispatchPolicy


  public void init() {
    this.forsendelsesArkiv = createStrictMock( ForsendelsesArkiv.class );
    this.emailFacade = createStrictMock( EmailFacade.class );
    this.printFacade = createStrictMock( PrintFacade.class );
    serviceDelegate = createStrictMock(ServiceDelegate.class);
    DispatchPolicy dispatchPolicy= new DispatchPolicy();
    dispatchPolicy.setShipmentParams(Arrays.asList(new DispatchPolicyShipmentParams(ALTINN_OG_APOST, 1)));
    this.dispatcher = new EmailOgPost( serviceDelegate, forsendelsesArkiv, emailFacade, printFacade, dispatchPolicy);
  }
View Full Code Here


  @Before
  public void init() {
        serviceDelegate = createStrictMock(ServiceDelegate.class);
    this.forsendelsesArkiv = createStrictMock( ForsendelsesArkiv.class );
    this.printFacade = createStrictMock( PrintFacade.class );
        DispatchPolicy dispatchPolicy = new DispatchPolicy();
        dispatchPolicy.setShipmentParams(Arrays.asList(
                new DispatchPolicyShipmentParams(ShipmentPolicy.KUN_APOST, 1),
                new DispatchPolicyShipmentParams(ShipmentPolicy.KUN_BPOST, 2)));

    this.dispatcher = new KunPost( serviceDelegate,forsendelsesArkiv, printFacade, dispatchPolicy );
  }
View Full Code Here

  @Before
  public void init() {
    this.forsendelsesArkiv = createStrictMock( ForsendelsesArkiv.class );
    this.altinnFacade = createStrictMock( AltinnFacade.class );
        serviceDelegate = createStrictMock(ServiceDelegate.class);
        DispatchPolicy dispatchPolicy = new DispatchPolicy();
        dispatchPolicy.setShipmentParams(Arrays.asList(new DispatchPolicyShipmentParams(ShipmentPolicy.ALTINN_OG_APOST, 1)));
        this.dispatcher = new KunAltinn( serviceDelegate,forsendelsesArkiv, altinnFacade , dispatchPolicy);
  }
View Full Code Here

  public void init() {
    forsendelsesArkiv = createStrictMock( ForsendelsesArkiv.class );
    emailFacade = createStrictMock( EmailFacade.class );
        serviceDelegate = createStrictMock(ServiceDelegate.class);

        DispatchPolicy dispatchPolicy = new DispatchPolicy();
        dispatchPolicy.setShipmentParams(Arrays.asList(new DispatchPolicyShipmentParams(ShipmentPolicy.KUN_EMAIL, 1)));

        this.dispatcher = new KunEmail( serviceDelegate,forsendelsesArkiv, emailFacade , dispatchPolicy);
  }
View Full Code Here

  }

  @Override
  public void handleUnread(Forsendelse f) {
    long sent = f.getSendt().getTime();
    DispatchPolicy dp = getDispatchPolicy();
    long now = System.currentTimeMillis();

    if (sent + dp.getLeadTimeBeforeStopInMilliseconds(f) < now) {
      forsendelsesArkiv.stop(f.getId());
    }

  }
View Full Code Here

TOP

Related Classes of no.kommune.bergen.soa.svarut.DispatchPolicy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.