org.nuiton.wikitty
Class JGroupsNotifier

java.lang.Object
  extended by org.jgroups.ReceiverAdapter
      extended by org.nuiton.wikitty.JGroupsNotifier
All Implemented Interfaces:
org.jgroups.MembershipListener, org.jgroups.MessageListener, org.jgroups.Receiver, WikittyServiceListener

public class JGroupsNotifier
extends org.jgroups.ReceiverAdapter
implements WikittyServiceListener

JGroups notifier.

Version:
$Revision: 123 $ Last update : $Date: 2010-06-11 16:50:28 +0200 (ven., 11 juin 2010) $ By : $Author: echatellier $
Author:
chatellier

Field Summary
protected  org.jgroups.JChannel channel
          JGroup channel.
protected  boolean propagateCache
          Indique si les objects sont propages (true) vers les autres caches ou simplement supprimes des autres caches (false).
protected  WikittyServiceNotifier ws
          Notifier service reference reference.
 
Constructor Summary
JGroupsNotifier(WikittyServiceNotifier ws, String channelName, boolean propagateCache)
           
 
Method Summary
 void clearExtension(WikittyServiceEvent event)
           
 void clearWikitty(WikittyServiceEvent event)
           
protected  void initChannel(String channelName)
          Init jgroup channel.
 void putExtension(WikittyServiceEvent event)
          toto[1.0]
 void putWikitty(WikittyServiceEvent event)
           
 void receive(org.jgroups.Message msg)
           
 void removeExtension(WikittyServiceEvent event)
           
 void removeWikitty(WikittyServiceEvent event)
           
protected  void sendJGroupMessage(org.nuiton.wikitty.JGroupsNotifier.WikittyJGroupMessage wikittyMessage)
          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

ws

protected WikittyServiceNotifier ws
Notifier service reference reference.


propagateCache

protected boolean propagateCache
Indique si les objects sont propages (true) vers les autres caches ou simplement supprimes des autres caches (false).

See Also:
WikittyServiceCached#WIKITTY_PROPAGATE_CACHE_OPTION

channel

protected org.jgroups.JChannel channel
JGroup channel.

Constructor Detail

JGroupsNotifier

public JGroupsNotifier(WikittyServiceNotifier ws,
                       String channelName,
                       boolean propagateCache)
Method Detail

initChannel

protected void initChannel(String channelName)
Init jgroup channel.

Parameters:
channelName - channel name

sendJGroupMessage

protected void sendJGroupMessage(org.nuiton.wikitty.JGroupsNotifier.WikittyJGroupMessage wikittyMessage)
Send a jgroup message to all other channel member.

Parameters:
wikittyMessage - message to send

receive

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

putWikitty

public void putWikitty(WikittyServiceEvent event)
Specified by:
putWikitty in interface WikittyServiceListener

removeWikitty

public void removeWikitty(WikittyServiceEvent event)
Specified by:
removeWikitty in interface WikittyServiceListener

clearWikitty

public void clearWikitty(WikittyServiceEvent event)
Specified by:
clearWikitty in interface WikittyServiceListener

putExtension

public void putExtension(WikittyServiceEvent event)
Description copied from interface: WikittyServiceListener
toto[1.0]

Specified by:
putExtension in interface WikittyServiceListener

removeExtension

public void removeExtension(WikittyServiceEvent event)
Specified by:
removeExtension in interface WikittyServiceListener

clearExtension

public void clearExtension(WikittyServiceEvent event)
Specified by:
clearExtension in interface WikittyServiceListener


Copyright © 2009-2010 CodeLutin. All Rights Reserved.