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) |
int | run () |
Private Attributes | |
IEvent | event |
Buffer | buffer |
ProtocolReader | reader |
Cluster | cluster |
MulticastSocket | consumer |
void exception char[] | msg |
|
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 477 of file Cluster.d. References Buffer, event, IEvent::getChannel(), Cluster::getGroup(), IChannel::getName(), MulticastSocket::join(), ProtocolReader, and SocketListener::start(). |
|
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. Definition at line 508 of file Cluster.d. References event, IEvent::getChannel(), IChannel::getName(), ProtocolReader::getPayload(), and invoke(). |
|
Overridable mean of notifying the client code. Reimplemented in MessageConsumer. Definition at line 539 of file Cluster.d. References IEvent::invoke(). Referenced by notify(). |
|
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. Definition at line 563 of file Cluster.d. References MulticastSocket::pauseGroup(). Referenced by MessageConsumer::invoke(). |
|
Resume listening, post-pause. Definition at line 574 of file Cluster.d. References MulticastSocket::resumeGroup(). Referenced by MessageConsumer::invoke(). |
|
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 81 of file SocketListener.d. |
|
Definition at line 95 of file SocketListener.d. Referenced by this(). |
|
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 137 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 155 of file SocketListener.d. References IBuffer::clear(), SocketListener::notify(), SocketListener::quit, ISocketReader::read(), and version. |
|
|
|
Reimplemented from SocketListener. |
|
Reimplemented from SocketListener. |
|
|
|
|
|
Handle error conditions from the listener thread. Definition at line 113 of file SocketListener.d. |