org.nuiton.wikitty
Class JGroupsNotifierTransporter

java.lang.Object
  extended by org.jgroups.ReceiverAdapter
      extended by org.nuiton.wikitty.JGroupsNotifierTransporter
All Implemented Interfaces:
org.jgroups.MembershipListener, org.jgroups.MessageListener, org.jgroups.Receiver, WikittyServiceNotifier.RemoteNotifierTransporter

public class JGroupsNotifierTransporter
extends org.jgroups.ReceiverAdapter
implements WikittyServiceNotifier.RemoteNotifierTransporter

JGroups notifier.

Version:
$Revision: 426 $ Last update : $Date: 2010-10-19 16:51:48 +0200 (mar., 19 oct. 2010) $ By : $Author: bpoussin $
Author:
chatellier

Field Summary
protected  org.jgroups.JChannel channel
          JGroup channel.
static java.lang.String WIKITTY_EVENT_JGROUPCHANNELNAME_OPTION
          Utilisation du canal de communication basé sur jgroups avec comme identifiant d'application le nom de canal en option.
protected  WikittyServiceNotifier ws
          Notifier service reference reference.
 
Constructor Summary
JGroupsNotifierTransporter(WikittyServiceNotifier ws, java.util.Properties props)
           
 
Method Summary
protected  void initChannel(java.lang.String channelName)
          Init jgroup channel.
 void receive(org.jgroups.Message msg)
           
 void sendMessage(WikittyServiceEvent event)
          Send a jgroup message to all other channel member.
 
Methods inherited from class org.jgroups.ReceiverAdapter
block, getState, setState, suspect, viewAccepted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WIKITTY_EVENT_JGROUPCHANNELNAME_OPTION

public static final java.lang.String WIKITTY_EVENT_JGROUPCHANNELNAME_OPTION
Utilisation du canal de communication basé sur jgroups avec comme identifiant d'application le nom de canal en option. Si ce nom est vide, jgroups n'est pas utilisé. Si #WIKITTY_EVENT_PROPAGATE_OPTION est a true et que cette options est vide, une exception est levée.

See Also:
Constant Field Values

ws

protected WikittyServiceNotifier ws
Notifier service reference reference.


channel

protected org.jgroups.JChannel channel
JGroup channel.

Constructor Detail

JGroupsNotifierTransporter

public JGroupsNotifierTransporter(WikittyServiceNotifier ws,
                                  java.util.Properties props)
Method Detail

initChannel

protected void initChannel(java.lang.String channelName)
Init jgroup channel.

Parameters:
channelName - channel name

sendMessage

public void sendMessage(WikittyServiceEvent event)
                 throws java.lang.Exception
Send a jgroup message to all other channel member.

Specified by:
sendMessage in interface WikittyServiceNotifier.RemoteNotifierTransporter
Parameters:
event - message to send
Throws:
java.lang.Exception

receive

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


Copyright © 2009-2010 CodeLutin. All Rights Reserved.