Class AbstractDiscoveryAgent
  
  
  
  
    Inheritance
    System.Object
    AbstractDiscoveryAgent
      
   
  
    Implements
    
    Apache.NMS.IStartable
    Apache.NMS.IStoppable
    System.IDisposable
   
  
    Inherited Members
    
      System.Object.Equals(System.Object)
    
    
      System.Object.Equals(System.Object, System.Object)
    
    
      System.Object.GetHashCode()
    
    
      System.Object.GetType()
    
    
      System.Object.MemberwiseClone()
    
    
      System.Object.ReferenceEquals(System.Object, System.Object)
    
    
      System.Object.ToString()
    
   
  
  Assembly: Apache.NMS.ActiveMQ.dll
  Syntax
  
    public abstract class AbstractDiscoveryAgent : IDiscoveryAgent, IStartable, IStoppable, IDisposable
   
  Fields
  
  
    |
    Improve this Doc
  
  
    View Source
  
  DEFAULT_BACKOFF_MULTIPLIER
  
  
  Declaration
  
    public const int DEFAULT_BACKOFF_MULTIPLIER = 2
   
  Field Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Int32 |  | 
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  DEFAULT_INITIAL_RECONNECT_DELAY
  
  
  Declaration
  
    public const int DEFAULT_INITIAL_RECONNECT_DELAY = 5000
   
  Field Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Int32 |  | 
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  DEFAULT_MAX_RECONNECT_DELAY
  
  
  Declaration
  
    public const int DEFAULT_MAX_RECONNECT_DELAY = 30000
   
  Field Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Int32 |  | 
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  discoveredServices
  
  
  Declaration
  
    protected Dictionary<string, DiscoveredServiceData> discoveredServices
   
  Field Value
  
  
    |
    Improve this Doc
  
  
    View Source
  
  discoveredServicesLock
  
  
  Declaration
  
    protected readonly object discoveredServicesLock
   
  Field Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Object |  | 
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  executor
  
  
  Declaration
  
    protected readonly ThreadPoolExecutor executor
   
  Field Value
  
  
    |
    Improve this Doc
  
  
    View Source
  
  started
  
  
  Declaration
  
    protected readonly Atomic<bool> started
   
  Field Value
  
    
      
        | Type | Description | 
    
    
      
        | Apache.NMS.Util.Atomic<System.Boolean> |  | 
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  worker
  
  
  Declaration
  
  Field Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Threading.Thread |  | 
    
  
  Properties
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  BackOffMultiplier
  
  
  Declaration
  
    public long BackOffMultiplier { get; set; }
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Int64 |  | 
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  DiscoveryURI
  
  
  Declaration
  
    public Uri DiscoveryURI { get; set; }
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Uri |  | 
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Group
  
  
  Declaration
  
    public string Group { get; set; }
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | System.String |  | 
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  InitialReconnectDelay
  
  
  Declaration
  
    public long InitialReconnectDelay { get; set; }
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Int64 |  | 
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  IsStarted
  
  
  Declaration
  
    public bool IsStarted { get; }
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Boolean |  | 
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  KeepAliveInterval
  Gets or sets the keep alive interval.  This interval controls the amount
of time that a service is kept before being considered idle and removed from
the list of discovered services.  This value is also used to control the
period of time that this service will wait before advertising itself.
Declaration
  
    public abstract long KeepAliveInterval { get; set; }
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Int64 |  | 
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  MaxReconnectAttempts
  
  
  Declaration
  
    public int MaxReconnectAttempts { get; set; }
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Int32 |  | 
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  MaxReconnectDelay
  
  
  Declaration
  
    public long MaxReconnectDelay { get; set; }
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Int64 |  | 
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  ServiceAdd
  
  
  Declaration
  
    public ServiceAddHandler ServiceAdd { get; set; }
   
  Property Value
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  ServiceRemove
  
  
  Declaration
  
    public ServiceRemoveHandler ServiceRemove { get; set; }
   
  Property Value
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  UseExponentialBackOff
  
  
  Declaration
  
    public bool UseExponentialBackOff { get; set; }
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Boolean |  | 
    
  
  Methods
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Dispose()
  
  
  Declaration
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  DoAdvertizeSelf()
  Overriden by the actual agent class to handle the publish of this service
if supported by the agent.
Declaration
  
    protected abstract void DoAdvertizeSelf()
   
  
    |
    Improve this Doc
  
  
    View Source
  
  
  DoDiscovery()
  Called from the Agent background thread to allow the concrete agent implementation
to perform its discovery of new services.
Declaration
  
    protected abstract void DoDiscovery()
   
  
    |
    Improve this Doc
  
  
    View Source
  
  
  DoStartAgent()
  Overriden by the agent class to handle starting any agent related services
or opening resources needed for the agent.
Declaration
  
    protected abstract void DoStartAgent()
   
  
    |
    Improve this Doc
  
  
    View Source
  
  
  DoStopAgent()
  Overriden by the agent to handle shutting down any agent created resources.
Declaration
  
    protected abstract void DoStopAgent()
   
  
    |
    Improve this Doc
  
  
    View Source
  
  
  FireServiceAddEvent(DiscoveryEvent)
  
  
  Declaration
  
    protected void FireServiceAddEvent(DiscoveryEvent data)
   
  Parameters
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  FireServiceRemoveEvent(DiscoveryEvent)
  
  
  Declaration
  
    protected void FireServiceRemoveEvent(DiscoveryEvent data)
   
  Parameters
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  IsTimeForRecovery(DiscoveredServiceData)
  Returns true if this Broker has been marked as failed and it is now time to
start a recovery attempt.
Declaration
  
    public bool IsTimeForRecovery(DiscoveredServiceData service)
   
  Parameters
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Boolean |  | 
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  ProcessDeadService(String)
  
  
  Declaration
  
    protected void ProcessDeadService(string service)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.String | service |  | 
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  ProcessLiveService(String, String)
  
  
  Declaration
  
    protected void ProcessLiveService(string brokerName, string service)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.String | brokerName |  | 
      
        | System.String | service |  | 
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  RegisterService(String)
  
  
  Declaration
  
    public void RegisterService(string name)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.String | name |  | 
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  ServiceFailed(DiscoveryEvent)
  
  
  Declaration
  
    public void ServiceFailed(DiscoveryEvent failedEvent)
   
  Parameters
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Start()
  
  
  Declaration
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Stop()
  
  
  Declaration
  
  Implements
  
  
      Apache.NMS.IStartable
  
  
      Apache.NMS.IStoppable
  
  
      System.IDisposable