Inheritance diagram for BulletinConsumer:
Public Member Functions | |
this (Cluster cluster, IEvent event) | |
void | notify (IBuffer buffer) |
Cluster | getCluster () |
void | pauseGroup () |
void | resumeGroup () |
void | cancel () |
Protected Member Functions | |
void | invoke (IEvent event, IPayload payload) |
Private Member Functions | |
this (ISocketReader reader, IBuffer buffer) | |
public class VersionAltListener void | start () |
void | setErrorLimit (ushort limit) |
ThreadReturn | run () |
Private Attributes | |
IEvent | event |
Buffer | buffer |
ProtocolReader | reader |
Cluster | cluster |
MulticastSocket | consumer |
void exception char[] | msg |
public class VersionAres typedef void | ThreadReturn |
else typedef int | ThreadReturn |
|
Construct a multicast consumer for the specified event. The event handler will be invoked whenever a message arrives for the associated channel. Reimplemented in MessageConsumer. Definition at line 486 of file Cluster.d. References Buffer, buffer, and ProtocolReader. |
|
Notification callback invoked when we receive a multicast packet. Note that we check the packet channel-name against the one we're consuming, to check for cases where the group address had a hash collision. Reimplemented from SocketListener. |
|
Overridable mean of notifying the client code. Reimplemented in MessageConsumer. Definition at line 548 of file Cluster.d. References IEvent::invoke(). |
|
Return the cluster instance we're associated with. |
|
Temporarily halt listening. This can be used to ignore multicast messages while, for example, the consumer is busy doing other things. |
|
Resume listening, post-pause. |
|
Cancel this consumer. The listener is effectively disabled from this point forward. The listener thread does not halt at this point, but waits until the socket-read returns. Note that the D Interface implementation requires us to "reimplement and dispatch" trivial things like this ~ it's a pain in the neck to maintain. Reimplemented from IConsumer. |
|
Construct a listener with the requisite arguments. The specified buffer is populated via the provided instance of ISocketReader before being passed to the notify() method. All arguments are required. Definition at line 84 of file SocketListener.d. |
|
Definition at line 98 of file SocketListener.d. |
|
Set the maximum contiguous number of exceptions this listener will survive. Setting a limit of zero will not survive any errors at all, whereas a limit of two will survive as long as two consecutive errors don't arrive back to back. Definition at line 140 of file SocketListener.d. |
|
Definition at line 163 of file SocketListener.d. References buffer, printf(), ISocketReader::read(), and version. |
|
|
|
Reimplemented from SocketListener. |
|
Reimplemented from SocketListener. |
|
|
|
|
|
Handle error conditions from the listener thread. Definition at line 116 of file SocketListener.d. |
|
Execution of this thread is typically stalled on the read() method belonging to the ISocketReader specified during construction. You can invoke cancel() to indicate execution should not proceed further, but that will not actually interrupt a blocked read() operation. Note that exceptions are all directed towards the handler implemented by the class instance. Definition at line 158 of file SocketListener.d. |
|
Definition at line 161 of file SocketListener.d. |