Beispiel #1
0
 public GetTokenTask(AmqpRelay.TokenRenewer tokenRenewer, TimeSpan timeout)
 {
     this.tokenRenewer = tokenRenewer;
     this.appliesTo    = tokenRenewer.appliesTo;
     this.action       = tokenRenewer.action;
     this.timeout      = timeout;
 }
Beispiel #2
0
 private static void OnRenewToken(object state)
 {
     AmqpRelay.TokenRenewer tokenRenewer = (AmqpRelay.TokenRenewer)state;
     try
     {
         tokenRenewer.GetTokenAsync(AmqpRelay.TokenRenewer.GetTokenTimeout).Fork();
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         if (Fx.IsFatal(exception))
         {
             throw;
         }
         Fx.Exception.TraceHandled(exception, "TokenRenewer.OnRenewToken", null);
     }
 }
Beispiel #3
0
 public AmqpRelay(Uri serviceBusUri, TokenProvider tokenProvider, ConnectivitySettings connectivitySettings = null, HttpConnectivitySettings httpConnectivitySettings = null)
 {
     this.serviceBusUri = serviceBusUri;
     if (tokenProvider != null)
     {
         this.tokenRenewer = new AmqpRelay.TokenRenewer(tokenProvider, this.serviceBusUri.AbsoluteUri, "Listen");
     }
     this.RelayClientAuthorizationRequired = true;
     this.IsDynamic                = true;
     this.State                    = AmqpObjectState.Start;
     this.ListenerType             = Microsoft.ServiceBus.ListenerType.RoutedHttp;
     this.onAmqpObjectClosed       = new EventHandler(this.OnAmqpObjectClosed);
     this.ThisLock                 = new object();
     this.connectivitySettings     = connectivitySettings;
     this.httpConnectivitySettings = httpConnectivitySettings;
     this.activity                 = new EventTraceActivity();
 }