Refactored IEventListener and IEventSink to handle garbage data according to configur...
[lwes-dotnet/github-mirror.git] / Org.Lwes / Listener / IEventSinkRegistrationKey.cs
blobdd52be0cdcbb9f79186afec86cfb8f5dec4c9e10
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
6 namespace Org.Lwes.Listener
8 /// <summary>
9 /// Registration key for event sinks.
10 /// </summary>
11 public interface IEventSinkRegistrationKey
13 /// <summary>
14 /// An opaque handback object.
15 /// </summary>
16 Object Handback
18 get;
19 set;
22 /// <summary>
23 /// The listener with which the event sink is registered.
24 /// </summary>
25 IEventListener Listener
27 get;
30 /// <summary>
31 /// The status of the event sink.
32 /// </summary>
33 EventSinkStatus Status
35 get;
38 /// <summary>
39 /// Activates the event sink.
40 /// </summary>
41 /// <returns><em>true</em> if the event sink has not already been canceled; otherwise <em>false</em></returns>
42 bool Activate();
44 /// <summary>
45 /// Cancels a registration. An event sink whose registration is canceled will no longer
46 /// receive event or garbage notification.
47 /// </summary>
48 void Cancel();
50 /// <summary>
51 /// Suspends the event sink. An event sink whose registration is suspended will not
52 /// receive event or garbage notification until it is re-activated.
53 /// </summary>
54 /// <returns><em>true</em> if the event sink has not already been canceled; otherwise <em>false</em></returns>
55 bool Suspend();
57 /// <summary>
58 /// Disables garbage notification for a sink.
59 /// </summary>
60 void DisableGarbageNotification();