public void Start() { try { Emitter.Connect(); } catch { log.Error("Could not log in as " + UserName + "/" + Password); } try { if (Emitter.Connection.IsOpen) { EmitMsg(); } } catch { log.Error("Could not queue messages as " + Emitter.UserName + "/" + Emitter.Password); } try { GuestEmitter.Connect(); } catch { log.Error("Could not log in as " + GuestEmitter.UserName + "/" + GuestEmitter.Password); } try { if (GuestEmitter.Connection.IsOpen) { GuestEmitter.EmitGuestMsg(); } } catch { log.Error("Could not queue messages as " + GuestEmitter.UserName + "/" + GuestEmitter.Password); } }
public void Stop() { log.Debug("Stopping service"); try { Model.QueueDelete(EndpointQueue); Model.ExchangeDelete(Exchange); Model.Close(); } catch { log.Info("Could not delete the AD queues"); } try { GuestEmitter.EatQueues(); } catch { log.Info("Could not delete the guest queues"); } log.Debug("Service stopped"); }
public void Continue() { log.Debug("Continue with more msgs"); EmitMsg(); GuestEmitter.EmitGuestMsg(); }
public void Pause() { log.Debug("Pausing"); Consumer.ReceiveMsg(); GuestEmitter.EatMessages(); }