Errai 3.0.1-SNAPSHOT

org.jboss.errai.bus.server.cluster.jgroups
Class JGroupsClusteringProvider

java.lang.Object
  extended by org.jgroups.ReceiverAdapter
      extended by org.jboss.errai.bus.server.cluster.jgroups.JGroupsClusteringProvider
All Implemented Interfaces:
MessageCallback, ClusteringProvider, org.jgroups.MembershipListener, org.jgroups.MessageListener, org.jgroups.Receiver

public class JGroupsClusteringProvider
extends org.jgroups.ReceiverAdapter
implements ClusteringProvider, MessageCallback

Author:
Mike Brock

Method Summary
 void callback(Message message)
          Called by the Message Bus every time it processes a message with the subject this callback is registered for.
 void clusterTransmit(String sessionId, String subject, String messageId)
          Sends an asynchronous message to the cluster to find if any of the clustered buses are aware of the specified session and subject.
 void clusterTransmitGlobal(Message message)
          Advertises a global message to the entire cluster.
static Message getErraiMessage(org.jgroups.Message message)
           
 void receive(org.jgroups.Message msg)
           
 
Methods inherited from class org.jgroups.ReceiverAdapter
block, getState, setState, suspect, unblock, viewAccepted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

receive

public void receive(org.jgroups.Message msg)
Specified by:
receive in interface org.jgroups.MessageListener
Overrides:
receive in class org.jgroups.ReceiverAdapter

callback

public void callback(Message message)
Description copied from interface: MessageCallback
Called by the Message Bus every time it processes a message with the subject this callback is registered for.

Specified by:
callback in interface MessageCallback
Parameters:
message - The message on the bus. Avoid making changes to this object, because it will continue to be reused by the framework and the same Message instance will be passed to other callbacks.

clusterTransmit

public void clusterTransmit(String sessionId,
                            String subject,
                            String messageId)
Description copied from interface: ClusteringProvider
Sends an asynchronous message to the cluster to find if any of the clustered buses are aware of the specified session and subject.

Specified by:
clusterTransmit in interface ClusteringProvider
Parameters:
sessionId - the session ID requested.
subject - the subject requested.

clusterTransmitGlobal

public void clusterTransmitGlobal(Message message)
Description copied from interface: ClusteringProvider
Advertises a global message to the entire cluster.

Specified by:
clusterTransmitGlobal in interface ClusteringProvider

getErraiMessage

public static Message getErraiMessage(org.jgroups.Message message)

Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.