net.sf.swarmcache
Class Communicator

java.lang.Object
  |
  +--net.sf.swarmcache.Communicator
Direct Known Subclasses:
JavaGroupsCommunicator

public abstract class Communicator
extends java.lang.Object

Abstract class that handles the communications for SwarmCache. To provide a full implementation:

Author:
John Watkinson

Constructor Summary
Communicator()
           
 
Method Summary
 java.lang.String getGroupName()
           
 MultiCacheManager getManager()
           
protected  void receive(CacheNotification notification)
          Call when a notification is received by the communications layer.
protected abstract  void send(CacheNotification notification)
          Implement this to send a cache notification over the communications layer.
protected  void setGroupName(java.lang.String groupName)
           
 void setManager(MultiCacheManager manager)
           
abstract  void shutDown()
          Called by the cache manager to shut down the communicator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Communicator

public Communicator()
Method Detail

setGroupName

protected void setGroupName(java.lang.String groupName)

getGroupName

public java.lang.String getGroupName()

setManager

public void setManager(MultiCacheManager manager)

getManager

public MultiCacheManager getManager()

receive

protected void receive(CacheNotification notification)
Call when a notification is received by the communications layer.

Parameters:
notification - the parsed cache notification.

send

protected abstract void send(CacheNotification notification)
Implement this to send a cache notification over the communications layer.

Parameters:
notification - the cache notification to send.

shutDown

public abstract void shutDown()
Called by the cache manager to shut down the communicator.